PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Help please, Problem when compile EMAN
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
ohmyvince



Joined: 06 Dec 2007
Posts: 6

PostPosted: Thu Apr 24, 2008 6:38 am    Post subject: Help please, Problem when compile EMAN Reply with quote

I used the -ql tag when compiling the EMAN program, in the link stage following error would occur:

/usr/bin/ld: CMakeFiles/EM.dir/EMDataA.o: relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC

however, the compiling command for EMDataA.o as followed have already with -fPIC tag their:
pgCC -DEM_EXPORTS -O2 -tp k8-64e -ql -fPIC ...... -o ./EMDataA.o -c /usr/bin/eman_build/em
an/libEM/EMDataA.C


when remove the -ql tag everything goes OK, so I cann't figuring out what's the problem here?

I'm using PGI 7.12, and a workstation equipped with 4 dual-core AMD opteron processors.

Great thanks for your help~

BTW: My link command goes like this:
pgCC -fPIC -O2 -tp k8-64e -ql -shared -Wl,-soname,libEM.so -o ../lib/libEM.so "CMakeFiles/EM.dir/EMDataA.o" ......
Back to top
View user's profile
ohmyvince



Joined: 06 Dec 2007
Posts: 6

PostPosted: Thu Apr 24, 2008 6:44 am    Post subject: Reply with quote

This time I try the -pg tag similarly error happened:
/usr/bin/ld: CMakeFiles/EM.dir/EMDataA.o: relocation R_X86_64_PC32 against `_mcount' can not be used when making a shared object; recompile with -fPIC
Back to top
View user's profile
hongyon



Joined: 19 Jul 2004
Posts: 551

PostPosted: Thu Apr 24, 2008 9:15 am    Post subject: Reply with quote

Hi,

Can you please post the whole lines for both compile and link? Did you add -L in your link line?

Also, please add -v for both cases, with and without -ql(or -pg), and post their output here.

Thank you,
Hongyon
Back to top
View user's profile
ohmyvince



Joined: 06 Dec 2007
Posts: 6

PostPosted: Thu Apr 24, 2008 6:27 pm    Post subject: Reply with quote

hi~ hongyon:

It's a automatic building process so,

The link command line:
/usr/bin/ld /usr/lib64/crti.o /home/eman/opt/pgi712/linux86-64/7.1-2/libso/trace_init.o /home/eman/opt/pgi712/linux86-64/7.1-2/libso/init_pgpf.o -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 /home/eman/opt/pgi712/linux86-64/7.1-2/lib/pgi.ld -L/home/eman/bin/fftw-2.1.5/lib -L/home/eman/bin/gsl-1.9/lib -L/home/eman/bin/hdf5-1.6.3/lib -L/home/eman/bin/mpich-1.2.7p1/lib -L/home/eman/opt/pgi712/linux86-64/7.1-2/libso -L/home/eman/opt/pgi712/linux86-64/7.1-2/lib -L/usr/lib64 -soname libEM.so CMakeFiles/EM.dir/EMDataA.o CMakeFiles/EM.dir/EMDataB.o CMakeFiles/EM.dir/EMDataC.o CMakeFiles/EM.dir/Euler.o CMakeFiles/EM.dir/Quaternion.o CMakeFiles/EM.dir/XYData.o CMakeFiles/EM.dir/VolFrag.o CMakeFiles/EM.dir/Cylinder.o CMakeFiles/EM.dir/List.o CMakeFiles/EM.dir/Vect.o CMakeFiles/EM.dir/VolTable.o CMakeFiles/EM.dir/EMIcos.o CMakeFiles/EM.dir/EMVtk.o CMakeFiles/EM.dir/hyper.o CMakeFiles/EM.dir/util.o CMakeFiles/EM.dir/EMHist.o CMakeFiles/EM.dir/EMPif.o CMakeFiles/EM.dir/EMhdf.o CMakeFiles/EM.dir/EMhdf2.o CMakeFiles/EM.dir/emobject.o CMakeFiles/EM.dir/GatanDM3.o CMakeFiles/EM.dir/EMem.o CMakeFiles/EM.dir/eulerroutines.o CMakeFiles/EM.dir/byteorder.o CMakeFiles/EM.dir/commonLroutines.o -lsfftw -lsrfftw -lgsl -lgslcblas -lm -lhdf5 -lz -Bstatic -lpmpich++ -Bdynamic -lpng -ltiff -ljpeg -rpath /home/eman/bin/fftw-2.1.5/lib:/home/eman/bin/gsl-1.9/lib:/home/eman/bin/hdf5-1.6.3/lib:/home/eman/bin/mpich-1.2.7p1/lib -rpath /home/eman/opt/pgi712/linux86-64/7.1-2/libso -rpath /home/eman/opt/pgi712/linux86-64/7.1-2/lib -o ../lib/libEM.so -shared -lpgnod_prof_g -lstd -lC -lnspgc -lpgc -lm /usr/lib64/crtn.o

The compile command line:
/home/eman/opt/pgi712/linux86-64/7.1-2/bin/pgcpp1 --llalign --no_warnings -Dunix -D__unix -D__unix__ -Dlinux -D__linux -D__linux__ -D__NO_MATH_INLINES -D__x86_64__ -D__LONG_MAX__=9223372036854775807L '-D__SIZE_TYPE__=unsigned long int' '-D__PTRDIFF_TYPE__=long int' -D__THROW= -D__extension__= -D__amd64__ -D__SSE__ -D__MMX__ -D__SSE2__ -D__SSE3__ -D__PGI -I/home/eman/eman_build/eman -I/home/eman/eman_build/eman/libEM -I/home/eman/bin/fftw-2.1.5/include -I/home/eman/bin/gsl-1.9/include -I/home/eman/bin/hdf5-1.6.3/include -I/home/eman/bin/mpich-1.2.7p1/include -DEM_EXPORTS -D__PIC__ -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DHAVE_FSEEKO -DHAVE_FTELLO -DDUMBPAR -DFILESERVER -DHAVE_SYS_POLL_H -DFILELOCK -DTIF -DHDF5 -DPNG -I/home/eman/opt/pgi712/linux86-64/7.1-2/include/CC -I/home/eman/opt/pgi712/linux86-64/7.1-2/include -I/usr/local/include -I/usr/lib/gcc/x86_64-redhat-linux/3.4.6/include -I/usr/include -q -o /tmp/pgCC-w9h9Ru1HdfF.il /home/eman/eman_build/eman/libEM/EMDataA.C

Thanks for your help!
Back to top
View user's profile
hongyon



Joined: 19 Jul 2004
Posts: 551

PostPosted: Fri Apr 25, 2008 1:23 pm    Post subject: Reply with quote

Hi,

Unfortunately, this seem to be a bug or a feature we need to add.

I have filed a TPR#14852 for this. We will keep you posted of its progress.

Thank you for for reporting to us.
Hongyon
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
Goto page 1, 2, 3  Next
Page 1 of 3

 
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