There is a bug in the current GNU libtool in Darwin which causes it not to build properly when building plug-in modules (MH_BUNDLE). The -install_name flag to the linker only applies to shared libraries (MH_DYLIB).

The first diff below fixes the source, the second fixes /usr/bin/glibtool directly.

On a related note, httpd is not passing -module to libtool when building modules. I think it should. Is that intentional?

        -wsv


Index: libtool.m4
===================================================================
RCS file: /cvs/Darwin/src/live/glibtool/libtool/libtool.m4,v
retrieving revision 1.3
diff -w -u -d -r1.3 libtool.m4
--- libtool.m4 2001/11/19 07:44:06 1.3
+++ libtool.m4 2002/09/27 22:15:41
@@ -1580,7 +1580,7 @@
# FIXME: Relying on posixy $() will cause problems for
# cross-compilation, but unfortunately the echo tests do not
# yet detect zsh echo's removal of \ escapes.
- archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
+ archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib -install_name $rpath/$soname $verstring) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags'
# We need to add '_' to the symbols in $export_symbols first
#archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
hardcode_direct=yes


[joliet-jake:~] wsanchez% diff -u /usr/bin/glibtool glibtool
--- /usr/bin/glibtool   Sun Jul 14 04:21:08 2002
+++ glibtool    Fri Sep 27 15:18:57 2002
@@ -181,7 +181,7 @@
 old_archive_from_expsyms_cmds=""

# Commands used to build and install a shared archive.
-archive_cmds="\$nonopt \$(test \\\"x\$module\\\" = xyes && echo -bundle || echo -dynamiclib) \$allow_undefined_flag -o \$lib \$libobjs \$deplibs\$linker_flags -install_name \$rpath/\$soname \$verstring"
+archive_cmds="\$nonopt \$(test \\\"x\$module\\\" = xyes && echo -bundle || echo -dynamiclib -install_name \$rpath/\$soname) \$allow_undefined_flag -o \$lib \$libobjs \$deplibs\$linker_flags \$verstring"
archive_expsym_cmds=""
postinstall_cmds=""
postuninstall_cmds=""




Reply via email to