xeus-cling icon indicating copy to clipboard operation
xeus-cling copied to clipboard

Cannot launch - dyld: Library not loaded: @rpath/libxeus.1.dylib

Open josephsieh opened this issue 3 years ago • 17 comments

Fresh install followed

> mamba create -n cling
> source activate cling

> mamba install xeus-cling -c conda-forge
> mamba install jupyterlab -c conda-forge

But when I launch jupyter-lab, I saw the error message

dyld: Library not loaded: @rpath/libxeus.1.dylib

Environment:

  • MacOS Big Sur 11.4
  • Xcode 12.5.

josephsieh avatar Jun 09 '21 01:06 josephsieh

Can you give the output of the following commands?

mamba list |grep xeus
mamba list |grep zeromq
otool -L xcpp
ls -al $CONDA_PREFIX/lib |grep xeus

JohanMabille avatar Jun 10 '21 08:06 JohanMabille

Here are the outputs.

❯ mamba list |grep xeus
xeus                      1.0.3                hf09c4ce_0    conda-forge
xeus-cling                0.12.1               h79ef1c8_0    conda-forge

❯ mamba list |grep zeromq
zeromq                    4.3.4                h1c7c35f_0    conda-forge

❯ otool -L xcpp
xcpp:
	@rpath/libxeus-cling.0.dylib (compatibility version 0.0.0, current version 0.12.1)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
	@rpath/libxeus.1.dylib (compatibility version 1.0.0, current version 1.1.0)
	@rpath/libc++.1.dylib (compatibility version 1.0.0, current version 1.0.0)

❯ ls -al $CONDA_PREFIX/lib |grep xeus
-rwxrwxr-x   1 joseph staff  68M Jun  8 20:22 libxeus-cling.0.12.1.dylib*
lrwxr-xr-x   1 joseph staff   26 Jun  8 20:22 libxeus-cling.0.dylib -> libxeus-cling.0.12.1.dylib*
lrwxr-xr-x   1 joseph staff   26 Jun  8 20:22 libxeus-cling.dylib -> libxeus-cling.0.12.1.dylib*
-rwxrwxr-x   1 joseph staff 732K Jun  8 20:22 libxeus.3.0.2.dylib*
lrwxr-xr-x   1 joseph staff   19 Jun  8 20:22 libxeus.3.dylib -> libxeus.3.0.2.dylib*
-rw-rw-r--   3 joseph staff 2.1M Jun  4 07:59 libxeus.a
lrwxr-xr-x   1 joseph staff   19 Jun  8 20:22 libxeus.dylib -> libxeus.3.0.2.dylib*

josephsieh avatar Jun 10 '21 15:06 josephsieh

I am having the same issue but with a miniconda environment but otool outputs : can't open file: xcpp (No such file or directory)

aahilgert avatar Jun 10 '21 19:06 aahilgert

Same here on miniconda env but otool outputs : can't open file: xcpp (No such file or directory)

k3nnywilliam avatar Jun 11 '21 06:06 k3nnywilliam

I am also having the same issue with a miniconda environment. otool outputs: can't open file: xcpp (No such file or directory)

norman-kong avatar Jun 13 '21 00:06 norman-kong

For otool output, if you are in MacOS with miniconda, you can do the followings to get your "real xcpp" absolute path.

> which xcpp
miniconda3/envs/cling/bin/xcpp

> otool -L miniconda3/envs/cling/bin/xcpp

josephsieh avatar Jun 13 '21 01:06 josephsieh

Yeah, in that case, I have the exact same output for all those commands

aahilgert avatar Jun 13 '21 02:06 aahilgert

So, command outputs aside, any idea what might be the problem?

k3nnywilliam avatar Jun 13 '21 08:06 k3nnywilliam

This is an issue with the latest MacOS (11.4 Big Sur) and relocation. We need to investigate.

SylvainCorlay avatar Jun 13 '21 09:06 SylvainCorlay

Maybe @chrisburr knows what the issue is?

SylvainCorlay avatar Jun 13 '21 09:06 SylvainCorlay

@SylvainCorlay Just fyi, I'm on Catalina 10.15.7.

k3nnywilliam avatar Jun 13 '21 10:06 k3nnywilliam

@k3nnywilliam your issue does not seem to be the same as the OP.

SylvainCorlay avatar Jun 13 '21 20:06 SylvainCorlay

@SylvainCorlay I'm on MacOS Big Sur 11.2.1

aahilgert avatar Jun 13 '21 20:06 aahilgert

@aahilgert "can't open file: xcpp" is not the same thing as the rpath issue of the OP.

SylvainCorlay avatar Jun 13 '21 21:06 SylvainCorlay

@SylvainCorlay How exactly is my issue different? The error says:

dyld: Library not loaded: @rpath/libxeus.1.dylib Referenced from: /Users/kennyallau/miniconda3/envs/cling/bin/xcpp Reason: image not found

and my outputs are the same as @josephsieh:

$ mamba list |grep xeus xeus 1.0.3 hf09c4ce_0 conda-forge xeus-cling 0.12.1 h79ef1c8_0 conda-forge

$ mamba list |grep zeromq zeromq 4.3.4 h1c7c35f_0 conda-forge

$ otool -L /Users/kennyallau/miniconda3/envs/cling/bin/xcpp /Users/kennyallau/miniconda3/envs/cling/bin/xcpp: @rpath/libxeus-cling.0.dylib (compatibility version 0.0.0, current version 0.12.1) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1) @rpath/libxeus.1.dylib (compatibility version 1.0.0, current version 1.1.0) @rpath/libc++.1.dylib (compatibility version 1.0.0, current version 1.0.0)

$ ls -al $CONDA_PREFIX/lib |grep xeus

-rwxrwxr-x    1 kennyallau  staff  70512348 Jun 13 12:12 libxeus-cling.0.12.1.dylib
lrwxr-xr-x    1 kennyallau  staff        26 Jun 13 12:12 libxeus-cling.0.dylib -> libxeus-cling.0.12.1.dylib
lrwxr-xr-x    1 kennyallau  staff        26 Jun 13 12:12 libxeus-cling.dylib -> libxeus-cling.0.12.1.dylib
-rwxrwxr-x    1 kennyallau  staff    748788 Jun 13 12:12 libxeus.3.0.2.dylib
lrwxr-xr-x    1 kennyallau  staff        19 Jun 13 12:12 libxeus.3.dylib -> libxeus.3.0.2.dylib
-rw-rw-r--    2 kennyallau  staff   2153704 Jun  4 22:59 libxeus.a
lrwxr-xr-x    1 kennyallau  staff        19 Jun 13 12:12 libxeus.dylib -> libxeus.3.0.2.dylib

k3nnywilliam avatar Jun 14 '21 04:06 k3nnywilliam

Ah right, I thought your issue was that xcpp could not be found.

SylvainCorlay avatar Jun 14 '21 04:06 SylvainCorlay

Hi all, I just wanna follow up on this issue because I managed to get it working by doing the following: I remove the existing environment and recreate it again. What I've noticed from my previous terminal command is that I have specified environment's python to 3.8. Not sure why I did that; probably out of habit.

So, instead of doing "mamba create -n cling python=3.8", I just do "mamba create -n cling" and then I install the xeus-cling along with its dependencies as per instruction.

Finally, I created a new notebook and then voila! It works. So I guess the issue was to never specify the python version when creating new environment? Probably. Anyway, hope that helps.

k3nnywilliam avatar Aug 03 '21 05:08 k3nnywilliam