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

Compiling on SGI Indy - static/dynamic linking



I have a problem when compiling a piece of software (php).

The compiler/linker will not use the shared libraries.

If I install it as a binary .deb package and use the same ./configure 
parameters it will still fail with errors like:

Cannot load /usr/lib/apache/1.3/libphp4.so into server: 
/usr/lib/apache/1.3/libphp4.so: undefined symbol: __res_search
failed

A ldd for the compiled version show:
 ldd /usr/lib/apache/1.3/libphp4.so
        libexpat.so.1 => /usr/lib/libexpat.so.1 (0x2acb5000)
        libc.so.6 => /lib/libc.so.6 (0x2ad1e000)
        /lib/ld.so.1 => /lib/ld.so.1 (0x55550000)

While the binary installed shows:
ldd /usr/lib/apache/1.3/libphp4.so.org 
        libpam.so.0 => /lib/libpam.so.0 (0x2acb3000)
        libdl.so.2 => /lib/libdl.so.2 (0x2acfc000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x2ad40000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x2adb0000)
        libexpat.so.1 => /usr/lib/libexpat.so.1 (0x2ae06000)
        libmm.so.11 => /usr/lib/libmm.so.11 (0x2ae6f000)
        libpcre.so.3 => /usr/lib/libpcre.so.3 (0x2aeb4000)
        libdb2.so.2 => /lib/libdb2.so.2 (0x2aeff000)
        libdb.so.2 => /lib/libdb.so.2 (0x2afa6000)
        libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x2aff9000)
        libz.so.1 => /usr/lib/libz.so.1 (0x2b04c000)
        libm.so.6 => /lib/libm.so.6 (0x2b09e000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x2b166000)
        libc.so.6 => /lib/libc.so.6 (0x2b1c3000)
        /lib/ld.so.1 => /lib/ld.so.1 (0x55550000)

So I wonder if there some kind of magic options to gcc.

When the module is linked I get this warning:
*** Warning: This library needs some functionality provided by -
lresolv.
*** I have the capability to make that library automatically link in 
when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have.



System information:
uname -a 
Linux indy01 2.4.16 #1 Sun Dec 16 16:38:44 CET 2001 mips unknown

gcc --version
2.95.4

ld --version
GNU ld version 2.11.92.0.12.3 20011121 Debian/GNU Linux

Best regards,

Soeren



Reply to: