PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

undefined reference to debugging symbol when using -g

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Debugging and Profiling
View previous topic :: View next topic  
Author Message
cri.cri



Joined: 23 Oct 2008
Posts: 1

PostPosted: Wed May 19, 2010 8:25 am    Post subject: undefined reference to debugging symbol when using -g Reply with quote

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:

Code:
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:

Code:
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 !
Back to top
View user's profile
hongyon



Joined: 19 Jul 2004
Posts: 551

PostPosted: Tue May 25, 2010 8:20 am    Post subject: Reply with quote

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

Thank you,
Hongyon
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Debugging and Profiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group