microsoft / microsoft-r-open

Microsoft R Open Source
213 stars 69 forks source link

Installation complete, but fail to start R #30

Closed mushthofa closed 5 years ago

mushthofa commented 7 years ago

I previously installed MRO with MKL on my Ubuntu 17.04. I then removed it, and now I wanted to install it again. I encounter the problem in the previously-reported issue: https://github.com/Microsoft/microsoft-r-open/issues/21 , but I could then install by force-removing the previous installation and removing the folder /usr/lib64/microsoft-r/3.4. So, then the installation went without any trouble, but when I try to start R, I get:

R version 3.4.0 (2017-04-21) -- "You Stupid Darkness"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
....
caught segfault ***
address 0x38, cause 'memory not mapped'

Traceback:

 1: dyn.load(libPath)
 2: doTryCatch(return(expr), name, parentenv, handler)
 3: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 4: tryCatchList(expr, classes, parentenv, handlers)
...
(long messages)
...
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection: 2

Removing and reinstalling doesn't help. Any advice?

mushthofa commented 7 years ago

If I uninstall MKL, and only install MRO and foreachiterators, R runs, but of course without performance enhancement. As soon as I install MKL, I get the problem again. BTW, without MKL, I also receive a warning:

In doTryCatch(return(expr), name, parentenv, handler) :
  unable to load shared object '/usr/lib64/microsoft-r/3.4/lib64/R/modules//R_X11.so':
  libpng12.so.0: cannot open shared object file: No such file or directory

but otherwise, R is working.

ghost commented 7 years ago

I have the exact same issue, running under Ubuntu 17.04

ghost commented 7 years ago

Correction--I /had/ this issue but solved it via

sudo ln -s libudev.so /lib/x86_64-linux-gnu/libudev.so.0
sudo ln -s libpng16.so /usr/lib/x86_64-linux-gnu/libpng12.so.0

as per https://askubuntu.com/questions/838965/where-can-i-find-package-libpng12-so-0

scottstanfield commented 7 years ago

Same here. Upgraded from 16.04 to 17.04 (server version) Removed MRAN 3.3 per instructions Installed MRAN 3.4 R fails to launch (coredump) due to missing libpng12.so.0

Workaround:

cd /usr/lib/x86_64-linux-gnu
sudo ln -s libpng16.so.16 /usr/lib/x86_64-linux-gnu/libpng12.so.0

What a headache. I can't believe this fixed it.

scottstanfield commented 6 years ago

Your future self will thank you

I just ran in to this same problem...Googled it, hit the page, read the last comment...then realized I wrote it just 3 months ago. It still works. So, thank you, past-self.

Also, you can see what, if any, libpng packages you have with ldconfig -p | grep libpng.

scottstanfield commented 6 years ago

This is the 3rd time I've had this issue, forgot I found the solution here, then wrote a note to my future self, only to find this issue again.

We need a decent SEO name for this concept. Since it's a bug that seems cyclical, I'll call it a cicada, the small, jumping bug whose larvae lay dormant underground, only to emerge when you're trying to get stuff done. Like install R on an Ubuntu 17 LTS instance on AWS.

The esteemed Sir Richard Attenborough narrates a nightmarish BBC segment following the emergence of this fascinating dormant symbolic link.

Here's how you too can pin a cicada bug to an issue. Just file an issue, stick the word cicada in it. Then in the future, just google your name + cicada and boom. It's a high entropy word, so even if your name is common, you'll likely find the issue again.

image

mushthofa commented 6 years ago

@scottstanfield : I wonder if at this point you should just bookmark this page :grin:

scottstanfield commented 6 years ago

I thought of that: I could star or follow this page. But I think if I spent a lot of time researching cicadas, I would mentally wire this crazy R core dump to the this horrible but cute little creature...then I'd remember to search for "Stanfield Cicada".

Ironically, this has triggered another thing I can't seem to remember: the ordering of ln parameters. It seems I get dyslexic with the ordering.

scottstanfield commented 6 years ago

Ran into this again. It's August 28, 2018. I remembered the Google search term stanfield cicada which brought me right back here.

Steps to repro on Ubuntu 18.04

wget https://mran.blob.core.windows.net/install/mro/3.5.1/microsoft-r-open-3.5.1.tar.gz
tar xvf $_
cd microsoft-r-open
sudo ./install.sh --accept-mkl-eula --unattended
R
[core ignominiously dumped]

And since the last post, I actually work for Microsoft now, so maybe I can get this fixed. It'll be the hill I die on.

jeroenterheerdt commented 5 years ago

For what is worth, there is a note on the (MRO installation page)[https://mran.microsoft.com/documents/rro/installation] about it:

On Ubuntu 18.04, you must also install libpng12 from the Linux Kernel archives, as it is no longer part of the Ubuntu distribution, as follows:

wget https://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb
dpkg -i libpng12-01_1.2.54-1ubuntu1_amd64.deb
scottstanfield commented 5 years ago

Under clean install of server-based Ubuntu 19.04 (kernel 5.0) with MRAN 3.5.3 "Great Truth" install successful but R fails to run due to a similar missing library.

% R
/opt/microsoft/ropen/3.5.3/lib64/R/bin/exec/R: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

Workaround:

cd /usr/lib/x86_64-linux-gnu
sudo ln -s libtinfo.so.6 libtinfo.so.5

Curious as to where the reference to libtinfo is coming from (it's a low-level terminal library for ncurses):

moana lib64/R/lib » pwd
/opt/microsoft/ropen/3.5.3/lib64/R/lib
moana lib64/R/lib » ldd libR.so
        [snip]
        libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007fb235876000)
moana lib64/R/lib »
scottstanfield commented 5 years ago

Opened a new issue #102 since this is related to libtinfo.so.5 instead of the libpng