PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

PGIv12.6 unable to compile using -Bstatic on RHEL6.2

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



Joined: 15 Sep 2005
Posts: 25

PostPosted: Wed Aug 01, 2012 1:41 pm    Post subject: PGIv12.6 unable to compile using -Bstatic on RHEL6.2 Reply with quote

On a RHEL 6.2 system here's what happens.
Simple dummy code:
Code:
int main(int argc, char **argv)
{
   return 0;
}


PGI 10.9 works:
Code:
(35%) pgcc -V

pgcc 10.9-0 64-bit target on x86-64 Linux -tp nehalem-64
Copyright 1989-2000, The Portland Group, Inc.  All Rights Reserved.
Copyright 2000-2010, STMicroelectronics, Inc.  All Rights Reserved.
(36%) pgcc -Bstatic -o foo foo.c
(37%) ./foo


PGI 12.6 fails:
Code:
(39%) pgcc -V

pgcc 12.6-0 64-bit target on x86-64 Linux -tp sandybridge
Copyright 1989-2000, The Portland Group, Inc.  All Rights Reserved.
Copyright 2000-2012, STMicroelectronics, Inc.  All Rights Reserved.

(40%) pgcc -Bstatic -o foo foo.c
/usr/lib64/libpthread.a(libpthread.o): In function `sem_open':
(.text+0x760d): warning: the use of `mktemp' is dangerous, better use `mkstemp'
/usr/bin/ld: dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in `/usr/lib64/libc.a(strcmp.o)' can not be used when making an executable; recompile with -fPIE and relink with -pie
Back to top
View user's profile
mkcolg



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

PostPosted: Thu Aug 02, 2012 8:44 am    Post subject: Reply with quote

Hi David,

This appears to be a bug in binutils (see: https://bugzilla.redhat.com/show_bug.cgi?id=785399 and https://bugzilla.redhat.com/show_bug.cgi?id=606830) and it's not yet clear to us how to effectively work around this issue. Hence, in the time being, please use the flag "-Bstatic_pgi" to statically link the PGI libraries but not the system libraries.

Thanks,
Mat
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