[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: OpenLDAP 2.2.14 linking against 2.1.x (ITS#3203)



Quite odd.

I tried to duplicate this problem on fresh OpenBSD 3.5 installing
2.1.30 then 2.2.14, each using:
 env CPPFLAGS="-I/usr/local/include" \
        LDFLAGS="-L/usr/local/lib -R/usr/local/lib" \
        ./configure --disable-slapd

This produced a libldap.so.7.7 with correct dependencies
(see below).

So, questions is, what are we doing differently...

/bin/sh /home/kurt/re22/libtool --mode=install /usr/bin/install -c  -m 644 libldap.la /usr/local/lib
libtool: install: warning: relinking `libldap.la'
(cd /home/kurt/re22/libraries/libldap; /bin/sh /home/kurt/re22/libtool --mode=relink cc -g -O2 -release 2.2 -version-info 7:7:0 -rpath /usr/local/lib -o libldap.la bind.lo open.lo result.lo error.lo compare.lo search.lo controls.lo messages.lo references.lo extended.lo cyrus.lo modify.lo add.lo modrdn.lo delete.lo abandon.lo sasl.lo sbind.lo kbind.lo unbind.lo cancel.lo filter.lo free.lo sort.lo passwd.lo whoami.lo getdn.lo getentry.lo getattr.lo getvalues.lo addentry.lo request.lo os-ip.lo url.lo sortctrl.lo vlvctrl.lo init.lo options.lo print.lo string.lo util-int.lo schema.lo charray.lo tls.lo os-local.lo dnssrv.lo utf-8.lo utf-8-conv.lo version.lo ../../libraries/liblber/liblber.la -lssl -lcrypto)
cc -shared  -fPIC -o .libs/libldap-2.2.so.7.7  bind.lo open.lo result.lo error.lo compare.lo search.lo controls.lo messages.lo references.lo extended.lo cyrus.lo modify.lo add.lo modrdn.lo delete.lo abandon.lo sasl.lo sbind.lo kbind.lo unbind.lo cancel.lo filter.lo free.lo sort.lo passwd.lo whoami.lo getdn.lo getentry.lo getattr.lo getvalues.lo addentry.lo request.lo os-ip.lo url.lo sortctrl.lo vlvctrl.lo init.lo options.lo print.lo string.lo util-int.lo schema.lo charray.lo tls.lo os-local.lo dnssrv.lo utf-8.lo utf-8-conv.lo version.lo  /usr/local/lib/liblber.so.7.7 -lssl -lcrypto 

Note here libldap-2.2.so.7.7 is specifically linked with /usr/local/lib/liblber.so.7.7

/usr/bin/install -c -m 644 .libs/libldap-2.2.so.7.7T /usr/local/lib/libldap-2.2.so.7.7
(cd /usr/local/lib && rm -f libldap.so.7.7 && ln -s libldap-2.2.so.7.7 libldap.so.7.7)
/usr/bin/install -c -m 644 .libs/libldap.lai /usr/local/lib/libldap.la
/usr/bin/install -c -m 644 .libs/libldap.a /usr/local/lib/libldap.a
ranlib -t /usr/local/lib/libldap.a
chmod 644 /usr/local/lib/libldap.a
PATH="$PATH:/sbin" ldconfig -m /usr/local/lib

% objdump -p /usr/local/lib/libldap.so.7.7

/usr/local/lib/libldap.so.7.7:     file format elf32-i386

Program Header:
    LOAD off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12
         filesz 0x000256c1 memsz 0x000256c1 flags r-x
    LOAD off    0x00026000 vaddr 0x20000000 paddr 0x20000000 align 2**12
         filesz 0x000039a0 memsz 0x000039a0 flags r--
    LOAD off    0x000299a0 vaddr 0x200049a0 paddr 0x200049a0 align 2**12
         filesz 0x00000520 memsz 0x00000520 flags rw-
    LOAD off    0x00029ec0 vaddr 0x20005ec0 paddr 0x20005ec0 align 2**12
         filesz 0x000005c8 memsz 0x000005c8 flags rw-
    LOAD off    0x0002a488 vaddr 0x20007488 paddr 0x20007488 align 2**12
         filesz 0x00000090 memsz 0x00000090 flags rw-
 DYNAMIC off    0x0002a488 vaddr 0x20007488 paddr 0x20007488 align 2**2
         filesz 0x00000090 memsz 0x00000090 flags rw-

Dynamic Section:
  NEEDED      /usr/local/lib/liblber.so.7.7
  NEEDED      libssl.so.8.0
  NEEDED      libcrypto.so.10.3
  INIT        0x65b0
  FINI        0x256b0
  HASH        0x134
  STRTAB      0x33cc
  SYMTAB      0x11dc
  STRSZ       0x22cb
  SYMENT      0x10
  PLTGOT      0x20005ec0
  PLTRELSZ    0xa98
  PLTREL      0x11
  JMPREL      0x5b10
  REL         0x5698
  RELSZ       0x478
  RELENT      0x8

At 01:53 PM 6/24/2004, Jakob Schlyter wrote:
>On Thu, 24 Jun 2004, Kurt D. Zeilenga wrote:
>
>>That looks fine.  What does objdump(1) (or like tool) say about
>>dependencies for the installed so?
>
>mrbill> objdump -p /usr/local/lib/libldap.so.7.7
>
>/usr/local/lib/libldap.so.7.7:     file format elf32-i386
>
>Program Header:
>    LOAD off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12
>         filesz 0x000255d6 memsz 0x000255d6 flags r-x
>    LOAD off    0x00026000 vaddr 0x20000000 paddr 0x20000000 align 2**12
>         filesz 0x000044b0 memsz 0x000044b0 flags r--
>    LOAD off    0x0002b000 vaddr 0x20005000 paddr 0x20005000 align 2**12
>         filesz 0x000005a0 memsz 0x000005a0 flags rw-
>    LOAD off    0x0002b5a0 vaddr 0x200065a0 paddr 0x200065a0 align 2**12
>         filesz 0x000005c8 memsz 0x000005c8 flags rw-
>    LOAD off    0x0002bb68 vaddr 0x20007b68 paddr 0x20007b68 align 2**12
>         filesz 0x00000000 memsz 0x00000000 flags rw-
> DYNAMIC off    0x0002b4e8 vaddr 0x200054e8 paddr 0x200054e8 align 2**2
>         filesz 0x000000b8 memsz 0x000000b8 flags rw-
>
>Dynamic Section:
>  NEEDED      liblber.so.2.130
>  NEEDED      libssl.so.8.0
>  NEEDED      libcrypto.so.10.4
>  INIT        0x64f0
>  FINI        0x255d0
>  HASH        0x134
>  STRTAB      0x3390
>  SYMTAB      0x11d0
>  STRSZ       0x224d
>  SYMENT      0x10
>  PLTGOT      0x200065a0
>  PLTRELSZ    0xa98
>  PLTREL      0x11
>  JMPREL      0x5a58
>  REL         0x55e0
>  RELSZ       0x478
>  RELENT      0x8
>  RELCOUNT    0x78
>
>
>
>        jakob