PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Problem with libraries and ld in 64 bit machine

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Licenses and Installation
View previous topic :: View next topic  
Author Message
illhuicac



Joined: 16 Feb 2006
Posts: 2

PostPosted: Wed Sep 08, 2010 11:44 am    Post subject: Problem with libraries and ld in 64 bit machine Reply with quote

I am trying to compile a simple helloworld fortran program with pgi 10.8 on a gentoo 64 bit machine and trying to compile a 64bit binary (pgf90 -m64 hello.f) I get the following error message:

/usr/bin/ld: skipping incompatible /usr/lib32/librt.so when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/lib32/librt.a when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/lib32/libpthread.so when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib32/libpthread.a when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib32/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib32/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib32/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib32/libc.a when searching for -lc
/usr/bin/ld: i386 architecture of input file `/usr/lib32/crt1.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `/usr/lib32/crti.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `/usr/lib32/crtn.o' is incompatible with i386:x86-64 output
/usr/bin/ld: final link failed: Invalid operation

glibc version: 2.11.2
gcc version: 4.4.3
localrc:
set LFC=-lgfortran;
set LDSO=/lib64/ld-linux-x86-64.so.2;
set GCCDIR=/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3;
set GCCINC=/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/include;
set G77DIR=/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/;
set OEM_INFO=64-bit target on x86-64 Linux $INFOTPVAL;
set LOCALRC=YES;
set THROW=__THROW=;
set EXTENSION=__extension__=;
set LC=$if(-Bstatic,-lgcc -lgcc_eh -lc -lgcc -lgcc_eh -lc, -lgcc -lc -lgcc);
# GLIBC version 2.11.2
# GCC version 4.4.3
set GCCVERSION=40403;
set DEFLIBDIR=/usr/lib32;
set DEFSTDOBJDIR=/usr/lib32;
export PGI=/usr/local/pgi;
# makelocalrc executed by root Wed Sep 8 12:31:08


Any ideas what might be wrong? Thanks for any help
Back to top
View user's profile
illhuicac



Joined: 16 Feb 2006
Posts: 2

PostPosted: Wed Sep 08, 2010 2:58 pm    Post subject: Reply with quote

OK, I was able to figure out what the problem was. This was very tricky.

1) I installed pgi2010(v10.8) with installation script. No complains or messages at any step.

2) I modified /usr/local/pgi/linux86-64/10.8/bin/localrc

from (as was set by the installation script)
set DEFLIBDIR=/usr/lib32;
set DEFSTDOBJDIR=/usr/lib32;

to

set DEFLIBDIR=/usr/lib;
set DEFSTDOBJDIR=/usr/lib;

Now pgf90 works fine for the helloworld program. It compiles producing both 64 bit and 32 bit code(pgf90 -m32)
Back to top
View user's profile
mkcolg



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

PostPosted: Thu Sep 09, 2010 3:01 pm    Post subject: Reply with quote

Hi illhuicac,

We don't test installations on Gentoo but there's obviously something unique that's causing the installer find the wrong library directory. I've added a technical problem report (TPR#17221) for the issue. We should be able to install Gentoo here and determine the problem.

Which version of Gentoo are you using?

Thanks,
Mat
Back to top
View user's profile
tonycurtis



Joined: 12 May 2009
Posts: 6

PostPosted: Thu Oct 07, 2010 6:06 pm    Post subject: Reply with quote

Just had the same issue here, x86_64 machine. Suggested fix worked.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Licenses and Installation 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