sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.45k stars 481 forks source link

R fails with version `GOMP_4.0' not found #17349

Closed vbraun closed 9 years ago

vbraun commented 10 years ago

Compiling R with gcc 4.9.2 can fail because of OpenMP library version mismatch. This is on the "snapperkob" build bot:

/home/buildbot/build/sage/snapperkob/sage_git/build/local/var/tmp/sage/build/r-3.1.1.p0/src/bin/exec/R: /usr/lib/x86_64-linux-gnu/libgomp.so.1: version `GOMP_4.0' not found (required by /home/buildbot/build/sage/snapperkob/sage_git/build/local/var/tmp/sage/build/r-3.1.1.p0/src/lib/libR.so)
make[6]: *** [all] Error 1
make[6]: Leaving directory `/home/buildbot/build/sage/snapperkob/sage_git/build/local/var/tmp/sage/build/r-3.1.1.p0/src/src/library/tools'
make[5]: *** [R] Error 1
make[5]: Leaving directory `/home/buildbot/build/sage/snapperkob/sage_git/build/local/var/tmp/sage/build/r-3.1.1.p0/src/src/library'
make[4]: *** [R] Error 1
make[4]: Leaving directory `/home/buildbot/build/sage/snapperkob/sage_git/build/local/var/tmp/sage/build/r-3.1.1.p0/src/src'
make[3]: *** [R] Error 1
make[3]: Leaving directory `/home/buildbot/build/sage/snapperkob/sage_git/build/local/var/tmp/sage/build/r-3.1.1.p0/src'
Error building R.

Component: packages: standard

Author: Volker Braun

Branch: d872869

Reviewer: François Bissey

Issue created by migration from https://trac.sagemath.org/ticket/17349

vbraun commented 10 years ago

Branch: u/vbraun/r_fails_with_versiongomp_4_0not_found

vbraun commented 10 years ago

Commit: e3d33ca

vbraun commented 10 years ago

New commits:

e3d33caDisable openmp in binary builds
vbraun commented 10 years ago

Author: Volker Braun

kcrisman commented 10 years ago
comment:4

Hmm, does that mean that anytime anyone uploads a binary for use that one should use SAGE_FAT_BINARY? Or is this necessary in general for any old Sage build?

vbraun commented 10 years ago
comment:5

If you want to share binaries then you should set SAGE_FAT_BINARY=yes unless you know that the processor and os matches.

kcrisman commented 10 years ago
comment:6

Luckily, that is nearly the case with Mac binaries. But I'll keep it in mind.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

d872869Always use out ATLAS
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Changed commit from e3d33ca to d872869

kiwifb commented 9 years ago
comment:8

lgtm

vbraun commented 9 years ago

Reviewer: François Bissey

vbraun commented 9 years ago

Changed branch from u/vbraun/r_fails_with_versiongomp_4_0not_found to d872869

dimpase commented 9 years ago

Changed commit from d872869 to none

dimpase commented 9 years ago
comment:11

On Ubuntu 14.04 ldd will tell you that something is fishy even if Sage (6.8.beta2) builds and passes ptestlong

$ ldd R/lib/libR.so
R/lib/libR.so: /usr/lib/x86_64-linux-gnu/libgomp.so.1: version `GOMP_4.0' not found (required by R/lib/libR.so)
        linux-vdso.so.1 =>  (0x00007fff066ae000)
        libf77blas.so.3 => not found
        libatlas.so.3 => not found
        libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007f8b89e3a000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8b89b34000)
        libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f8b898f8000)
        libreadline.so.6 => /lib/x86_64-linux-gnu/libreadline.so.6 (0x00007f8b896b1000)
        libbz2.so.1 => /lib/x86_64-linux-gnu/libbz2.so.1 (0x00007f8b894a1000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f8b89288000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f8b8907f000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f8b88e7b000)
        libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f8b88c6c000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8b88a4d000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8b88688000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f8b8a7aa000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8b88472000)
        libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f8b88248000)

Sure this does not look like a real bug, but still...

see also https://groups.google.com/d/msg/sage-devel/X_dVGq5gWoo/FiSnIPzO8FEJ

kiwifb commented 9 years ago
comment:12

Replying to @dimpase:

On Ubuntu 14.04 ldd will tell you that something is fishy even if Sage (6.8.beta2) builds and passes ptestlong

$ ldd R/lib/libR.so
R/lib/libR.so: /usr/lib/x86_64-linux-gnu/libgomp.so.1: version `GOMP_4.0' not found (required by R/lib/libR.so)
        linux-vdso.so.1 =>  (0x00007fff066ae000)
        libf77blas.so.3 => not found
        libatlas.so.3 => not found
        libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007f8b89e3a000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8b89b34000)
        libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f8b898f8000)
        libreadline.so.6 => /lib/x86_64-linux-gnu/libreadline.so.6 (0x00007f8b896b1000)
        libbz2.so.1 => /lib/x86_64-linux-gnu/libbz2.so.1 (0x00007f8b894a1000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f8b89288000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f8b8907f000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f8b88e7b000)
        libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f8b88c6c000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8b88a4d000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8b88688000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f8b8a7aa000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8b88472000)
        libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f8b88248000)

Sure this does not look like a real bug, but still...

see also https://groups.google.com/d/msg/sage-devel/X_dVGq5gWoo/FiSnIPzO8FEJ

Have you gone to a sage shell (./sage -sh) before running ldd? It looks suspiciously like LD_LIBRARY_PATH is not set.

dimpase commented 9 years ago
comment:13

Replying to @kiwifb:

Have you gone to a sage shell (./sage -sh) before running ldd? It looks suspiciously like LD_LIBRARY_PATH is not set.

Oops, indeed, you're right. But this means that I can only build Sage on this system using Sage's gcc rather than the system gcc, as libopenmp comes from Sage, and it seems that gcc is the only Sage package it could come from... (Otherwise R won't build without setting SAGE_FAT_BINARY=yes)

kiwifb commented 9 years ago
comment:14

Yes that must means that your system gcc has been deemed inadequate and sage has been built with its own gcc. Is this a problem?

dimpase commented 9 years ago
comment:15

Replying to @kiwifb:

Yes that must means that your system gcc has been deemed inadequate and sage has been built with its own gcc. Is this a problem?

Actually, it's all OK; the system gcc uses system's libopenmp, while Sage's gcc needs a newer version, coming from gcc's spkg. Sorry for barking up the wrong tree.