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

recurring error when trying to work with/install packages for R "sh: symbol lookup error: sh: undefined symbol: rl_signal_event_hook" #1679

Closed
xguse opened this issue Oct 5, 2015 · 29 comments
Labels
locked [bot] locked due to inactivity

Comments

@xguse
Copy link

xguse commented Oct 5, 2015

This has eaten my whole day and I finally gave up and resolved to bother you guys.

A few things up front:

I mention this because my issue seems to intersect with readline issues.

I can install the conda packages from the r channel fine. But when I try to adapt the recipes to build bioconductor packages they always choke.

I then just tried to run my conda R install and do the

source("http://bioconductor.org/biocLite.R")
biocLite()

process that bioconductor claims is the only SANE way to install their stuff.

I am met with sh: symbol lookup error: sh: undefined symbol: rl_signal_event_hook. It is driving me nuts.

My question is twofold:

  1. insight into what is going on would be appreciated.
  2. can you PLEASE include text in the conda docs on installing things from bioconductor and provide a few more educational examples of recipes for that kind of thing?

Thanks.

Gus

@joelostblom
Copy link

Hi, did you ever resolve this? I am running into the same error message when launching a Jupyter-Notebook running the r-kernel. I am also on Arch.

@xguse
Copy link
Author

xguse commented Feb 23, 2016

Ok yes I did. But before I tell you what I did, I want to say that it is admittedly a blatant class 1 KLUDGE. I tried MANY things, some of which are listed in #455.

I repeatedly tried to ensure that my solutions played inside the framework of the isolation of the conda environment (read: the fix involves using conda to solve the issue). But in the end, the only thing that REALLY seems to have fixed it for me is to follow @joseandres42's lead and do the following:

sudo ln /usr/lib/libncursesw.so.6 /usr/lib/libncursesw.so.5

@xguse
Copy link
Author

xguse commented Feb 23, 2016

