[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [VCDImager Bugs/Devel] vcdimager 0.7.20 build problem under Mac OS X
From: |
R. Bernstein |
Subject: |
Re: [VCDImager Bugs/Devel] vcdimager 0.7.20 build problem under Mac OS X |
Date: |
Mon, 8 Mar 2004 20:54:33 -0500 |
Thanks for looking into this. It seems reasonable to me to allow
--with-versioned-libs only if when GNU ld is used. Unless the other
VCDImager developers disagree, I'll make a mental note to address this
by the next release. (I suspect the others would be more qualified to
make the best change; but if it's not done, I'll do it.)
Sebastian Hagedorn writes:
> Hi,
>
> -- "R. Bernstein" <address@hidden> is rumored to have mumbled on Mittwoch,
> 3. März 2004 8:40 Uhr -0500 regarding Re: [VCDImager Bugs/Devel] vcdimager
> 0.7.20 build problem under Mac OS X:
>
> > Sebastian Hagedorn writes:
> > > strange, I haven't had this problem with libcdio 0.66. Or have you
> > added > versioning support in 0.67?
> >
> > Looking at NEWS for libcdio 0.66, I see the versioning was in
> > 0.66. 0.67 added --without-versioned-libs.
> >
> > > I'll try to find out what's the best route to take.
> >
> > Thanks.
>
> I've examined this some more. Versioning works fine under OS X with libcdio
> 0.67. I believe the reason for that to be a different version of libtool:
>
> libcdio-0.67/libtool --version
> ltmain.sh (GNU libtool) 1.4.3 (1.922.2.111 2002/10/23 02:54:36)
>
> vcdimager-0.7.20] hgd% ./libtool --version
> ltmain.sh (GNU libtool) 1.5.2 (1.1220.2.60 2004/01/25 12:25:08) Debian: 192
> $
>
> When libcdio calls libtool, the following happens:
>
> /bin/sh ../libtool --mode=link gcc -g -O2 -Wall -Wchar-subscripts
> -Wmissing-prototypes -Wmissing-declarations -Wunused -Wpointer-arith
> -Wwrite-strings -Wnested-externs -Wno-sign-compare -L/sw/lib -o
> libiso9660.la -rpath /sw/lib -version-info 1:0:1
> -Wl,--version-script=libiso9660.la.ver iso9660.lo iso9660_fs.lo xa.lo
> libcdio.la -lm
>
> Note that "-Wl,--version-script=libiso9660.la.ver" is part of that command.
> It results in this:
>
> gcc -r -keep_private_externs -nostdlib -o
> .libs/libiso9660.0.1.0.dylib-master.o iso9660.lo iso9660_fs.lo xa.lo &&
> gcc -dynamiclib -flat_namespace -undefined suppress -o
> .libs/libiso9660.0.1.0.dylib .libs/libiso9660.0.1.0.dylib-master.o
> -L/sw/lib -L./.libs -lcdio -lm -lc --version-script=libiso9660.la.ver
> -install_name /sw/lib/libiso9660.0.dylib -compatibility_version 2
> -current_version 2.0
>
> For whatever reason the second call of gcc includes only
> "--version-script=libiso9660.la.ver", which gcc ignores (note the absence
> of -Wl, in front of it). The versioning OS X uses works because of the
> "-version-info 1:0:1" flag.
>
> When vcdimager calls libtool, it looks like this:
>
> /bin/sh ../libtool --mode=link gcc -g -O2 -Wall -Wchar-subscripts
> -Wmissing-prototypes -Wmissing-declarations -Wunused -Wpointer-arith
> -Wwrite-strings -Wnested-externs -Wno-sign-compare -L/sw/lib -o
> libvcdinfo.la -rpath /sw/lib -version-info 0:1:0
> -Wl,--version-script=libvcdinfo.la.ver info.lo inf.lo info_private.lo
> vcd_read.lo -L/sw/lib -lcdio -L/sw/lib -liso9660 -lcdio
> ../lib/libvcd.la -lm
>
> This is basically the same as with libcdio. But the newer libtool behaves
> differently:
>
> gcc -dynamiclib -undefined dynamic_lookup -o .libs/libvcdinfo.0.0.1.dylib
> .libs/info.o .libs/inf.o .libs/info_private.o .libs/vcd_read.o -all_load
> ../lib/.libs/libvcd.a -L/sw/lib /sw/lib/libiso9660.dylib
> /sw/lib/libcdio.dylib -lm -Wl,--version-script=libvcdinfo.la.ver
> -install_name /sw/lib/libvcdinfo.0.dylib -compatibility_version 1
> -current_version 1.1
>
> It does only one call to gcc, which contains the original
> "-Wl,--version-script=libvcdinfo.la.ver" part. Thus the flag
> "--version-script=libvcdinfo.la.ver" isn't dropped by gcc but rather passed
> to the loader. The loader (or rather Apple's own libtool) doesn't know it
> and barfs:
>
> /usr/bin/libtool: unknown option character `-' in:
> --version-script=libvcdinfo.la.ver
>
> I suppose that libcdio working is just coincidence. If my analysis is
> correct, the configure script should determine whether GNU ld is being used
> or not. In fact, it does so already. What needs to be done is for
> "-Wl,--version-script=libvcdinfo.la.ver" to be passed to libtool *only* if
> GNU ld is being used ... versioning should *still* work, because libtool
> does the right thing in translating the "-version-info" flag to the
> appropriate " -compatibility_version" and "-current_version" flags that
> are used by OS X.
> --
> Sebastian Hagedorn
> Ehrenfeldgürtel 156, 50823 Köln, Germany
> http://www.spinfo.uni-koeln.de/~hgd/
>
> "Being just contaminates the void" - Robyn Hitchcock