Package: libtool;
Reported by: Andreas Otto <aotto1968 <at> t-online.de>
Date: Tue, 26 Mar 2013 09:41:01 UTC
Severity: normal
To reply to this bug, email your comments to 14055 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
bug-libtool <at> gnu.org
:bug#14055
; Package libtool
.
(Tue, 26 Mar 2013 09:41:02 GMT) Full text and rfc822 format available.Andreas Otto <aotto1968 <at> t-online.de>
:bug-libtool <at> gnu.org
.
(Tue, 26 Mar 2013 09:41:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Andreas Otto <aotto1968 <at> t-online.de> To: bug-libtool <at> gnu.org Subject: windows link problem with ".lib" files Date: Tue, 26 Mar 2013 10:38:02 +0100
[Message part 1 (text/plain, inline)]
Hi, from time to time I use my automake/libtool project to build libraries on windows ... this create al least problems ... my actual problem is, I got a tcl distrubution from activestate providing a libraray: C:/Tcl/lib/tcl8.6.lib and using the libtool command: /bin/sh ../../libtool --tag=CC --mode=link /usr/bin/ccache x86_64-w64-mingw32-gcc -std=gnu99 -shared -I/home/dev1usr/Project/NHI1/theLink/tclmsgque/../libmsgque -IC:/Tcl/include -DMQ_IGNORE_EXTERN -g -Wall -Wcast-align -g -O2 -shared -module -avoid-version -no-undefined*-LC:/Tcl/lib -ltcl86* -o tclmsgque.la -rpath /usr/local/lib/NHI1 tclmsgque_la-MqS_tcl.lo tclmsgque_la-misc_tcl.lo tclmsgque_la-msgque_tcl.lo tclmsgque_la-read_tcl.lo tclmsgque_la-send_tcl.lo tclmsgque_la-config_tcl.lo tclmsgque_la-service_tcl.lo tclmsgque_la-slave_tcl.lo tclmsgque_la-MqBufferS_tcl.lo tclmsgque_la-error_tcl.lo tclmsgque_la-link_tcl.lo tclmsgque_la-MqFactoryS_tcl.lo tclmsgque_la-MqDumpS_tcl.lo ../libmsgque/libtmp.la with "*-LC:/Tcl/lib -ltcl86*" I got the mystic libtool error message that the library is NOT found ... using the "--debug" option give a hint .... libtool does not serach for the "right" name ... If I copy the file tcl86.lib to libtcl86.a in the same directory .... => everything works fine. and now my question: why does "libtool" on "windows" does NOT search for "*.lib" files => enduser would be happy to save debugging hours ;-) Hint, I use the mingw cross compiler but this is NOT the problem. mfg AO
[Message part 2 (text/html, inline)]
bug-libtool <at> gnu.org
:bug#14055
; Package libtool
.
(Tue, 26 Mar 2013 14:08:01 GMT) Full text and rfc822 format available.Message #8 received at 14055 <at> debbugs.gnu.org (full text, mbox):
From: Peter Rosin <peda <at> lysator.liu.se> To: Andreas Otto <aotto1968 <at> t-online.de> Cc: 14055 <at> debbugs.gnu.org Subject: Re: bug#14055: windows link problem with ".lib" files Date: Tue, 26 Mar 2013 15:05:28 +0100
On 2013-03-26 10:38, Andreas Otto wrote: > Hi, > > from time to time I use my automake/libtool project to build libraries on windows ... > this create al least problems ... > > my actual problem is, I got a tcl distrubution from activestate providing a libraray: > > C:/Tcl/lib/tcl8.6.lib > > and using the libtool command: > > /bin/sh ../../libtool --tag=CC --mode=link /usr/bin/ccache x86_64-w64-mingw32-gcc -std=gnu99 -shared -I/home/dev1usr/Project/NHI1/theLink/tclmsgque/../libmsgque -IC:/Tcl/include -DMQ_IGNORE_EXTERN -g -Wall -Wcast-align -g -O2 -shared -module -avoid-version -no-undefined*-LC:/Tcl/lib -ltcl86* -o tclmsgque.la -rpath /usr/local/lib/NHI1 tclmsgque_la-MqS_tcl.lo tclmsgque_la-misc_tcl.lo tclmsgque_la-msgque_tcl.lo tclmsgque_la-read_tcl.lo tclmsgque_la-send_tcl.lo tclmsgque_la-config_tcl.lo tclmsgque_la-service_tcl.lo tclmsgque_la-slave_tcl.lo tclmsgque_la-MqBufferS_tcl.lo tclmsgque_la-error_tcl.lo tclmsgque_la-link_tcl.lo tclmsgque_la-MqFactoryS_tcl.lo tclmsgque_la-MqDumpS_tcl.lo ../libmsgque/libtmp.la > > with "*-LC:/Tcl/lib -ltcl86*" I got the mystic libtool error message that the library is NOT found ... It would help if you quoted the error message. > using the "--debug" option give a hint .... It would help if you shared the hint. > libtool does not serach for the "right" name ... > > If I copy the file tcl86.lib to libtcl86.a in the same directory .... > > => everything works fine. > > and now my question: > > why does "libtool" on "windows" does NOT search for "*.lib" files I'll try to answer when you have provided the above details. > => enduser would be happy to save debugging hours ;-) > > Hint, I use the mingw cross compiler but this is NOT the problem. Since you are using a cross compiler (presumably still from Cygwin), you should not feed it Windows paths, you should feed it POSIX paths. I.e. something like "-L/cygdrive/c/Tcl/lib -ltcl86". In addition to that, you (or the package) have specified the library before any object files, which is not the right thing to do. Try this: /bin/sh ../../libtool --tag=CC --mode=link /usr/bin/ccache x86_64-w64-mingw32-gcc -std=gnu99 -shared -I/home/dev1usr/Project/NHI1/theLink/tclmsgque/../libmsgque -I/cygdrive/c/Tcl/include -DMQ_IGNORE_EXTERN -g -Wall -Wcast-align -g -O2 -shared -module -avoid-version -no-undefined -L/cygdrive/c/Tcl/lib -o tclmsgque.la -rpath /usr/local/lib/NHI1 tclmsgque_la-MqS_tcl.lo tclmsgque_la-misc_tcl.lo tclmsgque_la-msgque_tcl.lo tclmsgque_la-read_tcl.lo tclmsgque_la-send_tcl.lo tclmsgque_la-config_tcl.lo tclmsgque_la-service_tcl.lo tclmsgque_la-slave_tcl.lo tclmsgque_la-MqBufferS_tcl.lo tclmsgque_la-error_tcl.lo tclmsgque_la-link_tcl.lo tclmsgque_la-MqFactoryS_tcl.lo tclmsgque_la-MqDumpS_tcl.lo ../libmsgque/libtmp.la -ltcl86 Cheers, Peter
bug-libtool <at> gnu.org
:bug#14055
; Package libtool
.
(Tue, 26 Mar 2013 15:25:01 GMT) Full text and rfc822 format available.Message #11 received at 14055 <at> debbugs.gnu.org (full text, mbox):
From: Andreas Otto <aotto1968 <at> t-online.de> To: Peter Rosin <peda <at> lysator.liu.se> Cc: 14055 <at> debbugs.gnu.org Subject: Re: bug#14055: windows link problem with ".lib" files Date: Tue, 26 Mar 2013 16:21:48 +0100
[Message part 1 (text/plain, inline)]
Hi, additional output: /bin/sh ../../libtool --tag=CC --mode=link /usr/bin/ccache x86_64-w64-mingw32-gcc -std=gnu99 -shared -I/home/dev1usr/Project/NHI1/theLink/tclmsgque/../libmsgque -I/cygdrive/c/Tcl/include -DMQ_IGNORE_EXTERN -g -Wall -Wcast-align -g -O2 -shared -module -avoid-version -no-undefined -L/cygdrive/c/Tcl/lib -ltcl86 -o tclmsgque.la -rpath /usr/local/lib/NHI1 tclmsgque_la-MqS_tcl.lo tclmsgque_la-misc_tcl.lo tclmsgque_la-msgque_tcl.lo tclmsgque_la-read_tcl.lo tclmsgque_la-send_tcl.lo tclmsgque_la-config_tcl.lo tclmsgque_la-service_tcl.lo tclmsgque_la-slave_tcl.lo tclmsgque_la-MqBufferS_tcl.lo tclmsgque_la-error_tcl.lo tclmsgque_la-link_tcl.lo tclmsgque_la-MqFactoryS_tcl.lo tclmsgque_la-MqDumpS_tcl.lo ../libmsgque/libtmp.la *** Warning: linker path does not have real file for library -ltcl86. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have *** because I did check the linker path looking for a file starting *** with libtcl86 but no candidates were found. (...for file magic test) *** Warning: libtool could not satisfy all declared inter-library *** dependencies of module tclmsgque. Therefore, libtool will create *** a static module, that should work as long as the dlopening *** application is linked with the -dlopen flag. The Attachment has the link error ... the important part is... + for search_ext in .la '$std_shrext' .so .a + lib=/cygdrive/c/Tcl/lib/libtcl86.la + test -f /cygdrive/c/Tcl/lib/libtcl86.la + for search_ext in .la '$std_shrext' .so .a + lib=/cygdrive/c/Tcl/lib/libtcl86.dll + test -f /cygdrive/c/Tcl/lib/libtcl86.dll + for search_ext in .la '$std_shrext' .so .a + lib=/cygdrive/c/Tcl/lib/libtcl86.so + test -f /cygdrive/c/Tcl/lib/libtcl86.so + for search_ext in .la '$std_shrext' .so .a + lib=/cygdrive/c/Tcl/lib/libtcl86.a + test -f /cygdrive/c/Tcl/lib/libtcl86.a mfg AO Am 26.03.2013 15:05, schrieb Peter Rosin: > On 2013-03-26 10:38, Andreas Otto wrote: >> Hi, >> >> from time to time I use my automake/libtool project to build libraries on windows ... >> this create al least problems ... >> >> my actual problem is, I got a tcl distrubution from activestate providing a libraray: >> >> C:/Tcl/lib/tcl8.6.lib >> >> and using the libtool command: >> >> /bin/sh ../../libtool --tag=CC --mode=link /usr/bin/ccache x86_64-w64-mingw32-gcc -std=gnu99 -shared -I/home/dev1usr/Project/NHI1/theLink/tclmsgque/../libmsgque -IC:/Tcl/include -DMQ_IGNORE_EXTERN -g -Wall -Wcast-align -g -O2 -shared -module -avoid-version -no-undefined*-LC:/Tcl/lib -ltcl86* -o tclmsgque.la -rpath /usr/local/lib/NHI1 tclmsgque_la-MqS_tcl.lo tclmsgque_la-misc_tcl.lo tclmsgque_la-msgque_tcl.lo tclmsgque_la-read_tcl.lo tclmsgque_la-send_tcl.lo tclmsgque_la-config_tcl.lo tclmsgque_la-service_tcl.lo tclmsgque_la-slave_tcl.lo tclmsgque_la-MqBufferS_tcl.lo tclmsgque_la-error_tcl.lo tclmsgque_la-link_tcl.lo tclmsgque_la-MqFactoryS_tcl.lo tclmsgque_la-MqDumpS_tcl.lo ../libmsgque/libtmp.la >> >> with "*-LC:/Tcl/lib -ltcl86*" I got the mystic libtool error message that the library is NOT found ... > It would help if you quoted the error message. > >> using the "--debug" option give a hint .... > It would help if you shared the hint. > >> libtool does not serach for the "right" name ... >> >> If I copy the file tcl86.lib to libtcl86.a in the same directory .... >> >> => everything works fine. >> >> and now my question: >> >> why does "libtool" on "windows" does NOT search for "*.lib" files > I'll try to answer when you have provided the above details. > >> => enduser would be happy to save debugging hours ;-) >> >> Hint, I use the mingw cross compiler but this is NOT the problem. > Since you are using a cross compiler (presumably still from Cygwin), > you should not feed it Windows paths, you should feed it POSIX > paths. I.e. something like "-L/cygdrive/c/Tcl/lib -ltcl86". In addition > to that, you (or the package) have specified the library before any > object files, which is not the right thing to do. Try this: > > /bin/sh ../../libtool --tag=CC --mode=link /usr/bin/ccache x86_64-w64-mingw32-gcc -std=gnu99 -shared -I/home/dev1usr/Project/NHI1/theLink/tclmsgque/../libmsgque -I/cygdrive/c/Tcl/include -DMQ_IGNORE_EXTERN -g -Wall -Wcast-align -g -O2 -shared -module -avoid-version -no-undefined -L/cygdrive/c/Tcl/lib -o tclmsgque.la -rpath /usr/local/lib/NHI1 tclmsgque_la-MqS_tcl.lo tclmsgque_la-misc_tcl.lo tclmsgque_la-msgque_tcl.lo tclmsgque_la-read_tcl.lo tclmsgque_la-send_tcl.lo tclmsgque_la-config_tcl.lo tclmsgque_la-service_tcl.lo tclmsgque_la-slave_tcl.lo tclmsgque_la-MqBufferS_tcl.lo tclmsgque_la-error_tcl.lo tclmsgque_la-link_tcl.lo tclmsgque_la-MqFactoryS_tcl.lo tclmsgque_la-MqDumpS_tcl.lo ../libmsgque/libtmp.la -ltcl86 > > Cheers, > Peter >
[libtool_link_error.log (text/plain, attachment)]
bug-libtool <at> gnu.org
:bug#14055
; Package libtool
.
(Tue, 26 Mar 2013 15:37:02 GMT) Full text and rfc822 format available.Message #14 received at 14055 <at> debbugs.gnu.org (full text, mbox):
From: Andreas Otto <aotto1968 <at> t-online.de> To: Peter Rosin <peda <at> lysator.liu.se> Cc: 14055 <at> debbugs.gnu.org Subject: Re: bug#14055: windows link problem with ".lib" files Date: Tue, 26 Mar 2013 16:34:13 +0100
[Message part 1 (text/plain, inline)]
Hi, in addition ... 1) my libtooll config -> attachment 2) $ sh ./libtool --features host: x86_64-w64-mingw32 enable shared libraries disable static libraries 3) put the library with absolute path '/cygdrive/c/Tcl/lib/tcl86.lib' does not work ... + /bin/sh ../../libtool --tag=CC --verbose --mode=link /usr/bin/ccache x86_64-w64-mingw32-gcc -std=gnu99 -shared -I/home/dev1usr/Project/NHI1/theLink/tclmsgque/../libmsgque -I/cygdrive/c/Tcl/include -DMQ_IGNORE_EXTERN -g -Wall -Wcast-align -g -O2 -shared -module -avoid-version -no-undefined /cygdrive/c/Tcl/lib/tcl86.lib -o tclmsgque.la -rpath /usr/local/lib/NHI1 tclmsgque_la-MqS_tcl.lo tclmsgque_la-misc_tcl.lo tclmsgque_la-msgque_tcl.lo tclmsgque_la-read_tcl.lo tclmsgque_la-send_tcl.lo tclmsgque_la-config_tcl.lo tclmsgque_la-service_tcl.lo tclmsgque_la-slave_tcl.lo tclmsgque_la-MqBufferS_tcl.lo tclmsgque_la-error_tcl.lo tclmsgque_la-link_tcl.lo tclmsgque_la-MqFactoryS_tcl.lo tclmsgque_la-MqDumpS_tcl.lo ../libmsgque/libtmp.la libtool: link: rm -fr .libs/tclmsgque.dll.a libtool: link: x86_64-w64-mingw32-gcc -std=gnu99 -shared .libs/tclmsgque_la-MqS_tcl.o .libs/tclmsgque_la-misc_tcl.o .libs/tclmsgque_la-msgque_tcl.o .libs/tclmsgque_la-read_tcl.o .libs/tclmsgque_la-send_tcl.o .libs/tclmsgque_la-config_tcl.o .libs/tclmsgque_la-service_tcl.o .libs/tclmsgque_la-slave_tcl.o .libs/tclmsgque_la-MqBufferS_tcl.o .libs/tclmsgque_la-error_tcl.o .libs/tclmsgque_la-link_tcl.o .libs/tclmsgque_la-MqFactoryS_tcl.o .libs/tclmsgque_la-MqDumpS_tcl.o -Wl,--whole-archive ../libmsgque/.libs/libtmp.a -Wl,--no-whole-archive -lws2_32 -O2 -o .libs/tclmsgque.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/tclmsgque.dll.a Creating library file: .libs/tclmsgque.dll.a.libs/tclmsgque_la-MqS_tcl.o: In function `Tclmsgque_ThreadExit': /home/dev1usr/Project/NHI1/theLink/tclmsgque/MqS_tcl.c:86: undefined reference to `__imp_Tcl_FinalizeThread' .libs/tclmsgque_la-MqS_tcl.o: In function `Tclmsgque_ProcessExit': /home/dev1usr/Project/NHI1/theLink/tclmsgque/MqS_tcl.c:78: undefined reference to `__imp_Tcl_Exit' .libs/tclmsgque_la-MqS_tcl.o: In function `Tclmsgque_MqS_Free': /home/dev1usr/Project/NHI1/theLink/tclmsgque/MqS_tcl.c:612: undefined reference to `__imp_TclFreeObj' .libs/tclmsgque_la-MqS_tcl.o: In function `Tclmsgque_MqS_Cmd': /home/dev1usr/Project/NHI1/theLink/tclmsgque/MqS_tcl.c:585: undefined reference to `__imp_Tcl_GetIndexFromObjStruct' /home/dev1usr/Project/NHI1/theLink/tclmsgque/MqS_tcl.c:581: undefined reference to `__imp_Tcl_WrongNumArgs' .libs/tclmsgque_la-MqS_tcl.o: In function `Tclmsgque_StorageDelete': /home/dev1usr/Project/NHI1/theLink/tclmsgque/MqS_tcl.c:148: undefined reference to `__imp_Tcl_GetWideIntFromObj' /home/dev1usr/Project/NHI1/theLink/tclmsgque/MqS_tcl.c:149: undefined reference to `__imp_Tcl_WrongNumArgs' /home/dev1usr/Project/NHI1/theLink/tclmsgque/MqS_tcl.c:148: undefined reference to `__imp_Tcl_WrongNumArgs' .libs/tclmsgque_la-MqS_tcl.o: In function `Tclmsgque_StorageSelect': I have to rename the library from 'C:\Tcl\lib\tcl86.lib' to 'C:\Tcl\lib\libtcl86.a' make the project compile-able mfg AO Am 26.03.2013 15:05, schrieb Peter Rosin: > On 2013-03-26 10:38, Andreas Otto wrote: >> Hi, >> >> from time to time I use my automake/libtool project to build libraries on windows ... >> this create al least problems ... >> >> my actual problem is, I got a tcl distrubution from activestate providing a libraray: >> >> C:/Tcl/lib/tcl8.6.lib >> >> and using the libtool command: >> >> /bin/sh ../../libtool --tag=CC --mode=link /usr/bin/ccache x86_64-w64-mingw32-gcc -std=gnu99 -shared -I/home/dev1usr/Project/NHI1/theLink/tclmsgque/../libmsgque -IC:/Tcl/include -DMQ_IGNORE_EXTERN -g -Wall -Wcast-align -g -O2 -shared -module -avoid-version -no-undefined*-LC:/Tcl/lib -ltcl86* -o tclmsgque.la -rpath /usr/local/lib/NHI1 tclmsgque_la-MqS_tcl.lo tclmsgque_la-misc_tcl.lo tclmsgque_la-msgque_tcl.lo tclmsgque_la-read_tcl.lo tclmsgque_la-send_tcl.lo tclmsgque_la-config_tcl.lo tclmsgque_la-service_tcl.lo tclmsgque_la-slave_tcl.lo tclmsgque_la-MqBufferS_tcl.lo tclmsgque_la-error_tcl.lo tclmsgque_la-link_tcl.lo tclmsgque_la-MqFactoryS_tcl.lo tclmsgque_la-MqDumpS_tcl.lo ../libmsgque/libtmp.la >> >> with "*-LC:/Tcl/lib -ltcl86*" I got the mystic libtool error message that the library is NOT found ... > It would help if you quoted the error message. > >> using the "--debug" option give a hint .... > It would help if you shared the hint. > >> libtool does not serach for the "right" name ... >> >> If I copy the file tcl86.lib to libtcl86.a in the same directory .... >> >> => everything works fine. >> >> and now my question: >> >> why does "libtool" on "windows" does NOT search for "*.lib" files > I'll try to answer when you have provided the above details. > >> => enduser would be happy to save debugging hours ;-) >> >> Hint, I use the mingw cross compiler but this is NOT the problem. > Since you are using a cross compiler (presumably still from Cygwin), > you should not feed it Windows paths, you should feed it POSIX > paths. I.e. something like "-L/cygdrive/c/Tcl/lib -ltcl86". In addition > to that, you (or the package) have specified the library before any > object files, which is not the right thing to do. Try this: > > /bin/sh ../../libtool --tag=CC --mode=link /usr/bin/ccache x86_64-w64-mingw32-gcc -std=gnu99 -shared -I/home/dev1usr/Project/NHI1/theLink/tclmsgque/../libmsgque -I/cygdrive/c/Tcl/include -DMQ_IGNORE_EXTERN -g -Wall -Wcast-align -g -O2 -shared -module -avoid-version -no-undefined -L/cygdrive/c/Tcl/lib -o tclmsgque.la -rpath /usr/local/lib/NHI1 tclmsgque_la-MqS_tcl.lo tclmsgque_la-misc_tcl.lo tclmsgque_la-msgque_tcl.lo tclmsgque_la-read_tcl.lo tclmsgque_la-send_tcl.lo tclmsgque_la-config_tcl.lo tclmsgque_la-service_tcl.lo tclmsgque_la-slave_tcl.lo tclmsgque_la-MqBufferS_tcl.lo tclmsgque_la-error_tcl.lo tclmsgque_la-link_tcl.lo tclmsgque_la-MqFactoryS_tcl.lo tclmsgque_la-MqDumpS_tcl.lo ../libmsgque/libtmp.la -ltcl86 > > Cheers, > Peter >
[libtool.config (text/plain, attachment)]
bug-libtool <at> gnu.org
:bug#14055
; Package libtool
.
(Tue, 26 Mar 2013 16:20:02 GMT) Full text and rfc822 format available.Message #17 received at 14055 <at> debbugs.gnu.org (full text, mbox):
From: Peter Rosin <peda <at> lysator.liu.se> To: Andreas Otto <aotto1968 <at> t-online.de> Cc: 14055 <at> debbugs.gnu.org Subject: Re: bug#14055: windows link problem with ".lib" files Date: Tue, 26 Mar 2013 17:17:17 +0100
On 2013-03-26 16:34, Andreas Otto wrote: > Hi, > > in addition ... > > 1) > > my libtooll config -> attachment > > 2) > > $ sh ./libtool --features > host: x86_64-w64-mingw32 > enable shared libraries > disable static libraries > > 3) > > put the library with absolute path '/cygdrive/c/Tcl/lib/tcl86.lib' does not work ... > > + /bin/sh ../../libtool --tag=CC --verbose --mode=link /usr/bin/ccache x86_64-w64-mingw32-gcc -std=gnu99 -shared -I/home/dev1usr/Project/NHI1/theLink/tclmsgque/../libmsgque -I/cygdrive/c/Tcl/include -DMQ_IGNORE_EXTERN -g -Wall -Wcast-align -g -O2 -shared -module -avoid-version -no-undefined /cygdrive/c/Tcl/lib/tcl86.lib -o tclmsgque.la -rpath /usr/local/lib/NHI1 tclmsgque_la-MqS_tcl.lo tclmsgque_la-misc_tcl.lo tclmsgque_la-msgque_tcl.lo tclmsgque_la-read_tcl.lo tclmsgque_la-send_tcl.lo tclmsgque_la-config_tcl.lo tclmsgque_la-service_tcl.lo tclmsgque_la-slave_tcl.lo tclmsgque_la-MqBufferS_tcl.lo tclmsgque_la-error_tcl.lo tclmsgque_la-link_tcl.lo tclmsgque_la-MqFactoryS_tcl.lo tclmsgque_la-MqDumpS_tcl.lo ../libmsgque/libtmp.la > libtool: link: rm -fr .libs/tclmsgque.dll.a > libtool: link: x86_64-w64-mingw32-gcc -std=gnu99 -shared .libs/tclmsgque_la-MqS_tcl.o .libs/tclmsgque_la-misc_tcl.o .libs/tclmsgque_la-msgque_tcl.o .libs/tclmsgque_la-read_tcl.o .libs/tclmsgque_la-send_tcl.o .libs/tclmsgque_la-config_tcl.o .libs/tclmsgque_la-service_tcl.o .libs/tclmsgque_la-slave_tcl.o .libs/tclmsgque_la-MqBufferS_tcl.o .libs/tclmsgque_la-error_tcl.o .libs/tclmsgque_la-link_tcl.o .libs/tclmsgque_la-MqFactoryS_tcl.o .libs/tclmsgque_la-MqDumpS_tcl.o -Wl,--whole-archive ../libmsgque/.libs/libtmp.a -Wl,--no-whole-archive -lws2_32 -O2 -o .libs/tclmsgque.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/tclmsgque.dll.a > Creating library file: .libs/tclmsgque.dll.a.libs/tclmsgque_la-MqS_tcl.o: In function `Tclmsgque_ThreadExit': > /home/dev1usr/Project/NHI1/theLink/tclmsgque/MqS_tcl.c:86: undefined reference to `__imp_Tcl_FinalizeThread' > .libs/tclmsgque_la-MqS_tcl.o: In function `Tclmsgque_ProcessExit': > /home/dev1usr/Project/NHI1/theLink/tclmsgque/MqS_tcl.c:78: undefined reference to `__imp_Tcl_Exit' > .libs/tclmsgque_la-MqS_tcl.o: In function `Tclmsgque_MqS_Free': > /home/dev1usr/Project/NHI1/theLink/tclmsgque/MqS_tcl.c:612: undefined reference to `__imp_TclFreeObj' > .libs/tclmsgque_la-MqS_tcl.o: In function `Tclmsgque_MqS_Cmd': > /home/dev1usr/Project/NHI1/theLink/tclmsgque/MqS_tcl.c:585: undefined reference to `__imp_Tcl_GetIndexFromObjStruct' > /home/dev1usr/Project/NHI1/theLink/tclmsgque/MqS_tcl.c:581: undefined reference to `__imp_Tcl_WrongNumArgs' > .libs/tclmsgque_la-MqS_tcl.o: In function `Tclmsgque_StorageDelete': > /home/dev1usr/Project/NHI1/theLink/tclmsgque/MqS_tcl.c:148: undefined reference to `__imp_Tcl_GetWideIntFromObj' > /home/dev1usr/Project/NHI1/theLink/tclmsgque/MqS_tcl.c:149: undefined reference to `__imp_Tcl_WrongNumArgs' > /home/dev1usr/Project/NHI1/theLink/tclmsgque/MqS_tcl.c:148: undefined reference to `__imp_Tcl_WrongNumArgs' > .libs/tclmsgque_la-MqS_tcl.o: In function `Tclmsgque_StorageSelect': This is the classic case of putting the library before the objects. As I told you before, you should have the library providing the needed symbols *after* the objects requiring them. I.e. /bin/sh ../../libtool --tag=CC --verbose --mode=link /usr/bin/ccache x86_64-w64-mingw32-gcc -std=gnu99 -shared -I/home/dev1usr/Project/NHI1/theLink/tclmsgque/../libmsgque -I/cygdrive/c/Tcl/include -DMQ_IGNORE_EXTERN -g -Wall -Wcast-align -g -O2 -shared -module -avoid-version -no-undefined -o tclmsgque.la -rpath /usr/local/lib/NHI1 tclmsgque_la-MqS_tcl.lo tclmsgque_la-misc_tcl.lo tclmsgque_la-msgque_tcl.lo tclmsgque_la-read_tcl.lo tclmsgque_la-send_tcl.lo tclmsgque_la-config_tcl.lo tclmsgque_la-service_tcl.lo tclmsgque_la-slave_tcl.lo tclmsgque_la-MqBufferS_tcl.lo tclmsgque_la-error_tcl.lo tclmsgque_la-link_tcl.lo tclmsgque_la-MqFactoryS_tcl.lo tclmsgque_la-MqDumpS_tcl.lo ../libmsgque/libtmp.la /cygdrive/c/Tcl/lib/tcl86.lib > I have to rename the library from 'C:\Tcl\lib\tcl86.lib' to 'C:\Tcl\lib\libtcl86.a' make the project compile-able I can only assume, since the library is named tcl86.lib and not libtcl86.dll.a, that it is was compiled with (and for) the Microsoft Compiler. Since there is no standard for how libraries are named in the land of Windows, there is no way for Libtool to sanely catch all variations. Catching a new name might also cause regressions for those that happen to have unfortunately named files littering their file systems. Also, it's not always safe to mix compilers (and runtimes), so sometimes it's better to require user intervention to find libs from "the other side of the fence". > mfg AO > > > Am 26.03.2013 15:05, schrieb Peter Rosin: >> On 2013-03-26 10:38, Andreas Otto wrote: >>> Hi, >>> >>> from time to time I use my automake/libtool project to build libraries on windows ... >>> this create al least problems ... >>> >>> my actual problem is, I got a tcl distrubution from activestate providing a libraray: >>> >>> C:/Tcl/lib/tcl8.6.lib >>> >>> and using the libtool command: >>> >>> /bin/sh ../../libtool --tag=CC --mode=link /usr/bin/ccache x86_64-w64-mingw32-gcc -std=gnu99 -shared -I/home/dev1usr/Project/NHI1/theLink/tclmsgque/../libmsgque -IC:/Tcl/include -DMQ_IGNORE_EXTERN -g -Wall -Wcast-align -g -O2 -shared -module -avoid-version -no-undefined*-LC:/Tcl/lib -ltcl86* -o tclmsgque.la -rpath /usr/local/lib/NHI1 tclmsgque_la-MqS_tcl.lo tclmsgque_la-misc_tcl.lo tclmsgque_la-msgque_tcl.lo tclmsgque_la-read_tcl.lo tclmsgque_la-send_tcl.lo tclmsgque_la-config_tcl.lo tclmsgque_la-service_tcl.lo tclmsgque_la-slave_tcl.lo tclmsgque_la-MqBufferS_tcl.lo tclmsgque_la-error_tcl.lo tclmsgque_la-link_tcl.lo tclmsgque_la-MqFactoryS_tcl.lo tclmsgque_la-MqDumpS_tcl.lo ../libmsgque/libtmp.la >>> >>> with "*-LC:/Tcl/lib -ltcl86*" I got the mystic libtool error message that the library is NOT found ... >> It would help if you quoted the error message. >> >>> using the "--debug" option give a hint .... >> It would help if you shared the hint. >> >>> libtool does not serach for the "right" name ... >>> >>> If I copy the file tcl86.lib to libtcl86.a in the same directory .... >>> >>> => everything works fine. >>> >>> and now my question: >>> >>> why does "libtool" on "windows" does NOT search for "*.lib" files >> I'll try to answer when you have provided the above details. >> >>> => enduser would be happy to save debugging hours ;-) >>> >>> Hint, I use the mingw cross compiler but this is NOT the problem. >> Since you are using a cross compiler (presumably still from Cygwin), >> you should not feed it Windows paths, you should feed it POSIX >> paths. I.e. something like "-L/cygdrive/c/Tcl/lib -ltcl86". In addition >> to that, you (or the package) have specified the library before any >> object files, which is not the right thing to do. Try this: >> >> /bin/sh ../../libtool --tag=CC --mode=link /usr/bin/ccache x86_64-w64-mingw32-gcc -std=gnu99 -shared -I/home/dev1usr/Project/NHI1/theLink/tclmsgque/../libmsgque -I/cygdrive/c/Tcl/include -DMQ_IGNORE_EXTERN -g -Wall -Wcast-align -g -O2 -shared -module -avoid-version -no-undefined -L/cygdrive/c/Tcl/lib -o tclmsgque.la -rpath /usr/local/lib/NHI1 tclmsgque_la-MqS_tcl.lo tclmsgque_la-misc_tcl.lo tclmsgque_la-msgque_tcl.lo tclmsgque_la-read_tcl.lo tclmsgque_la-send_tcl.lo tclmsgque_la-config_tcl.lo tclmsgque_la-service_tcl.lo tclmsgque_la-slave_tcl.lo tclmsgque_la-MqBufferS_tcl.lo tclmsgque_la-error_tcl.lo tclmsgque_la-link_tcl.lo tclmsgque_la-MqFactoryS_tcl.lo tclmsgque_la-MqDumpS_tcl.lo ../libmsgque/libtmp.la -ltcl86 >> >> Cheers, >> Peter >> >
bug-libtool <at> gnu.org
:bug#14055
; Package libtool
.
(Tue, 26 Mar 2013 21:53:02 GMT) Full text and rfc822 format available.Message #20 received at 14055 <at> debbugs.gnu.org (full text, mbox):
From: Roumen Petrov <bugtrack <at> roumenpetrov.info> To: Andreas Otto <aotto1968 <at> t-online.de> Cc: 14055 <at> debbugs.gnu.org Subject: Re: bug#14055: windows link problem with ".lib" files Date: Tue, 26 Mar 2013 23:50:08 +0200
Andreas Otto wrote: > Hi, > > in addition ... > > 1) > > my libtooll config -> attachment > > 2) > > $ sh ./libtool --features > host: x86_64-w64-mingw32 > enable shared libraries > disable static libraries > > 3) > > put the library with absolute path '/cygdrive/c/Tcl/lib/tcl86.lib' > does not work ... [SNIP] Try to generate import library compatible with GNU C compiler . Expected suffix is dll.a . You could find hints in internet . From you post is not clear if tcl86.lib is static or import library . Listing sharer liibrary before object files in most case work but correct order is after. Roumen P.S. Welcome to windows DLL hell.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.