I should also say that if you are looking to write a bunch of bioconductor conda packages you should REALLY check out the Bioconda recipe repository (https://bioconda.github.io/). They probably even have many of the pakgs you want already written. And if they dont they have a couple scripts that basically let you build a bioconductor skeleton similar to how you can do conda skeleton cran PACKAGE_NAME.

Gus

@joelostblom
Copy link

Thank you for taking the time to reply and link different solutions. I resolved my errors by completely removing the R packages that was lingering from a previous non-conda install, and Jupyter is now launching properly. I still occasionally see sh: symbol lookup error: sh: undefined symbol: rl_signal_event_hook in the terminal output, I will try your ln solution if that causes me any troubles in the future.

And yes, bioconda appears to be amazing. It is even more helpful since the pacman version of r is 3.2.3, which doesn't play well with many of the packages I want to use, conda's 3.2.2 works much better. Thanks for the package building tip!

@joelostblom
Copy link

Hi again,
The jupyter-notebook is still running fine for me, but i have encountered the sh: symbol lookup error: sh: undefined symbol: rl_signal_event_hook problem when trying to use install.packages() in R, just as you originally reported.

I tried to link the libraries as you suggested and I also tried installing different versions of ncurses (as suggested here), but I am still running into the same issue. I have asked a couple of questions on StackOverflow, regarding installing and building R-packages in conda. Currently, I run into the rl_signal_event_hook-error with both of them. Let me know if you have any suggestions of possible solutions. At this point, I might just install a virtual machine or create a new user and try a new install of anaconda there.

@xguse
Copy link
Author

xguse commented Apr 15, 2016

I have not run into issues since doing the link. I am running anaconda2 btw in the weird case that there may be a link to that vs anaconda3.

Good luck!

@joelostblom
Copy link

I got around the rl_event_hook-problems by following the approach recommended here and symlinking anaconda's libreadline to the system one:

mv ~/anaconda3/lib/libreadline.s.6.2 ~/anaconda3/lib/libreadline.s.6.2.bak
ln -s /usr/lib/libreadline.so.6.3 ~/anaconda3/lib/libreadline.s.6.2

I am still having troubles installing some R-packages due to failure to load shared objects, but I am trying to investigate those issues separately.

@croth1
Copy link

croth1 commented Sep 8, 2016

Has this issue ever been investigated properly? Using conda's R package on arch is really painful at the moment.

On arch, bash is built against libreadline-6.3:

$ ldd $(which bash)
        linux-vdso.so.1 (0x00007ffd8fd8b000)
        libreadline.so.6 => /usr/lib/libreadline.so.6 (0x00007f9528883000)
        libncursesw.so.6 => /usr/lib/libncursesw.so.6 (0x00007f9528616000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f9528412000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f9528074000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f9528acd000)

whereas conda's R is linked against libreadline-6.2. The error apparently arises, when trying to use the 6.2 version of readline with bash.

Does anyone have a clue what is actually happening? Is conda somehow able to hijack the library loading and loads bash with its own readline, instead of /usr/lib/libreadline.so.6?

ping @mingwandroid

@mingwandroid
Copy link
Contributor

I've just done some preliminary investigation using strace. Internally R calls other executables through /bin/sh:

execve("/bin/sh", ["sh", "-c", "'/home/ray/mc-x64-3.5/lib/R/bin/pager' < '/tmp/RtmpimTXe8/271459c47643'"], [/* 77 vars */]) = 0

I need to figure out why it bothers with this, and if it's really necessary, find an accomodation.

@mingwandroid
Copy link
Contributor

mingwandroid commented Oct 21, 2016

I have a test build of r-base that should address this issue. If you can test it I would be very appreciative:

conda update -c r r-essentials
conda update -c rdonnellyr r-base

.. it should install version 3.3.1-5 and that avoids setting LD_LIBRARY_PATH, using RPATH instead.

@croth1
Copy link

croth1 commented Oct 21, 2016

@mingwandroid, seems to be fixed in your version.

@mingwandroid
Copy link
Contributor

Thanks @croth1, I'm waiting to hear if there are any bad side effects from my change before I push it to the r channel. If you are able to test that "other R stuff" still works I'd be most thankful.

@spk83
Copy link

spk83 commented Jan 17, 2017

@mingwandroid is the fix pushed to r channel yet?

@mingwandroid
Copy link
Contributor

Yes, it was uploaded to the r channel more than two months ago when we released r-base 3.3.1-5.

Do you still have a problem with it? If so please show:

conda list | grep r-base

@spk83
Copy link

spk83 commented Jan 18, 2017

Thanks for the quick response.

r-base                    3.3.2                         1    conda-forge
r-base64enc               0.1_3                  r3.3.2_0    r

I am running into issue of libreadline.so.6: undefined symbol: PC while loading irkernel in conda.

@mingwandroid
Copy link
Contributor

mingwandroid commented Jan 18, 2017

You cannot mix packages from conda-forge and conda-defaults because they are not binary compatible: https://en.wikipedia.org/wiki/Binary_code_compatibility

Please remove conda-forge from your channels (~/.condarc usually) then do conda update --all then ensure conda-forge does not appear anywhere in the full output from conda list --show-channel-urls

@spk83
Copy link

spk83 commented Jan 18, 2017

Didn't expect that would happen - conda would use multiple channels to download a package and its dependencies. Removed conda-forge from environment. Works good. Thanks!

@mingwandroid
Copy link
Contributor

No problem, glad we got you going again. Do you feel that how channels work could be better documented?

@spk83
Copy link

spk83 commented Jan 18, 2017

I do feel that. I did go through docs at http://conda.pydata.org/docs/index.html. I couldn't understand how channels would be prioritized when they are listed in an environment file and if I am using that environment file to create conda env.

My assumption is that it would start with defaults/anaconda channel and if it doesn't find package there, it would continue to look into the other channel as per the order they are listed. Please correct if I misunderstood.

@mingwandroid
Copy link
Contributor

We have this: http://conda.pydata.org/docs/channels.html

Does it answer your questions?

@spk83
Copy link

spk83 commented Jan 18, 2017

Not really. I am using environment file to create/manage conda envs. Channels differ from environment to environment. I am not editing ~/.condarc or running conda config to add/update/remove channels at user profile level.

@mingwandroid
Copy link
Contributor

Hmm, so who (or what) generates your environment files?

@spk83
Copy link

spk83 commented Jan 18, 2017

I write environment file for each environment that I want to run in my conda installation. http://conda.pydata.org/docs/using/envs.html#create-environment-file-by-hand
Sorry but I might not be following what you meant to ask.

@mingwandroid
Copy link
Contributor

The information in the link I provided:

By default conda now prefers packages from a higher priority channel over any version from a lower priority channel. Therefore you can now safely put channels at the bottom of your channel list to provide additional packages that are not in the default channels, and still be confident that these channels will not override the core package set.

.. still applies fully to your use case, you are just specifying the channels in a different place and with slightly different semantics (but the order is specifying the priority to the best of my knowledge). From the link you provided:

The default channels can be excluded by adding nodefaults to the list of channels. This is equivalent to passing the --override-channels option to most conda commands. Adding nodefaults to the list of channels in environment.yml is similar to removing defaults from the channels list in the .condarc file, although changing environment.yml only affects one of your conda environments and changing .condarc affects them all.

@mcg1969 and @kalefranz will be able to correct me if I'm wrong here.

@spk83
Copy link

spk83 commented Jan 18, 2017

but the order is specifying the priority to the best of my knowledge 👍
I reached to the same assumption based on reading docs. #1679 (comment)

Was expecting docs to assert that deduction. If a member can confirm this, happy to update the docs.

@kalefranz
Copy link
Contributor

Wow. I didn't realize nodefaults existed. I don't think that's been accurate since at least conda 4.2, if not earlier. If you don't want defaults, just remove it from your channel list in your condarc file.

@kalefranz
Copy link
Contributor

This issue dates to 2015. I think the original problem here has been solved.

@kalefranz
Copy link
Contributor

Oh nodefaults is a conda-env feature, not conda. It might still exist. Confirmed, looks like there is special code specifically for conda-env environment.yml.

@github-actions
Copy link

Hi there, thank you for your contribution to Conda!

This issue has been automatically locked since it has not had recent activity after it was closed.

Please open a new issue if needed.

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Oct 23, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity
Projects
None yet
Development

No branches or pull requests

6 participants