Re: libtool: lib: command not found
Thank you! Peter your comments pointed me in the right direction, CXX and LD in the env seem to be not needed --host is enough, LT_INIT need [win32-dll] and libexample_la_LDFLAGS need -no-undefined. Got static and shared dll built. Cheers Alex > Ok, this is strange. > > You have this in your "libtool --config": > > # Commands used to build an old-style archive. > old_archive_cmds="lib -OUT:\$oldlib\$oldobjs\$old_deplibs" > > Looking in the libtool.m4 file, the only way for "lib -OUT..." > to be chosen is > > if test yes = "$lt_use_gnu_ld_interface" > > doesn't match. > > > Your "libtool --config" also has: > > # Whether we are building with GNU ld or not. > with_gnu_ld="no" > > which seems strange on Debian. > > Looking in your config.log, I find > > configure:4994: checking for ld used by i686-w64-mingw32-gcc > configure:5061: result: i686-w64-mingw32-g++-win32 > configure:5068: checking if the linker (i686-w64-mingw32-g++-win32) is > GNU ld > configure:5083: result: no > > which is the cause of the above strangeness. What is the output from: > > i686-w64-mingw32-g++-win32 -v Using built-in specs. COLLECT_GCC=i686-w64-mingw32-g++-win32 COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-w64-mingw32/4.9-win32/lto-wrapper Target: i686-w64-mingw32 Configured with: ../../src/configure --build=i586-linux-gnu --prefix=/usr --includedir='/usr/include' --mandir='/usr/share/man' --infodir='/usr/share/info' --sysconfdir=/etc --localstatedir=/var --libexecdir='/usr/lib/gcc-mingw-w64' --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --enable-shared --enable-static --disable-multilib --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --libdir=/usr/lib --enable-libstdcxx-time=yes --with-tune=generic --enable-version-specific-runtime-libs --enable-fully-dynamic-string --enable-libgomp --enable-languages=c,c++,fortran,objc,obj-c++ --enable-lto --with-plugin-ld --enable-threads=win32 --program-suffix=-win32 --program-prefix=i686-w64-mingw32- --target=i686-w64-mingw32 --with-as=/usr/bin/i686-w64-mingw32-as --with-ld=/usr/bin/i686-w64-mingw32-ld Thread model: win32 gcc version 4.9.1 (GCC) > Libtool assumes that GNU ld produces something that matches: > > *GNU* | *'with BFD'* > > Cheers, > Peter > ___ https://lists.gnu.org/mailman/listinfo/libtool
Re: libtool: lib: command not found
On 2014-09-05 17:19, raz...@eml.cc wrote: > On Fri, Sep 05, 2014 at 05:05:52PM +0200, Peter Rosin wrote: >> On 2014-09-05 16:52, raz...@eml.cc wrote: >>> Hi Peter, thank you >>> >>> attacched the zzip config.log. >> >> Bleh, sorry, but could you also provide the output from >> >> ./libtool --config >> >> from your build directory? > > Attacched > > dpkg -L "*libtool*": > libtool 2.4.2-1.10 > libtool-bin 2.4.2-1.10 Ok, this is strange. You have this in your "libtool --config": # Commands used to build an old-style archive. old_archive_cmds="lib -OUT:\$oldlib\$oldobjs\$old_deplibs" Looking in the libtool.m4 file, the only way for "lib -OUT..." to be chosen is if test yes = "$lt_use_gnu_ld_interface" doesn't match. Your "libtool --config" also has: # Whether we are building with GNU ld or not. with_gnu_ld="no" which seems strange on Debian. Looking in your config.log, I find configure:4994: checking for ld used by i686-w64-mingw32-gcc configure:5061: result: i686-w64-mingw32-g++-win32 configure:5068: checking if the linker (i686-w64-mingw32-g++-win32) is GNU ld configure:5083: result: no which is the cause of the above strangeness. What is the output from: i686-w64-mingw32-g++-win32 -v Libtool assumes that GNU ld produces something that matches: *GNU* | *'with BFD'* Cheers, Peter ___ https://lists.gnu.org/mailman/listinfo/libtool
Re: libtool: lib: command not found
On Fri, Sep 05, 2014 at 05:05:52PM +0200, Peter Rosin wrote: > On 2014-09-05 16:52, raz...@eml.cc wrote: > > Hi Peter, thank you > > > > attacched the zzip config.log. > > Bleh, sorry, but could you also provide the output from > > ./libtool --config > > from your build directory? Attacched dpkg -L "*libtool*": libtool 2.4.2-1.10 libtool-bin 2.4.2-1.10 test-libtool-config.gz Description: application/gzip ___ https://lists.gnu.org/mailman/listinfo/libtool
Re: libtool: lib: command not found
On 2014-09-05 16:52, raz...@eml.cc wrote: > Hi Peter, thank you > > attacched the zzip config.log. Bleh, sorry, but could you also provide the output from ./libtool --config from your build directory? Cheers, Peter ___ https://lists.gnu.org/mailman/listinfo/libtool
Re: libtool: lib: command not found
Hi Peter, thank you attacched the zzip config.log. But the problem seem to be with any lib I try to cross build with mingw and libtool, I wasn't sure the mail was sent to the mailing list (usually I see immediatly the sent mail in mutt but not in this case) so I've done a sort of cross posting *sorry* with a more generic case: http://stackoverflow.com/questions/25687097/mingw-w64-libtool-lib-command-not-found (attacched also this test config.log and the sources I'm using) On Fri, Sep 05, 2014 at 04:21:33PM +0200, Peter Rosin wrote: > Hi! > > On 2014-09-05 13:28, raz...@eml.cc wrote: > > I'm having some trouble cross building libraries from a Linux machine > > (Debian/unstable) using mingw-w64, seem libtool is looking for a "lib" > > command to generate a .lib library, but the command is missing and I > > can't find it in any package (on stackoverflow I've seen for the same > > problem on Windows is just a matter of adding the path > > VC/bin to the env to let the command be found, but I suspect on Linux > > the lib command doesn't exist at all and something else is wrong). > > > > Here's a libzzip output example but I've the same problem with > > another lib (I suspect any). > > > > libtool: link: warning: undefined symbols not allowed in > > i686-w64-mingw32 shared libraries > > ../libtool: line 1095: lib: command not found > > Makefile:566: recipe for target 'libzzip.la' failed > > You seem to have configured libzzip in such a way that it thinks it is > should be built with Microsoft tools. That may not be your fault, but > can we see the config.log file please? > > The "undefined symbols" warning suggests that the project has not been > ported to Windows, or at least not the autotools build system. > > Cheers, > Peter > > > ___ > https://lists.gnu.org/mailman/listinfo/libtool > zzip-config.log.gz Description: application/gzip test-config.log.gz Description: application/gzip test2.tgz Description: application/gtar-compressed ___ https://lists.gnu.org/mailman/listinfo/libtool
Re: libtool: lib: command not found
Hi! On 2014-09-05 13:28, raz...@eml.cc wrote: > I'm having some trouble cross building libraries from a Linux machine > (Debian/unstable) using mingw-w64, seem libtool is looking for a "lib" > command to generate a .lib library, but the command is missing and I > can't find it in any package (on stackoverflow I've seen for the same > problem on Windows is just a matter of adding the path > VC/bin to the env to let the command be found, but I suspect on Linux > the lib command doesn't exist at all and something else is wrong). > > Here's a libzzip output example but I've the same problem with > another lib (I suspect any). > > libtool: link: warning: undefined symbols not allowed in > i686-w64-mingw32 shared libraries > ../libtool: line 1095: lib: command not found > Makefile:566: recipe for target 'libzzip.la' failed You seem to have configured libzzip in such a way that it thinks it is should be built with Microsoft tools. That may not be your fault, but can we see the config.log file please? The "undefined symbols" warning suggests that the project has not been ported to Windows, or at least not the autotools build system. Cheers, Peter ___ https://lists.gnu.org/mailman/listinfo/libtool