PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

corrupt libstd.a?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Licenses and Installation
View previous topic :: View next topic  
Author Message
Gabor Bunkoczi



Joined: 16 Apr 2009
Posts: 5

PostPosted: Thu Apr 16, 2009 9:49 am    Post subject: corrupt libstd.a? Reply with quote

Hi,

I am evaluating PG C++ compilers with a trial licence, and I am having trouble with anything that requires STL.

e.g. compiling:
#include <iostream>

int main() {
std::cout << "hello world\n";
return 1;
}

results in:
$ pgCC hello.cc
NOTE: your trial license will expire in 14 days, 6.35 hours.
pgCC-Fatal-/usr/bin/ld TERMINATED by signal 11
Arguments to /usr/bin/ld
/usr/bin/ld /usr/lib/crt1.o /usr/lib/crti.o /xtal/devel/pgi/linux86/8.0-5/lib/trace_init.o /usr/lib/gcc/i386-redhat-linux/4.3.0/crtbegin.o -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /xtal/devel/pgi/linux86/8.0-5/lib/pgi.ld -L/xtal/devel/pgi/linux86/8.0-5/lib -L/usr/lib -L/usr/lib/gcc/i386-redhat-linux/4.3.0 /tmp/pgCCUgFdkYWkZlUb.o -rpath /xtal/devel/pgi/linux86/8.0-5/lib -lstd -lC -lpgsse1 -lpgsse2 -lnspgc -lpgc -lm -lgcc -lc -lgcc /usr/lib/gcc/i386-redhat-linux/4.3.0/crtend.o /usr/lib/crtn.o

Interestingly, the C-version (with a printf instead of std::cout) of the same compiles and links (with both pgcc and pgCC). With some trial-and-error I found out that omitting -lstd from the linker command line prevents the linker segmentation fault (but of course complains about missing symbols). Running "nm" on libstd.a also crashes:
$ nm /xtal/devel/pgi/linux86/8.0-5/lib/libstd.a
<many lines omitted>
00002020 t uninitialized_fill_n__tm__8_PPvUiPv__3stdFZ1ZZ2ZRCZ3Z_Z1Z
U vfprintf
000000e0 T what__Q2_3std17__Named_exceptionCFv
Segmentation fault

I have checked the md5 checksum and it agrees with the one provided on the website. OS is Fedora 9 32bit on a quad-core Intel Core2. Any pointers?

Thanks, Gabor
Back to top
View user's profile
mkcolg



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

PostPosted: Thu Apr 16, 2009 12:33 pm    Post subject: Reply with quote

Hi Gabor,

I have not heard of this occuring before and I'm not able to replicate the issue here. What is the checksum of your libstd.a? It should be:
Code:
% md5sum pgi/linux86/8.0-5/lib/libstd.a
c418d479ca82c9e6ed696c4e7330f5f1  pgi/linux86/8.0-5/lib/libstd.a


- Mat
Back to top
View user's profile
Gabor Bunkoczi



Joined: 16 Apr 2009
Posts: 5

PostPosted: Fri Apr 17, 2009 1:40 am    Post subject: Reply with quote

Hi Mat,

The checksums seem to agree.

Code:
$ md5sum /xtal/devel/pgi/linux86/8.0-5/lib/libstd.a
c418d479ca82c9e6ed696c4e7330f5f1  /xtal/devel/pgi/linux86/8.0-5/lib/libstd.a
$ uname -a
Linux perch.cimr.cam.ac.uk 2.6.27.21-78.2.41.fc9.i686 #1 SMP Mon Mar 23 23:45:58 EDT 2009 i686 i686 i386 GNU/Linux
$ ld --version
GNU ld version 2.18.50.0.6-7.fc9 20080403


Could this be some problem with the trial licence? I have moved license.dat away and the compilers stopped working ( "pgi-cpp-lin32: LICENSE MANAGER PROBLEM: Cannot find license file."). I have also reinstalled the software to another location, as a normal user, and it is still the same.

Thanks, Gabor
Back to top
View user's profile
mkcolg



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

PostPosted: Fri Apr 17, 2009 9:12 am    Post subject: Reply with quote

Hi Gabor,

It wouldn't be license issue and since the library check sums are correct, it's not a library issue.

My best guess is that there is problem with is particular version of binutils. My Fedora 9 system in 64-bits, so I'll need to have my IT build a 32-bit Fedora 9 box, so it may be a few days before I can try and duplicate it. One difference is your binutils are slightly different build than mine (2.18.50.0.6-2 vs 2.18.50.0.6-7.fc9). It appears that your is a more recent update.

One thing you can try is to build a newer binutils (http://ftp.gnu.org/gnu/binutils/) and see if that works.

- Mat
Back to top
View user's profile
Gabor Bunkoczi



Joined: 16 Apr 2009
Posts: 5

PostPosted: Fri Apr 17, 2009 10:17 am    Post subject: Reply with quote

Hi Mat,

Thanks for looking into this! I will definitely try with the latest binutils.

In the meantime, I have tried to install on another machine as well, this time running OpenSuSE 10.0 (32bit). On this machine "nm" has no problem reading all the symbols from libstd.a, but now there is an issue with the compilers:
Code:
$ pgcc hello.c
pgi-cc-lin32: LICENSE MANAGER PROBLEM: Failed to checkout license

I am using the same license.dat as on the Fedora machine. This particular machine has Mathematica installed, can this be some interplay between the licence managers? If so, how can I fix it?

Thanks, Gabor
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
Goto page 1, 2  Next
Page 1 of 2

 
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