Page 1 of 1

Mageia 3 gfortran newly broken?

PostPosted: Aug 5th, '14, 11:52
by ihowarth
I have some fortran code (sorry, i know, but i'm an old dog, and the code's too big to start rewriting now...) that's compiled and run without problems -- until today. It now crashes with the error message
Code: Select all
symbol lookup error: /lib64/libgfortran.so.3: undefined symbol: get_mem

Thinking this might have something to do with a recent rpm update (didn't gcc get updated yesterday?), i tried to recompile, but got what i guess is essentially the same error at the link stage:
Code: Select all
 /usr/lib/gcc/x86_64-mageia-linux-gnu/4.7.2/libgfortran.so: undefined reference to `get_mem'

I've uninstalled and reinstalled gfortran, to no avail.

I'm kinda stuck...i can't recompile, and previously compiled versions (from backups) break in the same way. I'll be upgrading to Mageia 4 any day now, but don't want to do that until this is sorted out (one problem at a time...)
Anyone got any ideas? Just a bug report, or is it user error?

Thanks,
ian

p.s. is there a simple way to determine which rpms have recently been updated - to try out a roll-back to earlier versions?

Re: Mageia 3 gfortran newly broken?

PostPosted: Aug 5th, '14, 12:02
by jiml8
You have a library version discrepancy. If you just had a gcc upgrade, not everything got upgraded.

Go to Mageia control center, choose the install and remove software option, make sure you are looking at all packages, and enter fortran in the search box. You will see what you have installed, and what could be upgraded. Select the appropriate packages to install, and that should fix you up.

Re: Mageia 3 gfortran newly broken?

PostPosted: Aug 5th, '14, 12:08
by ihowarth
hi jim, thanks for the fast advice...i've already checked that gfortran is up to date. I attempted to uninstall and reinstall libgfortran, but uninstalling it with the gui tool requires uninstalling a lot of other stuff that depends on it, but in any case it looks like the versions are in sync:

>> rpm -qa | grep fort
libgfortran3-4.7.2-8.2.mga3
gcc-gfortran-4.7.2-8.2.mga3

Re: Mageia 3 gfortran newly broken?

PostPosted: Aug 5th, '14, 12:18
by ihowarth
Oh, looks like nothing works :(

Code: Select all
      print *, 'Hello world'
      end


Code: Select all
>> gfortran test.f
/usr/lib/gcc/x86_64-mageia-linux-gnu/4.7.2/libgfortran.so: undefined reference to `get_mem'

Re: Mageia 3 gfortran newly broken?

PostPosted: Aug 5th, '14, 22:12
by doktor5000
You can have a look at https://wiki.mageia.org/en/Underlinking ... _packaging to maybe help you understand the issue, it's more about C but could be helpful.

Here's an example oneliner to find the library that contains those undefined references - although for your case you may need to adjust the path.

Code: Select all
symbol=eglGetProcAddress
for f in /usr/lib/*.so.*; do objdump -t -T $f | grep $symbol | grep -v '*UND*' && echo $f; done


Although this post seems to suggest it may also be some fortran issue: http://www.unidata.ucar.edu/mailing_lis ... 00177.html