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

Incompatible with older OSes (RHEL6) #32

Closed
pelson opened this issue Jun 23, 2016 · 18 comments
Closed

Incompatible with older OSes (RHEL6) #32

pelson opened this issue Jun 23, 2016 · 18 comments

Comments

@pelson
Copy link
Member

pelson commented Jun 23, 2016

Looks like we are building a matplotlib which doesn't work with older libstdc++:

>>> import matplotlib.contour
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "matplotlib/contour.py", line 16, in <module>
    import matplotlib._contour as _contour
ImportError: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by matplotlib/_contour.so)
ldd lib/python2.7/site-packages/matplotlib/_contour.so                                      
    linux-vdso.so.1 =>  (0x00007ffc59738000)
    libpython2.7.so.1.0 => /.../lib/python2.7/site-packages/matplotlib/../../../libpython2.7.so.1.0 (0x00007ff8d0eea000)
    libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007ff8d0bbb000)
    libm.so.6 => /lib64/libm.so.6 (0x00007ff8d0937000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007ff8d0721000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff8d0503000)
    libc.so.6 => /lib64/libc.so.6 (0x00007ff8d016f000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007ff8cff6b000)
    libutil.so.1 => /lib64/libutil.so.1 (0x00007ff8cfd67000)
    /lib64/ld-linux-x86-64.so.2 (0x0000003998e00000)
ls -ltr /usr/lib64/libstdc++.s*                                                                                                      
-rwxr-xr-x. 1 root root 825480 Jun 28  2010 /usr/lib64/libstdc++.so.5.0.7
lrwxrwxrwx. 1 root root     18 Oct 31  2011 /usr/lib64/libstdc++.so.5 -> libstdc++.so.5.0.7
-rwxr-xr-x  1 root root 989840 Jun  1  2015 /usr/lib64/libstdc++.so.6.0.13
lrwxrwxrwx  1 root root     19 Aug 28  2015 /usr/lib64/libstdc++.so.6 -> libstdc++.so.6.0.13

This is for a RHEL6 machine.

Ping @jakirkham as I have been out of the loop a little on our compiler choices.

@ocefpaf
Copy link
Member

ocefpaf commented Jun 23, 2016

I am pretty sure that is b/c conda-forge matplotlib is picking up numpy with openblas and in the env libgcc is not being installed. I am getting a lot of similar reports everywhere. We have to either expand our build matrix to bake np_blas or remove conda-forge's numpy.

PS: can you try to install libgcc to confirm that is the same issue? And check which numpy was installed in the env mkl, vanilla, or conda-forge with openblas (which should have installed libgcc with it).

@jakirkham
Copy link
Member

I am pretty sure that is b/c conda-forge matplotlib is picking up numpy with openblas and in the env libgcc is not being installed.

Doubtful. The libraries are pointing to the system directory.

ls -ltr /usr/lib64/libstdc++.s*                                                                                                      
-rwxr-xr-x. 1 root root 825480 Jun 28  2010 /usr/lib64/libstdc++.so.5.0.7
lrwxrwxrwx. 1 root root     18 Oct 31  2011 /usr/lib64/libstdc++.so.5 -> libstdc++.so.5.0.7
-rwxr-xr-x  1 root root 989840 Jun  1  2015 /usr/lib64/libstdc++.so.6.0.13
lrwxrwxrwx  1 root root     19 Aug 28  2015 /usr/lib64/libstdc++.so.6 -> libstdc++.so.6.0.13

This is interesting. So, why are there 2 libstdc++, @pelson?

@ocefpaf
Copy link
Member

ocefpaf commented Jun 23, 2016

Doubtful. The libraries are pointing to the system directory.

That is exactly the issue! The conda versions, which numpy+openblas were compiled with, are not there!!

Using our docker image:

conda install -c conda-forge install matplotlib
python -m "import matplotlib.contour"
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/conda/lib/python3.5/site-packages/matplotlib/contour.py", line 16, in <module>
    import matplotlib._contour as _contour
ImportError: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /opt/conda/lib/python3.5/site-packages/matplotlib/_contour.cpython-35m-x86_64-linux-gnu.so)
conda install libgcc
python -c "import matplotlib.contour"

Success. Or force install numpy with openblas.

@ocefpaf
Copy link
Member

ocefpaf commented Jun 23, 2016

FYI here is the source of the problem (search for numpy in the CircleCI logs of the latest matplotlib build):

numpy-1.10.4 |py27_blas_openblas_201 6.8 MB conda-forge

that installs:

libgcc-5.2.0 | 0 1.1 MB defaults

breaking everything that depends on numpy but somewhow fails to get the conda-forge version later on.

I already reported this in conda-forge/numpy-feedstock#15, but the discussion got derailed. I hope we can fix this soon.

@jakirkham
Copy link
Member

