undefined reference to debugging symbol when using -g

Hi there,

I have a project which I recently migrated to libtool in order to have a platform compatible generation of the corresponding shared libraries. The project provides a C API and a Fortran 90 API based on the C API. So I would expect a shared library for the C interface and another one for the Fortran 90 interface. Now, I have no problem when building my project asking for the static libraries to be created, however, when asking for the shared libraries to be created, some subsequent files in the project linking with the shared libraries fail with an undefined reference error. An undefined reference to a debugging symbol !

The guilty is:

pgf90 -I../../fortran -g -o .libs/index index.o  ../../fortran/.libs/libmylib_f90.so ../../src/.libs/libmylib.so -lm
index.o:(.debug_info+0x7e9): undefined reference to `..Dm_mylib'

with:

pgf90 7.1-4 32-bit target on x86 Linux -tp core2
GNU ld (GNU Binutils) 2.17.50.20070726-14 (SUSE Linux)

Using ‘nm’ on ‘…/…/fortran/.libs/libmylib_f90.so’ shows something like ‘00005b88 N …Dm_mylib’ as the first symbol. There is no other debugging symbols in the library.

Now, as you might have guessed, I am building my project with the debugging symbols turned on (-g). Turning them off results in a successful build of my project. Building on an AIX machine with xlf90, I have absolutely no problem like that.

So, at this point in time, I have absolutely no clue of what is going on. Anybody has any idea ?

Thank you !

Hi,
This is perhaps is a bug in older release. Please try our release 9.0-x or higher.

Thank you,
Hongyon