gfortran fails to build and link programs giving the error: /usr/lib/gcc/x86_64-mageia-linux-gnu/4.7.2/libgfortran.so: undefined reference to `get_mem' collect2: error: ld returned 1 exit status To reproduce: cat << EOF > hello.f PROGRAM TEST WRITE(*,*) "Hello world!" END EOF gfortran -o hello hello.f Reproducible: Steps to Reproduce:
For the record, this works fine with gcc-4.9 in Mageia Cauldron
URL: (none) => https://forums.mageia.org/en/viewtopic.php?f=7&t=8219CC: (none) => tmb
The problem only arose in the latest update. gcc-gfortran-4.7.2-8.1.mga3 worked so it must have been something in the latest patch build which broke the library.
I see this problem too, and it's rather fatal for python-numpy: $ python Python 2.7.6 (default, Jun 28 2014, 19:32:28) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import numpy Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python2.7/site-packages/numpy/__init__.py", line 137, in <module> import add_newdocs File "/usr/lib64/python2.7/site-packages/numpy/add_newdocs.py", line 9, in <module> from numpy.lib import add_newdoc File "/usr/lib64/python2.7/site-packages/numpy/lib/__init__.py", line 13, in <module> from polynomial import * File "/usr/lib64/python2.7/site-packages/numpy/lib/polynomial.py", line 17, in <module> from numpy.linalg import eigvals, lstsq File "/usr/lib64/python2.7/site-packages/numpy/linalg/__init__.py", line 48, in <module> from linalg import * File "/usr/lib64/python2.7/site-packages/numpy/linalg/linalg.py", line 23, in <module> from numpy.linalg import lapack_lite ImportError: /lib64/libgfortran.so.3: undefined symbol: get_mem >>> Hence this will break a huge amount of Python software! Something is seriously wrong with the current fortran library!
CC: (none) => true.bugman
This also breaks the dependencies python-scipy and python-matplotlib: $ python Python 2.7.6 (default, Jun 28 2014, 19:32:28) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import scipy Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python2.7/site-packages/scipy/__init__.py", line 78, in <module> from numpy import show_config as show_numpy_config File "/usr/lib64/python2.7/site-packages/numpy/__init__.py", line 137, in <module> import add_newdocs File "/usr/lib64/python2.7/site-packages/numpy/add_newdocs.py", line 9, in <module> from numpy.lib import add_newdoc File "/usr/lib64/python2.7/site-packages/numpy/lib/__init__.py", line 13, in <module> from polynomial import * File "/usr/lib64/python2.7/site-packages/numpy/lib/polynomial.py", line 17, in <module> from numpy.linalg import eigvals, lstsq File "/usr/lib64/python2.7/site-packages/numpy/linalg/__init__.py", line 48, in <module> from linalg import * File "/usr/lib64/python2.7/site-packages/numpy/linalg/linalg.py", line 23, in <module> from numpy.linalg import lapack_lite ImportError: /lib64/libgfortran.so.3: undefined symbol: get_mem >>> $ python Python 2.7.6 (default, Jun 28 2014, 19:32:28) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import matplotlib Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python2.7/site-packages/matplotlib/__init__.py", line 151, in <module> from matplotlib.rcsetup import (defaultParams, File "/usr/lib64/python2.7/site-packages/matplotlib/rcsetup.py", line 20, in <module> from matplotlib.colors import is_color_like File "/usr/lib64/python2.7/site-packages/matplotlib/colors.py", line 52, in <module> import numpy as np File "/usr/lib64/python2.7/site-packages/numpy/__init__.py", line 137, in <module> import add_newdocs File "/usr/lib64/python2.7/site-packages/numpy/add_newdocs.py", line 9, in <module> from numpy.lib import add_newdoc File "/usr/lib64/python2.7/site-packages/numpy/lib/__init__.py", line 13, in <module> from polynomial import * File "/usr/lib64/python2.7/site-packages/numpy/lib/polynomial.py", line 17, in <module> from numpy.linalg import eigvals, lstsq File "/usr/lib64/python2.7/site-packages/numpy/linalg/__init__.py", line 48, in <module> from linalg import * File "/usr/lib64/python2.7/site-packages/numpy/linalg/linalg.py", line 23, in <module> from numpy.linalg import lapack_lite ImportError: /lib64/libgfortran.so.3: undefined symbol: get_mem >>>
Hm, seems I screwed up the CVE backport... I wonder why the build didn't break :/ I will try and look into this today
Status: NEW => ASSIGNEDAssignee: bugsquad => tmb
Sorry for the delay... Seems I missed one get_mem to xmalloc conversion :/ I've pushed a fix to the buildsystem in gcc-4.7.2-8.3.mga3
Testcase in comment 0 Advisory: The CVE-2014-5044 fix for libgfortran released as MGASA-2014-0306 was incomplete and broke gfortran compiler. This update resolves the issue. SRPM: gcc-4.7.2-8.3.mga3.src.rpm i586: gcc-4.7.2-8.3.mga3.i586.rpm gcc-c++-4.7.2-8.3.mga3.i586.rpm gcc-cpp-4.7.2-8.3.mga3.i586.rpm gcc-doc-4.7.2-8.3.mga3.noarch.rpm gcc-doc-pdf-4.7.2-8.3.mga3.noarch.rpm gcc-gfortran-4.7.2-8.3.mga3.i586.rpm gcc-gnat-4.7.2-8.3.mga3.i586.rpm gcc-java-4.7.2-8.3.mga3.i586.rpm gcc-objc-4.7.2-8.3.mga3.i586.rpm gcc-objc++-4.7.2-8.3.mga3.i586.rpm gcc-plugins-4.7.2-8.3.mga3.i586.rpm gcj-tools-4.7.2-8.3.mga3.i586.rpm libgcc1-4.7.2-8.3.mga3.i586.rpm libgcj13-4.7.2-8.3.mga3.i586.rpm libgcj13-base-4.7.2-8.3.mga3.i586.rpm libgcj13-src-4.7.2-8.3.mga3.i586.rpm libgcj_bc1-4.7.2-8.3.mga3.i586.rpm libgcj-devel-4.7.2-8.3.mga3.i586.rpm libgcj-static-devel-4.7.2-8.3.mga3.i586.rpm libgfortran3-4.7.2-8.3.mga3.i586.rpm libgnat1-4.7.2-8.3.mga3.i586.rpm libgomp1-4.7.2-8.3.mga3.i586.rpm libgomp-devel-4.7.2-8.3.mga3.i586.rpm libitm1-4.7.2-8.3.mga3.i586.rpm libitm-devel-4.7.2-8.3.mga3.i586.rpm libmudflap0-4.7.2-8.3.mga3.i586.rpm libmudflap-devel-4.7.2-8.3.mga3.i586.rpm libobjc4-4.7.2-8.3.mga3.i586.rpm libquadmath0-4.7.2-8.3.mga3.i586.rpm libquadmath-devel-4.7.2-8.3.mga3.i586.rpm libstdc++6-4.7.2-8.3.mga3.i586.rpm libstdc++-devel-4.7.2-8.3.mga3.i586.rpm libstdc++-docs-4.7.2-8.3.mga3.noarch.rpm libstdc++-static-devel-4.7.2-8.3.mga3.i586.rpm x86_64: gcc-4.7.2-8.3.mga3.x86_64.rpm gcc-c++-4.7.2-8.3.mga3.x86_64.rpm gcc-cpp-4.7.2-8.3.mga3.x86_64.rpm gcc-doc-4.7.2-8.3.mga3.noarch.rpm gcc-doc-pdf-4.7.2-8.3.mga3.noarch.rpm gcc-gfortran-4.7.2-8.3.mga3.x86_64.rpm gcc-gnat-4.7.2-8.3.mga3.x86_64.rpm gcc-java-4.7.2-8.3.mga3.x86_64.rpm gcc-objc-4.7.2-8.3.mga3.x86_64.rpm gcc-objc++-4.7.2-8.3.mga3.x86_64.rpm gcc-plugins-4.7.2-8.3.mga3.x86_64.rpm gcj-tools-4.7.2-8.3.mga3.x86_64.rpm lib64gcj13-4.7.2-8.3.mga3.x86_64.rpm lib64gcj_bc1-4.7.2-8.3.mga3.x86_64.rpm lib64gcj-devel-4.7.2-8.3.mga3.x86_64.rpm lib64gcj-static-devel-4.7.2-8.3.mga3.x86_64.rpm libgcc1-4.7.2-8.3.mga3.x86_64.rpm libgcj13-base-4.7.2-8.3.mga3.x86_64.rpm libgcj13-src-4.7.2-8.3.mga3.x86_64.rpm libgfortran3-4.7.2-8.3.mga3.x86_64.rpm libgnat1-4.7.2-8.3.mga3.x86_64.rpm libgomp1-4.7.2-8.3.mga3.x86_64.rpm libgomp-devel-4.7.2-8.3.mga3.x86_64.rpm libitm1-4.7.2-8.3.mga3.x86_64.rpm libitm-devel-4.7.2-8.3.mga3.x86_64.rpm libmudflap0-4.7.2-8.3.mga3.x86_64.rpm libmudflap-devel-4.7.2-8.3.mga3.x86_64.rpm libobjc4-4.7.2-8.3.mga3.x86_64.rpm libquadmath0-4.7.2-8.3.mga3.x86_64.rpm libquadmath-devel-4.7.2-8.3.mga3.x86_64.rpm libstdc++6-4.7.2-8.3.mga3.x86_64.rpm libstdc++-devel-4.7.2-8.3.mga3.x86_64.rpm libstdc++-docs-4.7.2-8.3.mga3.noarch.rpm libstdc++-static-devel-4.7.2-8.3.mga3.x86_64.rpm
Hardware: x86_64 => AllAssignee: tmb => qa-bugs
Edward & Stephen can you test please and report your findings, including your mageia version & arch. Thanks.
I cannot find the packages in any of the "* Updates" or "* Updates Testing" media, or the debugging equivalents. Where do you find these and how do you install them? Cheers!
You'll need to configure your media, please see https://wiki.mageia.org/en/Enabling_the_Testing_media#Enable_them_the_easy_way
That's what I've done, via Drakconf. I have tried enabling: Core Updates Core Updates Debug Core Updates Testing Core Updates Testing Debug Core Backports Core Backports Testing Nonfree Updates Nonfree Updates Testing Tainted Updates Tainted Updates Testing Therefore I can only guess that the packages have not been built/added yet.
You should make sure your mirrors are up-to-date, either through the MCC or using "urpmi.update -a".
CC: (none) => remi
You don't need the Debug medias enabled, you only need to enable Core Updates Testing and set it as an 'update' media. Setting it as an Update media requires the --expert switch as shown on the wiki page. Alternatively you can enable it and use urpmi directly rather than MageiaUpdate to install the packages.
or as root: urpmi.update "Core Updates Testing" && urpmi gcc-gfortran
$ ./depcheck gcc-gfortran Mageia release 3 (Official) for i586 ------------------ Core Release gcc-gfortran-4.7.2-7.mga3 ------------------ Core Updates gcc-gfortran-4.7.2-8.1.mga3 gcc-gfortran-4.7.2-8.2.mga3 ------------------ Core Updates Testing gcc-gfortran-4.7.2-8.3.mga3 ------------------
The command "urpmi.update "Core Updates Testing" && urpmi gcc-gfortran" worked. Anyway, the problem for python-numpy, python-scipy and python-matplotlib is fixed! Cheers!
The FORTRAN code compilation example in Stephen's description also now works on my system.
From comment 3 I'm guessing you are using mga3 64bit Edward?
Correct. And from the just compiled FORTRAN program: $ file hello hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=6e01c3068e533449fcc509e7dc88a829b5333877, not stripped
64 bit works for me now.
Thanks both. I'll check quickly on mga3 32 before validating.
Testing complete mga3 32 with the code from comment 0 Before ------ $ gfortran -o hello hello.f /usr/lib/gcc/i586-mageia-linux-gnu/4.7.2/libgfortran.so: undefined reference to `get_mem' collect2: error: ld returned 1 exit status After ----- $ gfortran -o hello hello.f $ ./hello Hello world!
Whiteboard: (none) => has_procedure mga3-32-ok mga3-64-ok
Validating. Advisory uploaded. Confirmed mga4 is not affected. Could sysadmin please push to updates Thanks
Keywords: (none) => validated_updateWhiteboard: has_procedure mga3-32-ok mga3-64-ok => has_procedure advisory mga3-32-ok mga3-64-okCC: (none) => sysadmin-bugs
An update for this issue has been pushed to Mageia Updates repository. http://advisories.mageia.org/MGAA-2014-0164.html
Status: ASSIGNED => RESOLVEDResolution: (none) => FIXED