glibc problem ??

P.Srihari srihari.par@wipro.com
Wed Feb 12 13:19:00 GMT 2003


hello all,

i have a software that is giving the following run-time error
	"error while loading shared libraries: undefined symbol: fstat"

objdump on /lib/libc.so.6 shows the following output :

objdump -T /lib/libc.so.6 | grep fstat
000da3f0  w   DF .text  0000003e  GLIBC_2.0   fstatfs
000da9f4 g    DF .text  00000433  GLIBC_2.1   fstatvfs
000daf04  w   DF .text  000000cb  GLIBC_2.1   fstatvfs64
000da4f4  w   DF .text  000000bb  GLIBC_2.1   fstatfs64

in the file /usr/include/sys/stat.h we have

#ifndef __USE_FILE_OFFSET64
/* Get file attributes for FILE and put them in BUF.  */
extern int stat (__const char *__restrict __file,
         struct stat *__restrict __buf) __THROW;

/* Get file attributes for the file, device, pipe, or socket
   that file descriptor FD is open on and put them in BUF.  */
extern int fstat (int __fd, struct stat *__buf) __THROW;
#else
......
......
#endif

since i am not defining __USE_FILE_OFFSET64, fstat() defined as an 
extern symbol, so fstat() is undefined.

I went through some mailing lists and found that explicit linking with 
libc is required and one instance there was a mention of
libc_nonshared.a
but none of this works ...

i am using gcc version shown as follows

gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-81)


Could any one help me ??

Thanks
Srihari
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Wipro_Disclaimer.txt
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20030212/10d45f85/attachment.txt>


More information about the Gcc-help mailing list