Re: Darwin & Dynamic modules
Max Horn wrote: >OK, I think I just found out that this is the reason modules are >not built right on darwin: > ># Commands used to build and install a shared archive. >archive_cmds="\$CC \$(test \\"x\$module\\" = xyes && echo -bundle || >echo -dynamiclib) \$allow_undefined_flag -o \$lib \$libobjs >\$deplibs\$linker_flags -install_name \$rpath/\$soname \$verstring" > >Changing the two \\" to \" worked nicely for me. Libtool, with this >change, produces modules now when asked for them. As Guido noted this is in fact an old problem and has been fixed before. Unfortunately, it was reintroduced into branch-1-4 and HEAD when my latest Darwin support patch was merged on September 2nd. The 1.4.1 and 1.4.2 releases are affected by this. Some quotes: Before (libtool.m4 revision 1.166.2.16): archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || echo -dynami clib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $(test -n "$verstring" -a x$verstring != x0.0 && echo $verstring )' My submitted patch: archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || echo -dynam iclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_nam e $rpath/$soname $verstring' After (libtool.m4 revision 1.166.2.17): archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dyna miclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_na me $rpath/$soname $verstring' I actually explained in my mail at the time that double quotes don't work in archive_cmds with zsh, which forced me to move the $verstring handling to ltmain.sh... I guess that was a case of pre-release stress. As for the convenience library issue: Gary refused the patch saying that it breaks the cdemo tests. It was not said on which platform, but I assume it was Linux. Actually, I was able to reproduce the failure on my Debian Linux box (potato w/ 2.4 kernel) with branch-1-4 as of Wednesday. After reverting back to a clean copy, running cdemo-conf and cdemo-make in verbose mode produces these command lines at the end of cdemo-make (still on Linux): /bin/sh ./libtool --mode=link gcc -g -O2 -o cdemo main.o libfoo.la gcc -g -O2 -o cdemo main.o ./.libs/libfoo.al -lm As I understand it, listing a convenience library on the link command line is supposed to be equivalent to listing its member objects. 'cdemo/libtool --config' shows that libtool knows the special flags to accheive this: whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive" For some reason, this is not used in this situation. My conclusion is that convenience library linking is broken as it is and needs to be fixed. That the patch that fixes it on Darwin breaks other platforms is just a symptom of greater breakage. I'll be happy to provide more information if required. Hope this helps, -chrisp -- chrisp a.k.a. Christoph Pfisterer "Any sufficiently advanced [EMAIL PROTECTED] - http://chrisp.de bug is indistinguishable PGP key & geek code availablefrom a feature." ___ Libtool mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/libtool
Libtool patch for mode=install on Cygwin
This fixes a problem on Cygwin (with the Mingw gcc, even if I doubt it matters here) where invoking libtool --mode=install fails to install exes. The libtool command line refers to progname.exe, while the wrapper script that libtool produced is named without the .exe. (Line number are a bit off, as my ltmain.in also contains some other changes.) Index: ltmain.in === RCS file: /cvs/libtool/ltmain.in,v retrieving revision 1.275 diff -u -2 -r1.275 ltmain.in --- ltmain.in 2001/09/10 23:33:26 1.275 +++ ltmain.in 2001/09/16 22:51:55 @@ -4771,5 +4772,13 @@ # Do a test to see if this is really a libtool program. - if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + case $host in + *cygwin*|*mingw*) + wrapper=`echo $file | sed -e 's,.exe$,,'` + ;; + *) + wrapper=$file + ;; + esac + if (sed -e '4q' $wrapper | egrep "^# Generated by .*$PACKAGE") >/dev/null +2>&1; then notinst_deplibs= relink_command= @@ -4777,11 +4786,11 @@ # If there is no directory component, then add one. case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; + */* | *\\*) . $wrapper ;; + *) . ./$wrapper ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then - $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 + $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit 1 fi @@ -4808,6 +4817,6 @@ # If there is no directory component, then add one. case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; + */* | *\\*) . $wrapper ;; + *) . ./$wrapper ;; esac Cheers, Tor Lillqvist ___ Libtool mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/libtool
Problem with finding included ltdll.c and impgen.c on Cygwin
In current CVS libtool.m4, the code that outputs the included ltdll.c and impgen.c is indented four spaces. Including the lines with _LT_AC_FILE_LTDLL_C and _LT_AC_FILE_IMPGEN_C. Thus the start marker lines also get indented in the resulting libtool script. However, when libtool goes looking for those marker lines with sed, it expects the # to be at the start of the line... --tml ___ Libtool mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/libtool