Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not load library edfapi #16

Open
likanzhan opened this issue Oct 9, 2022 · 6 comments
Open

Could not load library edfapi #16

likanzhan opened this issue Oct 9, 2022 · 6 comments

Comments

@likanzhan
Copy link
Contributor

Hi Roger,
I don't know when this begins to occur.
But I now encountered an 'could not load library' error, when I tries to use the library:

julia> Eyelink.version()
ERROR: could not load library "/Library/Frameworks/edfapi.framework/Versions/Current/edfapi"
dlopen(/Library/Frameworks/edfapi.framework/Versions/Current/edfapi.dylib, 0x0001): tried: '/Library/Frameworks/edfapi.framework/Versions/Current/edfapi.dylib' (no such file), '/Library/Frameworks/edfapi.framework/Versions/A/edfapi.dylib' (no such file)
Stacktrace:
 [1] version()
   @ Eyelink ~/.julia/packages/Eyelink/6MnRj/src/Eyelink.jl:18
 [2] top-level scope
   @ REPL[25]:1

Any suggestions?

Thanks,

The version of Julia I used is

julia> versioninfo()
Julia Version 1.8.1
Commit afb6c60d69a (2022-09-06 15:09 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.5.0)
  CPU: 10 × Apple M1 Max
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, apple-m1)
  Threads: 1 on 8 virtual cores
Environment:
  JULIA_NUM_THREADS = 1
  JULIA_PKG_USE_CLI_GIT = true
@grero
Copy link
Owner

grero commented Oct 13, 2022

That is weird. For fear of stating the obvious, have you verified that the edf library actually still exists at the location mentioned in the error?

@likanzhan
Copy link
Contributor Author

@grero Yes, it actually exists there. One possible reason is that I have updated the XCode since then. Could this be a cause?

@likanzhan
Copy link
Contributor Author

I have checked, the library is there. but no edfapi.dylib is found there:

Screen Shot 2022-10-13 at 22 59 25

@likanzhan
Copy link
Contributor Author

@grero

But as it is described in page 24 of the file EDF Access C API user manual, the missing of the dylib should no be the problem.

Screen Shot 2022-10-19 at 13 09 31

@grero
Copy link
Owner

grero commented Oct 19, 2022

Oh I see, that would be a problem then. I guess when compiling c-code, you only need the headers. However, the way I wrote the julia code, you do need the dylib.
Could you perhaps try downloading an older version which does contain the dylib file?
In the long run, it seems like I'd have to find a way to not depend on the dylib, though.

@likanzhan
Copy link
Contributor Author

likanzhan commented Oct 22, 2022

@grero

This error turns out to be related to the Julia version I used.
The edfapi is built for X86 only.
So if I switch back to the macOS x86 (Intel or Rosetta), the package worked successfully as expected,
but if I use the macOS ARM (M-series Processor) version, the error will be reported.

It seems that the edfapi cannot be compiled in a macOS ARM system.

Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants