[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: undefined symbol "stat" in shared libraries, redhat 5.2, pam0.66



On Tue, 16 Feb 1999, Derrick J Brashear wrote:

> >  /lib/libpam.so.0: undefined symbol: stat
> 
> link libpam with -lc?

Yes.

Compiling with -O also "fixes" the problem. There is no stat() in
libc.so.6, only inline function in /usr/include/sys/stat.h and out-of-line
copy in /usr/lib/libc_nonshared.a. -O makes the compiler use the inline
definition from the header. Nevertheless, -lc is the CORRECT solution
(libc magic: /usr/lib/libc.so is a text file (!) telling ld to link with
libc.so.6 AND libc_nonshared.a).

--Pavel Kankovsky aka Peak  [ Boycott Microsoft--http://www.vcnet.com/bms ]
"NSA GCHQ KGB CIA nuclear conspiration war weapon spy agent... Hi Echelon!"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []