Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Libtool / Tcl stubs / cross-building probles....

9 views
Skip to first unread message

Robert Heller

unread,
Jan 9, 2007, 12:08:07 PM1/9/07
to
I am using automake 1.9.2 and libtool 1.5.6 to build a Tcl loadable
shared object. I am trying to cross-build a MS-Windows DLL using
mingw32 under CentOS 4.4 (GPL RHEL 4 clone). I have previously (with no
appearent errors) cross-built a MS-Windows Tcl/Tk system and have a
libtclstub84.a library file.

Libtool is unhappy with it. It sees it as a static library (yes, it
is), and does not see a shared library for it (no there isn't one), so
it is thinking this is a mistake and is not using it as a dependent
library and won't link with it (and I end up with undefined
references). I get this message:

*** Warning: Trying to link with static lib archive /usr/local/cross-tools/mingw32/i586-mingw32/lib/libtclstub84.a.
*** 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 the file extensions .a of this argument makes me believe
*** that it is just a static archive that I should not used here.

No matter what I do to ltmain.sh, libtool, configure.in, or
Makefile.am, I get this error. How do I fix this? Is there some hack
to get below libtool's radar? Or do I just need a *special* *hand-built*
Makefile for cross-building? Everything works just fine building
natively under Linux for a Linux target. Libtool is perfectly happy to
link this static library into a Linux shared library module. It just
won't do it for a MS-Windows DLL.

--
Robert Heller -- 978-544-6933
Deepwoods Software -- Linux Installation and Administration
http://www.deepsoft.com/ -- Web Hosting, with CGI and Database
hel...@deepsoft.com -- Contract Programming: C/C++, Tcl/Tk

Joe English

unread,
Jan 9, 2007, 7:18:57 PM1/9/07
to
Robert Heller wrote:
>I am using automake 1.9.2 and libtool 1.5.6 to build a Tcl loadable
>shared object.

That's your problem right there :-)

Libtool has a lot of features, almost none of which are useful
for building Tcl extensions. Moreover, it's missing a couple things
that *are* needed. Automake is almost wholly inappropriate for
building Tcl extensions (I'll just leave it at that -- the less
said about automake the better.)

The TEA build infrastructure is a much better starting point;
see the "sampleextension" module in Tcl SourceForge CVS.


--Joe English

0 new messages