Issue37

Title libtool doesn't create DLLs on Windows
Priority bug Status chatting
Superseder Nosy List leif
Assigned To leif Topics Build

Created on 2006-06-15.20:37:42 by leif, last changed 2007-06-20.02:35:56 by leif.

Messages
msg374 (view) Author: leif Date: 2007-06-20.02:35:56
Fixed for PyLith:

r7314

Unfortunately, '-no-undefined' forces us to add -lpythonX.X to Python module
link lines everywhere... and on Mac OS X, "-framework Python" -- which required
the introduction of PYTHON_LA_LDFLAGS:

r7309
msg373 (view) Author: leif Date: 2007-06-19.21:23:02
Fixed for spatialdata:

r7307

Adding '-no-undefined' to 'xxx_la_LDFLAGS' does indeed do the trick.  For Python
extension modules, '-avoid-version' is also required, in order to avoid a
version suffix in the filename ("foomodule-0.dll").
msg87 (view) Author: leif Date: 2006-06-21.16:53:23
Site note:  Libtool's "-static" option (statically link against Libtool
libraries) doesn't seem to work on Mac OS X.
msg82 (view) Author: leif Date: 2006-06-15.23:21:10
Also, the libjournal autoconf test I wrote test doesn't work in this case (when
all Pythia libs are static).  AC_CHECK_LIB (or whatever) is always done in C,
but libjournal is a C++ library -> unresolved symbols.

I'm not sure if C++ dependencies are represented by libtool libraries, but this
brings up a related issue:  Autoconf tests are sloppy at checking against
libtool libraries.  In theory, a libtool lib's dependences are represented in
the lib itself (even for static libs), so I should be able to check-lib it
without worrying about dependencies.  But Autoconf doesn't know about libtool,
so the burden falls upon the Autoconf test.
msg81 (view) Author: leif Date: 2006-06-15.20:37:42
I came across this in the context of building Pythia on Cygwin, while working on
Project Monolith (prebuilt PyLith binaries).  But I suppose it affects all our
projects which libtool.

The whole idea of libtool is that it does the best it can, based upon the
capabilities of the underlying platform.  On Windows, shared libararies (DLLs)
are not only possible, they are the norm.  But libtool doesn't even try to
create them on Cygwin... at least, not by default.

Investigate.
msg92 (view) Author: leif Date: 2006-07-06.19:13:12
I noticed the following while looking at the 'libtool' shell script.  Is
creating DLLs on Windows as simple as adding '-no-undefined' to the link line?

--------

  # libtool link mode
  link | relink)
    modename="$modename: link"
    case $host in
    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
      # It is impossible to link a dll without this setting, and
      # we shouldn't force the makefile maintainer to figure out
      # which system we are compiling for in order to pass an extra
      # flag for every libtool invocation.
      # allow_undefined=no

      # FIXME: Unfortunately, there are problems with the above when trying
      # to make a dll which has undefined symbols, in which case not
      # even a static library is built.  For now, we need to specify
      # -no-undefined on the libtool link line when we can be certain
      # that all symbols are satisfied, otherwise we get a static library.
      allow_undefined=yes
      ;;
    *)
      allow_undefined=yes
      ;;
    esac
History
Date User Action Args
2007-06-20 02:35:56leifsetmessages: + msg374
2007-06-19 21:23:04leifsetmessages: + msg373
2006-11-07 00:01:42adminsetmessages: + msg81, msg82, msg87
2006-11-06 08:34:29anonymoussetmessages: - msg87
2006-11-04 08:26:24anonymoussetmessages: - msg82
2006-11-03 05:46:12anonymoussetmessages: - msg81
2006-07-06 19:13:12leifsetmessages: + msg92
2006-06-21 16:53:23leifsetmessages: + msg87
2006-06-15 23:21:10leifsetstatus: unread -> chatting
messages: + msg82
2006-06-15 20:37:42leifcreate