Closed vyorkin closed 6 days ago
Just tried cloning the repo and running call_julia
example, and it fails with the same error on my machine: https://asciinema.org/a/I4msnifn6DduKY8rWdJ00rTcR
uv.h
is the first file included in jlrs_cc.h
, so it seems like the compiler is having trouble finding the include directory. Have you set the JULIA_DIR
environment variable?
CI uses the following environment variables:
export JULIA_DIR="$(dirname $(dirname $(which julia)))"
export DYLD_LIBRARY_PATH="${JULIA_DIR}/lib:${JULIA_DIR}/lib/julia:${DYLD_LIBRARY_PATH}"
Maybe there is some magic inside that julia github action that makes the env different to what I have following the official installation instructions here https://julialang.org/downloads/platform/#macos.
$ which julia
/usr/local/bin/julia
$ echo $(dirname $(dirname $(which julia)))
/usr/local
$ export JULIA_DIR="$(dirname $(dirname $(which julia)))"
$ echo $JULIA_DIR
/usr/local
$ export DYLD_LIBRARY_PATH="${JULIA_DIR}/lib:${JULIA_DIR}/lib/julia:${DYLD_LIBRARY_PATH}"
$ echo $DYLD_LIBRARY_PATH
/usr/local/lib:/usr/local/lib/julia:
There is no such directory: "/usr/local/lib/julia"
:
$ cd /usr/local/lib/julia
cd: no such file or directory: /usr/local/lib/julia
I'm sure this path is correct:
echo $DYLD_LIBRARY_PATH
/Applications/Julia-1.9.app/Contents/Resources/julia/include/julia:/Applications/Julia-1.9.app/Contents/Resources/julia/lib/julia
Because:
$ echo $DYLD_LIBRARY_PATH
/Applications/Julia-1.9.app/Contents/Resources/julia/include/julia
$ cd /Applications/Julia-1.9.app/Contents/Resources/julia/include/julia
$ ls | grep uv
uv
uv.h
$ cd cd /Applications/Julia-1.9.app/Contents/Resources/julia/lib/julia
$ ls | grep uv
libuv.2.dylib
libuv.dylib -> libuv.2.dylib
But having uv.h
and libuv.dylib
in DYLD_LIBRARY_PATH
doesn't help, I'm getting the same error
The problem isn't that it's not finding the library, it's not finding the header because the headers are not in $JULIA_DIR/include. Could you try setting JULIA_DIR
to /Applications/Julia-1.9.app/Contents/Resources/julia/
instead?
I don't have a mac myself so I have to admit I have only experimented with macOS support in CI.
@vyorkin did u ended up finding a fix or a workaround ? facing the same issue.
No, unfortunately
Psst it worked for me, setting the env var julia_dir and dyld_library_path as specified in the docs and now its working for me now.
Hi! Could you please help me get it to work on Mac OS?
I get the following error:
It fails here. The minimal reproducible example/project: https://github.com/vyorkin/jlrs_macos.git
Here is my env:
The output of cargo build: https://gist.github.com/vyorkin/2056bc741d8f11e4ffbed2a8eae5bbda