Please see PR ( conda-forge/staged-recipes#855 ), which splits out a libgfortran package for Mac and Linux. The next step would be to make openblas only depend on libgfortran at install time. Thus there would be no libstdc++ pulled in by openblas. If that is the problem, that would solve it cleanly.

@pelson
Copy link
Member Author

pelson commented Jun 23, 2016

Doubtful. The libraries are pointing to the system directory.

Actually the ldd tells us that we are taking libstdc++.so.6 dynamically from the linker PATH, so having a libstdc++ in the prefix would be picked up before that in /usr/lib64, no?

This is interesting. So, why are there 2 libstdc++, @pelson?

I'm on a coorporate machine and it is likely to be stock RHEL6 installation, but could be that it has been modified by our sys-admins (though I doubt it)

breaking everything that depends on numpy but somewhow fails to get the conda-forge version later on.

Nice digging @ocefpaf. Interesting problem - @jakirkham sounds like you might be onto something - let's take a look at doing that and see if we can manoeuvre out of the problem that way. We have a hangout tomorrow and we can asses the likelihood of us fixing the issue in the short term vs. needing to remove the build.

@ocefpaf
Copy link
Member

ocefpaf commented Jun 23, 2016

Nice digging @ocefpaf.

I am receive a torrent of e-mails from IOOS users complaining about our numpy breaking their envs for almost a month now. Sadly I am suffering a big resistance to even discuss the matter here.

@pelson
Copy link
Member Author

pelson commented Jun 23, 2016

our numpy breaking their envs for almost a month now

OK, we will have to take stock and address this. Tomorrow's dev meeting will need to have a decisive solution - the worst solution IMO is to remove numpy, but it most certainly is and option and is definitely on the cards.

@ocefpaf
Copy link
Member

ocefpaf commented Jun 23, 2016

OK, we will have to take stock and address this. Tomorrow's dev meeting will need to have a decisive solution - the worst solution IMO is to remove numpy, but it most certainly is and option and is definitely on the cards.

Thanks @pelson it is good te be heard. I never actively merged anything to "fix my problem." All I asked was for this: to have a voice in the community. I feel I am losing mine here in conda-forge.

@jakirkham
Copy link
Member

@pelson could you please share with @msarahan and myself some more info about this target machine? In particular, it would be nice to know the results of the following commands.

  • gcc --version
  • strings /usr/lib64/libstdc++.so.6 | grep LIB

@jakirkham
Copy link
Member

This would also be good info from you too, @ocefpaf, if you have access to the affected machines or from your users if possible.

@pelson
Copy link
Member Author

pelson commented Jun 24, 2016

$> strings /usr/lib64/libstdc++.so.6 | grep LIB
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.4
GLIBC_2.3.2
GLIBCXX_FORCE_NEW
GLIBCXX_DEBUG_MESSAGE_LENGTH
$ > gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)

@pelson
Copy link
Member Author

pelson commented Jun 24, 2016

$ uname -a

Linux eld118 2.6.32-573.22.1.el6.x86_64 #1 SMP Thu Mar 17 03:23:39 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux

@ocefpaf
Copy link
Member

ocefpaf commented Jun 24, 2016

I don't have access but I do know that most of the users have gcc 4.4.7 or gcc 4.4.8. (That is why I want to pin to 4.4*)

@jakirkham
Copy link
Member

jakirkham commented Jun 24, 2016

So, this PR ( conda-forge/openblas-feedstock#6 ) fixes the import issue that was mentioned with matplotlib.contour above ( with a corresponding version bump build of matplotlib ). Unfortunately, that is the only issue I can reproduce. Could either of you please try this?

Basically, use the binaries from my channel under the dev label to test this. Please let me know what you find.

conda install -c jakirkham/channel/dev openblas matplotlib

Alternatively you can try rebuilding them from source. Just note building OpenBLAS takes ~30mins. Though matplotlib is much faster.

@ocefpaf
Copy link
Member

ocefpaf commented Jun 27, 2016

Fixed in #34

@ocefpaf ocefpaf closed this as completed Jun 27, 2016
@pelson
Copy link
Member Author

pelson commented Jun 27, 2016

Thank you very much to @jakirkham and @ocefpaf for helping to fix this.

$ /downloads/miniconda/bin/python
>>> import matplotlib.contour
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/downloads/miniconda/lib/python2.7/site-packages/matplotlib/contour.py", line 16, in <module>
    import matplotlib._contour as _contour
ImportError: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /downloads/miniconda/lib/python2.7/site-packages/matplotlib/_contour.so)
>>> 

$> /downloads/miniconda/bin/conda update --override-channels -c conda-forge -c defaults matplotlib

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    matplotlib-1.5.1           |      np111py27_4         6.7 MB  conda-forge

The following packages will be UPDATED:

    matplotlib: 1.5.1-np111py27_3 conda-forge --> 1.5.1-np111py27_4 conda-forge

$> /downloads/miniconda/bin/python -c "import matplotlib.contour"

@ocefpaf
Copy link
Member

ocefpaf commented Jun 27, 2016

Thank you very much to @jakirkham and @ocefpaf for helping to fix this.

Thanks @pelson for getting this issue under people's radar. I clearly failed at that. Could you please consider conda-forge/numpy-feedstock#16 as that is the last step for our envs to be re-built.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants