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

import xgboost OSError:version `GOMP_4.0' not found #1786

Closed
yinshurman opened this issue Nov 18, 2016 · 15 comments
Closed

import xgboost OSError:version `GOMP_4.0' not found #1786

yinshurman opened this issue Nov 18, 2016 · 15 comments

Comments

@yinshurman
Copy link

yinshurman commented Nov 18, 2016

For bugs or installation issues, please provide the following information.
The more information you provide, the more easily we will be able to offer
help and advice.

Environment info

compiled successfully,
anaconda envirnment ,
and use "conda list" can show "xgboost " .

but when import xgboost show the error: OSError: /home/yin/anaconda3/bin/../lib/libgomp.so.1: version `GOMP_4.0' not found (required by /home/yin/anaconda3/lib/python3.5/site-packages/xgboost-0.6-py3.5.egg/xgboost/libxgboost.so)

Operating System: Ubunutu kylin 16.10

Compiler:

Package used (python/R/jvm/C++): python

xgboost version used: latest

If installing from source, please provide

  1. The commit hash (git rev-parse HEAD)
  2. Logs will be helpful (If logs are large, please upload as attachment).

OSError: /home/yin/anaconda3/bin/../lib/libgomp.so.1: version `GOMP_4.0' not found (required by /home/yin/anaconda3/lib/python3.5/site-packages/xgboost-0.6-py3.5.egg/xgboost/libxgboost.so)

If you are using python package, please provide:

anaconda

  1. The python version and distribution: python 3.5.2
  2. The command to install xgboost if you are not installing from source

If you are using R package, please provide

  1. The R sessionInfo()
  2. The command to install xgboost if you are not installing from source

Steps to reproduce

What have you tried?

1.rebuild the xgboost,doesnt work

@AbdealiLoKo
Copy link
Contributor

How are you rebuilding xgboost ?
Did you do a make clean_all and followed by make -j ?

@yinshurman
Copy link
Author

hello,thanks for your cares,the problem has been resolved.the key point is that i installed anaconda and the libgomp.so.1 and libstdc++.so.6 file in anaconda seems out of time,lacking GOMP_4.0 and some other files,but in Ubuntu 16.04 the corresponding files is new enough ,the solution is to make some link files to update the corresponding files in anaconda

@AbdealiLoKo
Copy link
Contributor

Ah, awesome. Do close the issue so that it doesn't come up as unresolved

On 21-Nov-2016 11:57 am, "yinshurman" notifications@github.com wrote:

hello,thanks for your cares,the problem has been resolved.the key point is
that i installed anaconda and the libgomp.so.1 and libstdc++.so.6 file in
anaconda seems out of time,lacking GOMP_4.0 and some other files,but in
Ubuntu 16.04 the corresponding files is new enough ,the solution is to make
some link files to update the corresponding files in anaconda


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#1786 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACGUp9c5d-t8t-87qfMLYoJTk5cfW4_rks5rATnYgaJpZM4K2Gx1
.

@BaljeetSinghCheema
Copy link

@yinshurman would you mind posting the solution steps!
thanx in advance

@yinshurman
Copy link
Author

yinshurman commented Nov 27, 2016

step 1 : use the following commands to check whether the libgomp.so.1 file in anconda contains the required version GOMP_4.0 (replace the path by your own in all the steps) :
strings /home/yin/anaconda3/bin/../lib/libgomp.so.1 |grep GOMP ( if there is not GOMP_4.0 version ,go to step 2, else leave a comment )
step 2: to check libgomp.so.1 in your OS:
sudo find / -name libgomp.so.1*
step3: check the link in anaconda :
ls -al /home/yin/anaconda3/bin/../lib/libgomp.so.1 if the link not link to the newest verison in step 2 's list , then make a new link to update it by:
sudo rm -rf /home/yin/anaconda3/bin/../lib/libgomp.so.1
sudo ln -s <path of the newest version libgomp file in your OS > <path in anaconda>
(for example sudo ln -s /usr/.../libgomp.so.XXX /home/yin/anaconda3/bin/..libgomp.so.1 )
ps:without my computer at hands,I can't remember the concrete path ,but this method resolve my problems,in fact ,in my case, not only GOMP_4.0 but also some other files are not found(for example,this https://github.com/dmlc/xgboost/issues/1700 ), this solution works well too.

@BaljeetSinghCheema
Copy link

BaljeetSinghCheema commented Nov 27, 2016

It worked. Thank you so much @yinshurman

@AkashDevgun
Copy link

@yinshurman ....can you please tell me step by step i am not find out the solution for the following error:

import xgboost
SError: /home/akash/anaconda2/bin/../lib/libgomp.so.1: version `GOMP_4.0' not found (required by /home/akash/anaconda2/lib/python2.7/site-packages/xgboost/./lib/libxgboost.so

@datorse
Copy link

datorse commented Feb 9, 2017

Yes it works. These steps perfectly worked for libeemd and pyeemd package. Thanks

@jiqiujia
Copy link

jiqiujia commented May 5, 2017

Is there any way to update the libgomp lib in anaconda
After I make a symbolic file to a system one, it instead report an error about libstdc++.so.6.

@yinshurman
Copy link
Author

Maybe you can try conda install libgcc ,which can resolve the problems like this,too @jiqiujia

@jiqiujia
Copy link

jiqiujia commented May 5, 2017

@yinshurman Thanks a lot. It works!

@jxlijunhao
Copy link

@yinshurman Thanks a lot. It works

@gyang274
Copy link

gyang274 commented Jul 23, 2017

I experienced a similar issue, fixed it by updating the anaconda gcc from 4.8.5 to 5.4.0:

conda install -c salford_systems gcc-5

@Grumby
Copy link

Grumby commented Aug 13, 2017

@yinshurman I had problems with libgomp.so.1 and libstdc++.so.6 and it worked for both. Thank you.

@datamove
Copy link

datamove commented Oct 27, 2017

`GOMP_4.0' not found
This is an error due to mismatch of versions xgboost was built with and versions in the conda environment whcih xgboost uses to at runtime.
The easiest way to solve the problem and not break anything is to build xgboost explicitly with conda's libraries, for which the following needs to be done:

  1. Start a fresh terminal
    export LD_LIBRARY_PATH=~/work/anaconda3/lib #or whatever your anaconda install path is
  2. make sure your default python is from anaconda distro:
    which python
    If not, add anaconda distro to PATH:
    export PATH=~/work/anaconda3/bin:$PATH
  3. Rebuild and reinstall xgboost
    cd ~/xgboost
    make clean_all
    make -j4
    cd python-package
    python setup.py install
  4. verify

you can now close the terminal, and start a new one, LD_LIBRARY_PATdoes not need to persist, as conda's env. got required libraries.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants