PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

hidden symbol `stat' in /usr/lib/libc_nonshared.a(stat.oS)

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



Joined: 18 Mar 2005
Posts: 4

PostPosted: Mon Apr 24, 2006 9:49 am    Post subject: hidden symbol `stat' in /usr/lib/libc_nonshared.a(stat.oS) Reply with quote

Hi,
I am getting the following error on trying to link in a mixed fortran/C code. This code builds with 5.0 but gives this hidden symbol 'stat' message with 6.0.

The link line as displayed by pgf90 -v shows the following error

/usr/bin/ld /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/gcc/x86_64-redhat-linux/3.4.5/32/crtbegin.o /usr/pgi61/linux86/6. 1/lib/f90main.o -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/pgi61/linux86/6.1/lib/pgi.ld sub1.o -o utility.x -L/usr/pgi61/linux86/6.1/lib -L/usr/lib -L/usr/lib/gcc/x86_64-redhat-linux/3.4.5/32 -rpath /usr/pgi61/linux86/6.1/lib -lpgmm1 -lpgmm2 -lpgf90 -lpgf90_rpm1 -lp gf902 -lpgf90rtl -lpgftnrtl -lpgsse1 -lpgsse2 -lc -lnspgc -lpgc -lm -lgcc -lc -lgcc /usr/lib/gcc/x86_64-redhat-linux/3.4.5/32/crtend.o /usr/lib/crtn.o




/usr/bin/ld: utility.x: hidden symbol `stat' in /usr/lib/libc_nonshared.a(stat.oS) is referenced by DSO
/usr/bin/ld: final link failed: Nonrepresentable section on output
pgf90-Fatal-linker completed with exit code 1

I am using

pgf90 6.1-4 32-bit target on x86-64 Linux

and have the following gcc packages installed

libgcc-3.4.5-1
compat-libgcc-296-2.96-132.7.2
gcc-3.4.5-2
libgcc-3.4.5-2
gcc-g77-3.4.5-2


Any help would be greatly appreciated.

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



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

PostPosted: Thu Apr 27, 2006 4:44 pm    Post subject: Reply with quote

Hi Waris,

I'm actually not sure what the problem is here. I'm guessing it has to do with how your system is configured but I'm not sure. Could you send a copy of your code to trs@pgroup.com that we could test here? Also, what OS are you using and what is the output of "/lib/libc.so.6". Did you install GCC 3.4.5 yourself, or did it come as part of your OS?

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



Joined: 09 Dec 2005
Posts: 4

PostPosted: Wed Jun 21, 2006 1:38 pm    Post subject: Reply with quote

I had that problem yesterday! I was doing so many things, I hope I can recall the solution properly. I believe that you have to specify

-lc

in the ld command to pick up the proper C library. The default library you're picking up isn't correct. There is some stuff about this on the RedHat forums.
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Jun 21, 2006 7:34 pm    Post subject: Reply with quote

Can you post a link to this fix? "-lc" is on the link line and I've only seen this error when 'ld' is used directly to link a shared object, which doesn't appear to be the case for the original poster.

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