Subject: new libtool handling of "-release" breaks cross packages (was Re: cross pkgs)
To: None <>
From: Chuck Cranor <>
List: tech-pkg
Date: 03/07/2001 20:12:35
In article <>,
Chuck Cranor <> wrote:
>i just CVS'd my pkgsrc to -current in hopes of building cross compiler
>tools, but...

>xxxcdc> make
>===> Building for bfd-crunchide-1.0
>cc  -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib  -o crunchide crunchide.o -L/usr/xbsd/lib -Wl,-R/usr/xbsd/lib -lbfd-2.9.1 -liberty
>/usr/bin/ld: cannot open -lbfd-2.9.1: No such file or directory
>collect2: ld returned 1 exit status
>*** Error code 1

>the old binutils package would install $CROSSBASE/lib as:
>xbsd[8]> ls $CROSSBASE/lib/libbfd*
>/usr/xbsd/lib/           /usr/xbsd/lib/
>/usr/xbsd/lib/         /usr/xbsd/lib/libbfd.a

>but the binutils i just built on my new system installs them as:
>xxxcdc> ls $CROSSBASE/lib/libbfd*
>/usr/xbsd/lib/libbfd.a                  /usr/xbsd/lib/
>/usr/xbsd/lib/                 /usr/xbsd/lib/

ok, this is due to changes made to the libtool package which the
cross stuff uses.   observe:

old libtool (pkglibtool-1.2p2):

    xbsd[34]> cat DOIT 
    #!/bin/sh -x
    $lt --mode=compile cc -O2 -c ok.c
    $lt --mode=link cc -O2 -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -o -rpath /usr/xbsd/lib -release 2.9.1 ok.lo
    xbsd[35]> ./DOIT 
    + lt=pkglibtool-ELF-1.2p2
    + pkglibtool-ELF-1.2p2 --mode=compile cc -O2 -c ok.c
    cc -O2 -c -fPIC -DPIC ok.c
    mv -f ok.o ok.lo
    cc -O2 -c ok.c >/dev/null 2>&1
    + pkglibtool-ELF-1.2p2 --mode=link cc -O2 -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -o -rpath /usr/xbsd/lib -release 2.9.1 ok.lo
    mkdir .libs
    cc -shared -Wl,-soname -Wl, -o .libs/ ok.lo
    (cd .libs && ln -s
    (cd .libs && ln -s
    ar cru .libs/libok.a ok.o
    ranlib .libs/libok.a
    (cd .libs && ln -s ../

new libtool (libtool-1.4.20010219nb2):
    xxxcdc> ./DOIT 
    + lt=libtool
    + libtool --mode=compile cc -O2 -c ok.c
    mkdir .libs
    cc -O2 -c ok.c  -fPIC -DPIC -o .libs/ok.o
    cc -O2 -c ok.c -o ok.o >/dev/null 2>&1
    + libtool --mode=link cc -O2 -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/li
    b -L/usr/pkg/lib -o -rpath /usr/xbsd/lib -release 2.9.1 ok.lo
    cc -shared  .libs/ok.o  -L/usr/pkg/lib  -Wl,-R/usr/pkg/lib -Wl,-R/usr/pkg/lib -W
    l,-soname -Wl, -o .libs/
    (cd .libs && rm -f && ln -s
    (cd .libs && rm -f && ln -s
    (cd .libs && rm -f && ln -s
    ar cru .libs/libok.a  ok.o
    ranlib .libs/libok.a
    (cd .libs && rm -f && ln -s ../

does new libtool ignore the "-release 2.9.1" flag?