|
OS/X Libtool && -bundle: msg#00073gnu.libtool.general
Hello, I'm having problems with Mac OS/X in CVS Libtool, and I wonder if some of you more familiar with the platform could help out. In an older version of Libtool, a library built with -module is linked with: cc -flat_namespace -undefined suppress -o .libs/libdb_tcl-4.2.so *.lo -lc -dynamiclib -install_name /Users/rboehne/testdb/lib/libdb_tcl-4.2.so Which works like I'd expect: [dsl092-075-147:~/db-4.2.8/build_unix] rboehne% file .libs/libdb_tcl-4.2.so .libs/libdb_tcl-4.2.so: Mach-O dynamically linked shared library ppc [dsl092-075-147:~/db-4.2.8/build_unix] rboehne% ./libtool --version ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52) [dsl092-075-147:~/db-4.2.8/build_unix] rboehne% man ld [dsl092-075-147:~/db-4.2.8/build_unix] rboehne% /usr/bin/tclsh8.3 % source ../test/test.tcl % exit More recent (CVS) Libtool uses a two-step linking process when -module is present on the Libtool link line, like so: cc -r -Wl,-bind_at_load -keep_private_externs -nostdlib -o .libs/libdb_tcl-4.2.so-master.o .libs/*.o && cc -bundle -flat_namespace -undefined suppress -o .libs/libdb_tcl-4.2.so . libs/libdb_tcl-4.2.so-master.o But this method doesn't seem to work: [dsl092-075-147:~/new-db-4.2.8/build_unix] rboehne% file .libs/libdb_tcl-4.2.so .libs/libdb_tcl-4.2.so: Mach-O bundle ppc [dsl092-075-147:~/new-db-4.2.8/build_unix] rboehne% ./libtool --version ltmain.sh (GNU libtool) 1.4e (1.1182 2003/01/29 04:57:52) Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [dsl092-075-147:~/new-db-4.2.8/build_unix] rboehne% /usr/bin/tclsh8.3 % source ../test/test.tcl dyld: /usr/bin/tclsh8.3 malformed library: .libs/libdb_tcl-4.2.so (not a Mach-O library file, bad filetype value) % exit It looks to me like this should work, a module should be dlopen-able, wheras a Libtool library not built with -module may not. If I take out the -module from the link line, I get .libs/libdb_tcl-4.2.dylib and tclsh is able to dlopen it. Part of what really troubles me is that "file" doesn't return the same thing on the libraries. I do notice that "file" gives the same result I'm getting on all the *.so files under /usr/lib/ though. So am I supposed to be able to dlopen() a "bundle", and if not, what can be done with it? I'm confused. Thanks, Robert Boehne ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: linux/alpha and ccc compiler: 00073, Robert Boehne |
|---|---|
| Next by Date: | Re: OS/X Libtool && -bundle: 00073, Ben Hines |
| Previous by Thread: | How to tell libtool to have/work with one of [.lo|.o] file ( if possible )i: 00073, Asim Suter |
| Next by Thread: | Re: OS/X Libtool && -bundle: 00073, Ben Hines |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |