Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#17349 closed defect (fixed)

R fails with version `GOMP_4.0' not found

Reported by: vbraun Owned by:
Priority: major Milestone: sage-6.5
Component: packages: standard Keywords:
Cc: Merged in:
Authors: Volker Braun Reviewers: François Bissey
Report Upstream: N/A Work issues:
Branch: d872869 (Commits) Commit:
Dependencies: Stopgaps:

Description

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.

Change History (15)

comment:1 Changed 5 years ago by vbraun

  • Branch set to u/vbraun/r_fails_with_version__gomp_4_0__not_found

comment:2 Changed 5 years ago by vbraun

  • Commit set to e3d33ca4400051107887ffe8ea335815f8b5cba4
  • Status changed from new to needs_review

New commits:

e3d33caDisable openmp in binary builds

comment:3 Changed 5 years ago by vbraun

  • Authors set to Volker Braun

comment:4 Changed 5 years ago by kcrisman

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?

comment:5 Changed 5 years ago by vbraun

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

comment:6 Changed 5 years ago by kcrisman

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

comment:7 Changed 5 years ago by git

  • Commit changed from e3d33ca4400051107887ffe8ea335815f8b5cba4 to d872869fb9331997d484221e3a9d49bc1b9c7b72

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

d872869Always use out ATLAS

comment:8 Changed 5 years ago by fbissey

  • Status changed from needs_review to positive_review

lgtm

comment:9 Changed 5 years ago by vbraun

  • Reviewers set to François Bissey

comment:10 Changed 5 years ago by vbraun

  • Branch changed from u/vbraun/r_fails_with_version__gomp_4_0__not_found to d872869fb9331997d484221e3a9d49bc1b9c7b72
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:11 follow-up: Changed 4 years ago by dimpase

  • Commit d872869fb9331997d484221e3a9d49bc1b9c7b72 deleted

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

comment:12 in reply to: ↑ 11 ; follow-up: Changed 4 years ago by fbissey

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.

comment:13 in reply to: ↑ 12 Changed 4 years ago by dimpase

Replying to fbissey:

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)

Last edited 4 years ago by dimpase (previous) (diff)

comment:14 follow-up: Changed 4 years ago by fbissey

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?

comment:15 in reply to: ↑ 14 Changed 4 years ago by dimpase

Replying to fbissey:

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.

Note: See TracTickets for help on using tickets.