Re: [VCDImager Bugs/Devel] vcdimager 0.7.20 build problem under Mac OS X
Sebastian Hagedorn <[email protected]> Mon, 01 Mar 2004 15:18:44 +0100
| Newsgroups | gmane.comp.gnu.vcdimager.bugs |
|---|---|
| Message-ID | <[email protected]> |
Hi, thanks for your reply. --On Sonntag, 29. Februar 2004 22:13 Uhr -0500 "R. Bernstein" <[email protected]> wrote: > I tested this using sourceforge's compile farm server, OS X 10.2 > SERVER edition uname -s -r -m reports: Darwin 6.8 Power Macintosh OK, I should've mentioned what my system is: Darwin 7.2.0 Power Macintosh That's Mac OS X 10.3.2. > The problem think is that somehow you are using /usr/bin/libtool, I > the right libtool is perhaps the one that should be created during > configure. That's what I thought first, but it's not true. Please see below. > And then instead of this: > > > 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 /usr/local/lib/libvcdinfo.0.dylib > -compatibility_version 1 > -current_version 1.1 > > /usr/bin/libtool: unknown option character `-' in: > ^^^^^^^^^^^^^^^ > > you may get "/bin/sh ../libtool" as I get. I do! First the correct libtool is called: /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 -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 Then this libtool calls gcc like this: 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 Now Mac OS X 10.3 has its own libtool, which has nothing to do with GNU libtool. It is called by gcc prior to passing libraries to ld. This results in the error message: /usr/bin/libtool: unknown option character `-' in: --version-script=libvcdinfo.la.ver Usage: /usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT] Usage: /usr/bin/libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] [-noall_load] To prove that ld on OS X is different, I called ld directly: a0620% ld --version-script=libvcdinfo.la.ver ld: unknown flag: --version-script=libvcdinfo.la.ver Under Linux I get this error instead: ld --version-script=libvcdinfo.la.ver ld: cannot open linker script file libvcdinfo.la.ver To sum it up: --version-script isn't portable. You need to check the system you're compiling on if you want to use it ... Greetings, Sebastian -- Sebastian Hagedorn PGP key ID: 0x4D105B45 http://www.spinfo.uni-koeln.de/~hgd/