FYI: BUG: libtool-1.9f and libtool-1.5.18: install: you must specify a destination
* Ralf Wildenhues wrote on Wed, Jul 06, 2005 at 07:05:01PM CEST: * Juergen Leising wrote on Wed, Jul 06, 2005 at 09:03:49AM CEST: The following error message appears due to a bug in func_mode_install (): /bin/sh ../../../libtool --mode=install cp -f 'libeic.la' '/usr/local/lib/bastard/libeic.la' libtool: install: you must specify a destination libtool: install: Try `libtool --help --mode=install' for more information. Proposed patch (against HEAD, similar for backport): I have installed this slightly simpler patch, which also allows backslash as directory separator, to all branches. I decided to ignore the slight chance of misparse that may ensue with a group named `cp': install -g cp ... Cheers, Ralf HEAD/branch-2-0: * config/ltmain.m4sh (func_mode_install): Do not assume `-f' needs an argument if the install program is `cp'. Cleanup install mode somewhat. Reported by Juergen Leising [EMAIL PROTECTED]. Index: config/ltmain.m4sh === RCS file: /cvsroot/libtool/libtool/config/ltmain.m4sh,v retrieving revision 1.72 diff -u -r1.72 ltmain.m4sh --- config/ltmain.m4sh 3 Jul 2005 16:55:50 - 1.72 +++ config/ltmain.m4sh 8 Jul 2005 13:41:32 - @@ -1685,15 +1685,15 @@ # install_prog (especially on Windows NT). if test $nonopt = $SHELL || test $nonopt = /bin/sh || # Allow the use of GNU shtool's install command. - $ECHO X$nonopt | $Xsed | $GREP shtool /dev/null; then + $ECHO X$nonopt | $GREP shtool /dev/null; then # Aesthetically quote it. func_quote_for_eval $nonopt install_prog=$func_quote_for_eval_result - arg=$1 + arg=$1 shift else install_prog= - arg=$nonopt + arg=$nonopt fi # The real first argument should be the name of the installation program. @@ -1713,28 +1713,33 @@ do if test -n $dest; then files=$files $dest - dest=$arg + dest=$arg continue fi case $arg in -d) isdir=yes ;; - -f) prev=-f ;; - -g) prev=-g ;; - -m) prev=-m ;; - -o) prev=-o ;; + -f) + case $install_prog in + *[[\\\ /]]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) + prev=$arg + ;; -s) stripme= -s continue ;; - -*) ;; - + -*) + ;; *) # If the previous option needed an argument, then skip it. if test -n $prev; then prev= else - dest=$arg + dest=$arg continue fi ;; branch-1-5: * ltmain.in (install mode): Do not assume `-f' needs an argument if the install program is `cp'. Cleanup install mode somewhat. Reported by Juergen Leising [EMAIL PROTECTED]. Index: ltmain.in === RCS file: /cvsroot/libtool/libtool/Attic/ltmain.in,v retrieving revision 1.334.2.76 diff -u -r1.334.2.76 ltmain.in --- ltmain.in 3 Jul 2005 16:57:34 - 1.334.2.76 +++ ltmain.in 8 Jul 2005 13:42:26 - @@ -5361,7 +5361,7 @@ # install_prog (especially on Windows NT). if test $nonopt = $SHELL || test $nonopt = /bin/sh || # Allow the use of GNU shtool's install command. - $echo X$nonopt | $Xsed | grep shtool /dev/null; then + $echo X$nonopt | grep shtool /dev/null; then # Aesthetically quote it. arg=`$echo X$nonopt | $Xsed -e $sed_quote_subst` case $arg in @@ -5374,7 +5374,7 @@ shift else install_prog= - arg=$nonopt + arg=$nonopt fi # The real first argument should be the name of the installation program. @@ -5399,28 +5399,31 @@ do if test -n $dest; then files=$files $dest - dest=$arg + dest=$arg continue fi case $arg in -d) isdir=yes ;; - -f) prev=-f ;; - -g) prev=-g ;; - -m) prev=-m ;; - -o) prev=-o ;; + -f) + case $install_prog in + *[\\\ /]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) prev=$arg ;; -s) stripme= -s continue ;; - -*) ;; - + -*) + ;; *) # If the previous option needed an argument, then skip it. if test -n $prev; then prev= else - dest=$arg + dest=$arg continue fi ;;
FYI: branch-1-5: root-owned libtool files in build tree after relink
* Ralf Wildenhues wrote on Sun, Jul 03, 2005 at 10:39:46AM CEST: I noted a work-around in the MirBSD port of Libtool for root-created leftovers in .libs after a `make install' which requires relinking, *snip* Could you confirm that this patch below fixes the issue instead? FYI: I have applied this patch to branch-1-5 (it's already in the other branches). I like the idea of not writing to the build tree at all during relinking (and also relinking in less situations), but both of these issues are orthogonal to the question whether the relink step, if done, needs to clean up after itself. So they will be addressed in another patch.. Regards, Ralf 2005-07-03 Albert Chin-A-Young [EMAIL PROTECTED] * ltmain.in: When a library is installed, dependent on a convenience library, and it involves relinking, the object files extracted from the convenience library are not removed after the relink. This is a problem if you build as non-root, install as root, then try to remove the build directory as non-root; Clean up properly if relink fails; Change $realnameU to ${realname}T to be consistent. Missing backport of 2004-03-24 patch reported against MirLibtool by Marc Matteo [EMAIL PROTECTED]. Index: ltmain.in === RCS file: /cvsroot/libtool/libtool/Attic/ltmain.in,v retrieving revision 1.334.2.74 diff -u -r1.334.2.74 ltmain.in --- ltmain.in 1 Jul 2005 02:23:01 - 1.334.2.74 +++ ltmain.in 3 Jul 2005 08:31:39 - @@ -4009,13 +4009,30 @@ IFS=$save_ifs eval cmd=\$cmd\ $show $cmd - $run eval $cmd || exit $? + $run eval $cmd || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test $mode = relink; then + $run eval '(cd $output_objdir $rm ${realname}T $mv ${realname}U $realname)' + fi + + exit $lt_exit + } done IFS=$save_ifs # Restore the uninstalled library and exit if test $mode = relink; then $run eval '(cd $output_objdir $rm ${realname}T $mv $realname ${realname}T $mv $realnameU $realname)' || exit $? + + if test -n $convenience; then + if test -z $whole_archive_flag_spec; then + $show ${rm}r $gentop + $run ${rm}r $gentop + fi + fi + exit $EXIT_SUCCESS fi @@ -5615,7 +5632,16 @@ IFS=$save_ifs eval cmd=\$cmd\ $show $cmd - $run eval $cmd || exit $? + $run eval $cmd || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test $mode = relink; then + $run eval '(cd $output_objdir $rm ${realname}T $mv ${realname}U $realname)' + fi + + exit $lt_exit + } done IFS=$save_ifs fi
FYI: libtool 1.5.14 on mingw: DLLs must be installed executable
* Bruno Haible wrote on Fri, Jul 08, 2005 at 04:38:16PM CEST: Ralf Wildenhues wrote: Erm, the fix is fine, but what caused the breakage in the first place? Surely this hasn't been broken all the time? For me, it has been broken all the time: It's the first time I've succeeded building a working DLL with mingw and libtool 1.5.x. Maybe something about my setup is particular: it's Windows XP, NTFS, with security permission settings that have been modified by someone else. In other words, it may be not the default config, but it's a config you can easily end up with, without seeing other obvious breakage. OK. Applied to all three branches (patch against branch-2-0/HEAD below). Thanks! Cheers, Ralf 2005-07-08 Bruno Haible [EMAIL PROTECTED] * m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER) postinstall_cmds [cygwin,mingw,pw32]: Make DLL executable after installing it. Index: m4/libtool.m4 === RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v retrieving revision 1.125.2.65 diff -u -r1.125.2.65 libtool.m4 --- m4/libtool.m4 3 Jul 2005 18:15:30 - 1.125.2.65 +++ m4/libtool.m4 8 Jul 2005 14:56:47 - @@ -1817,6 +1817,7 @@ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' test -n '\''$striplib'\''; then $run eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi'
FYI: libtool-1.5.18 -- installed files owned by non-root user
* Peter Breitenlohner wrote on Wed, Jul 06, 2005 at 09:34:24AM CEST: What about simply chown -R root $(DESTDIR)$(ltdldatadir) \ chgrp -R root $(DESTDIR)$(ltdldatadir) || : where failure of chown/chgrp is ignored? Who cares about some noise when `make install' is done by non-root or on non-posix systems, in particular when the cause of such noise can easily be deduced. FYI: I have applied this to all three branches. Thanks, Ralf HEAD/branch-2-0: 2005-07-08 Peter Breitenlohner [EMAIL PROTECTED] * Makefile.am (install-data-local): Have root own of installed files (but do not fail, for user installs). Index: Makefile.am === RCS file: /cvsroot/libtool/libtool/Makefile.am,v retrieving revision 1.153 diff -u -r1.153 Makefile.am --- Makefile.am 2 May 2005 09:20:24 - 1.153 +++ Makefile.am 8 Jul 2005 15:54:01 - @@ -254,6 +254,8 @@ done; \ ( cd $(srcdir)/m4 $(AMTAR) chf - $$aclocalfiles; ) \ | ( umask 0 cd $(DESTDIR)$(aclocaldir) $(AMTAR) xf -; ) + chown -R root $(DESTDIR)$(ltdldatadir) \ + chgrp -R root $(DESTDIR)$(ltdldatadir) || : install-data-hook: chmod +x $(DESTDIR)$(pkgdatadir)/config/config.guess branch-1-5: 2005-07-08 Peter Breitenlohner [EMAIL PROTECTED] * libltdl/Makefile.am (local-install-files): Have root own of installed files (but do not fail, for user installs). Index: libltdl/Makefile.am === RCS file: /cvsroot/libtool/libtool/libltdl/Makefile.am,v retrieving revision 1.42.2.6 diff -u -r1.42.2.6 Makefile.am --- libltdl/Makefile.am 2 May 2005 12:52:07 - 1.42.2.6 +++ libltdl/Makefile.am 8 Jul 2005 15:53:30 - @@ -47,3 +47,5 @@ $(mkinstalldirs) $(DESTDIR)$(ltdldatadir) ( cd $(srcdir) $(AMTAR) chf - $(ltdldatafiles); ) \ | ( umask 0 cd $(DESTDIR)$(ltdldatadir) $(AMTAR) xf -; ) + chown -R root $(DESTDIR)$(ltdldatadir) \ + chgrp -R root $(DESTDIR)$(ltdldatadir) || :
Re: FYI: tests/sh.test uses $SED without setting it
* Ralf Wildenhues wrote on Fri, Jul 08, 2005 at 05:28:06PM CEST: --- tests/defs8 Apr 2005 13:00:50 - 1.5.2.3 +++ tests/defs8 Jul 2005 15:26:53 - @@ -17,8 +17,9 @@ progname=`echo $0 | sed 's%^.*/%%'` libtool=../libtool -make=${MAKE-make} SHELL=${CONFIG_SHELL-/bin/sh} +: ${MAKE=make} +: ${SED=sed} if echo a | (grep -E '(a|b)') /dev/null 21; then EGREP='grep -E' Argh. I'm very sorry. 2005-07-08 Ralf Wildenhues [EMAIL PROTECTED] * tests/defs (make): Undo bogus change I did, and also wrongly attributed to Derek R. Price. Index: tests/defs === RCS file: /cvsroot/libtool/libtool/tests/Attic/defs,v retrieving revision 1.5.2.4 diff -u -r1.5.2.4 defs --- tests/defs 8 Jul 2005 15:27:52 - 1.5.2.4 +++ tests/defs 8 Jul 2005 15:47:00 - @@ -17,8 +17,8 @@ progname=`echo $0 | sed 's%^.*/%%'` libtool=../libtool +make=${MAKE-make} SHELL=${CONFIG_SHELL-/bin/sh} -: ${MAKE=make} : ${SED=sed} if echo a | (grep -E '(a|b)') /dev/null 21; then
Re: FYI: libtool-1.5.18 -- installed files owned by non-root user
Hallo Ralf, Sorry for the late review: On 8 Jul 2005, at 16:57, Ralf Wildenhues wrote: 2005-07-08 Peter Breitenlohner [EMAIL PROTECTED] * Makefile.am (install-data-local): Have root own of installed files (but do not fail, for user installs). Index: Makefile.am === RCS file: /cvsroot/libtool/libtool/Makefile.am,v retrieving revision 1.153 diff -u -r1.153 Makefile.am --- Makefile.am2 May 2005 09:20:24 -1.153 +++ Makefile.am8 Jul 2005 15:54:01 - @@ -254,6 +254,8 @@ done; \ ( cd $(srcdir)/m4 $(AMTAR) chf - $$aclocalfiles; ) \ | ( umask 0 cd $(DESTDIR)$(aclocaldir) $(AMTAR) xf -; ) +chown -R root $(DESTDIR)$(ltdldatadir) \ +chgrp -R root $(DESTDIR)$(ltdldatadir) || : What about: -chown -R root $(DESTDIR)$(ltdldatadir) 2/dev/null -chgrp -R root $(DESTDIR)$(ltdldatadir) 2/dev/null Cheers, Gary. -- Gary V. Vaughan ())_. gary@ {lilith.warpmail.net,gnu.org},[EMAIL PROTECTED] Research Scientist ( '/ http://www.tkd.kicks-ass.net GNU Hacker / )= http://www.gnu.org/software/{libtool,m4} Technical Author `(_~)_ http://sources.redhat.com/autobook PGP.sig Description: This is a digitally signed message part