Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <41695465.7020608@x-ray.at> Date: Sun, 10 Oct 2004 17:25:25 +0200 From: Reini Urban User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.8a3) Gecko/20040817 MIME-Version: 1.0 To: Charles Wilson CC: cygwin AT cygwin DOT com Subject: Re: libtool bug References: <16741 DOT 49587 DOT 333388 DOT 685699 AT byrd DOT xs4all DOT nl> <1968842951 DOT 20041008015659 AT familiehaase DOT de> <41662639 DOT 3030306 AT cwilson DOT fastmail DOT fm> <87d5zt4r3g DOT fsf AT peder DOT flower> <657467259 DOT 20041008123554 AT familiehaase DOT de> <41671F91 DOT 8020508 AT cwilson DOT fastmail DOT fm> <41687EAA DOT 3080100 AT cwilson DOT fastmail DOT fm> <4168A48E DOT 8070303 AT cwilson DOT fastmail DOT fm> In-Reply-To: <4168A48E.8070303@cwilson.fastmail.fm> Content-Type: multipart/mixed; boundary="------------000809050107020007010000" X-IsSubscribed: yes --------------000809050107020007010000 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Charles Wilson schrieb: > The attached patch (against libtool cvs branch 2.0) ain't pretty, but it > works on cygwin and shouldn't break other platforms. ------------------------------------------------------------------------ > 2004-10-09 Charles Wilson > > * config/ltmain.m4sh (func_mode_link): don't relink > on cygwin/mingw; no need. But do ensure that wrappers > are created unless doing a purely static build. > Which will leed to this backported patch (attached) for our folks using libtool-devel-1.5.10-1. (patch uses absolute paths) libtool-2cvs is a bit advanced, but this is essentially what charles patch did. It did help on re-building gdal, esp. in the make install step. I will also check on my other failing packages. (libming, php) But it didn't help on another (related?) new cygwin libtool problem: Sometimes it switches to .exe instead of .dll. Will investigate this further. My current theory is that -o just missed the .dll extension and .exe is then taken as default. /bin/sh.exe ./libtool --mode=link g++ $LIBS -Wl,--enable-runtime-pseudo-reloc -o libgdal.la ./gcore/*.lo ./port/*.lo ./alg/*.lo ... \ -rpath /usr/lib \ -no-undefined \ -version-info 5:1:4 rm -fr .libs/libgdal.a .libs/libgdal.dll.a .libs/libgdal.la .libs/libgdal.lai creating reloadable object files... creating a temporary reloadable object file: .libs/libgdal.la-2.o /usr/i686-pc-cygwin/bin/ld.exe -r -o .libs/libgdal.la-1.o $OBJS... /usr/i686-pc-cygwin/bin/ld.exe -r -o .libs/libgdal.la-2.o $OBJS... g++ -shared -nostdlib .libs/libgdal.la-2.o -L/usr/lib /usr/lib/libgeos.dll.a /usr/lib/libjasper.dll.a /usr/lib/libpng.dll.a /usr/lib/libz.dll.a /usr/lib/libsqlite3.dll.a -L/lib /usr/lib/libpq.dll.a -L/usr/lib/gcc/i686-pc-cygwin/3.4.1 -L/usr/lib/gcc/i686-pc-cygwin/3.4.1/../../.. -lstdc++ -lgcc -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32 -lgcc -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-runtime-pseudo-reloc -o .libs/cyggdal-1 -Wl,--image-base=0x10000000 ^^^ .dll missing! -Wl,--out-implib,.libs/libgdal.dll.a does this ring a bell somewhere? $output missing the extension. I see in one code section that for case $linkmode prog) the .exe extension and then any extension is stripped. case $linkmode in ... prog) case $host in *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac but we are in linkmode=lib. and this is the failing place, exactly after your patch: if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` $output misses the ".dll" I would rather use something like this: compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/${outputname}${shrext}"'%g'` correct? -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ --------------000809050107020007010000 Content-Type: text/plain; name="libtool-relink.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="libtool-relink.patch" --- /usr/autotool/devel/share/libtool/ltmain.sh-1.5.10 2004-09-22 08:50:51.001000000 +0200 +++ /usr/autotool/devel/share/libtool/ltmain.sh 2004-10-10 15:19:24.098794800 +0200 @@ -2414,10 +2414,19 @@ link_static=no # Whether the deplib will be linked statically if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + case $host in + *cygwin* | *mingw*) + # No point in relinking DLLs because paths are not encoded + notinst_deplibs="$notinst_deplibs $lib" + need_relink=no + ;; + *) if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi + ;; + esac # This is a shared library # Warn about portability, can't link against -module's on @@ -4499,7 +4508,20 @@ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi + wrappers_required=yes + case $host in + *cygwin* | *mingw* ) + if test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + esac + if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" --------------000809050107020007010000 Content-Type: text/plain; charset=us-ascii -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ --------------000809050107020007010000--