PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

multiple definition of 'pgf90_show_

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
libellule



Joined: 09 Jun 2006
Posts: 3

PostPosted: Fri Jun 09, 2006 2:14 am    Post subject: multiple definition of 'pgf90_show_ Reply with quote

Hello
I have a compilation probleme (ld) with the pgf90 library (libpgf90.a)
there are multiple definition of `pgf90_show_', first in dbug90.o and second in dbug90.
What can i do ?
Tank you for your help


/usr/bin/ld -Bstatic --export-dynamic -shared /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/crtbegin.o\
-m elf_i386 -dynamic-linker /lib/ld-linux.so.2 C/Mt3d_API.o C/PyMt3d.o F90/mt3d_defdataset.o F90/mt3d_dt.o F90/mt3d_get_conc.o F90/mt3d_get_diffusion.o F90/mt3d_get_perm.o F90/mt3d_go_step.o F90/mt3d_headadaption.o F90/mt3d_initialize1.o F90/mt3d_initialize.o F90/mt3d_iterate.o F90/mt3d_run.o F90/mt3d_set_boundarycondition.o F90/mt3d_set_conc.o F90/mt3d_set_diffusion.o F90/mt3d_set_mesh.o F90/mt3d_set_porosity.o F90/mt3d_set_source.o F90/mt3d_stop.o F90/mt3d_temps.o \
--whole-archive /usr/local/PGI/current/linux86/6.1/lib/libpgf90.a --no-whole-archive /usr/local/PGI/current/linux86/6.1/lib/libpgf90_rpm1.a /usr/local/PGI/current/linux86/6.1/lib/libpgf902.a /usr/local/PGI/current/linux86/6.1/lib/libpgf90rtl.a /usr/local/PGI/current/linux86/6.1/lib/libpgftnrtl.a /usr/local/PGI/current/linux86/6.1/lib/libpgc.a /usr/local/PGI/current/linux86/6.1/lib/libpghpf.a -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.2 \
./F90/Banque/libMt3d.a -lpgf90 -lpgf90_rpm1 -lpgf902 -lpgf90rtl -lpgftnrtl -lpgc -lgcc -lgcc ../../../../ALLIANCES_ROOT/ALLIANCES/src/Mt3d/F90/libpgnod_prod/libpgnod_prof.a\
\
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/crtendS.o \
/usr/lib/crtn.o \
-lpgf90 -lpgf90_rpm1 -lpgf902 -lpgf90rtl -lpgftnrtl \
-L/usr/local/PGI/current/linux86/6.1/lib\
-lnspgc -lpgc -lgcc -Bdynamic -lc -lm \
-o PyMt3d.so; \
else \
exit $status ; \
fi ; \
fi;\
fi
/usr/local/PGI/current/linux86/6.1/lib/libpgf90.a(dbugf90.o)(.text+0x150): In function `pgf90_show_':
: multiple definition of `pgf90_show_'
/usr/local/PGI/current/linux86/6.1/lib/libpgf90.a(dbug.o)(.text+0xbe0): first defined here
ld: Warning: size of symbol `pgf90_show_' changed from 330 to 407 in /usr/local/PGI/current/linux86/6.1/lib/libpgf90.a(dbugf90.o)
/usr/local/PGI/current/linux86/6.1/lib/libpgf90.a(dbugf90.o)(.text+0x150): In function `pgf90_show_':
: multiple definition of `pgf90_show_'
/usr/local/PGI/current/linux86/6.1/lib/libpgf90.a(dbug.o)(.text+0xbe0): first defined here
/usr/bin/ld: Warning: size of symbol `pgf90_show_' changed from 330 to 407 in /usr/local/PGI/current/linux86/6.1/lib/libpgf90.a(dbugf90.o)
make[4]: [PyMt3d.so] Error 1 (ignored)
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6119
Location: The Portland Group Inc.

PostPosted: Fri Jun 09, 2006 3:27 pm    Post subject: Reply with quote

Hi libellule,

Since you use the "--whole-archive" flag, the linker is adding all of libpgf90.a's symbols into your application. So when it gets the the second and third instance of libpgf90 you have on the link line (-lpgf90), the linker already has a definition for "pgf90_show". It should work if you remove the two "-lpgf90" flags.

Hope this helps,
Mat
Back to top
View user's profile
libellule



Joined: 09 Jun 2006
Posts: 3

PostPosted: Mon Jun 12, 2006 1:09 am    Post subject: Reply with quote

mkcolg wrote:
Hi libellule,

Since you use the "--whole-archive" flag, the linker is adding all of libpgf90.a's symbols into your application. So when it gets the the second and third instance of libpgf90 you have on the link line (-lpgf90), the linker already has a definition for "pgf90_show". It should work if you remove the two "-lpgf90" flags.

Hope this helps,
Mat


Hi Mat,
Thank you for your answere
When , i remove the two "-lpgf90" flag, there are always a problem.
It's only if i remove the "--whole-archive" flag, that it's work. But there is a problem, after in the run. there are "undefined reference".
Bye
Libellule
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling 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