libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Got shared libraries to build with libtool on MinGW, but it was a st


From: Alan W. Irwin
Subject: Re: Got shared libraries to build with libtool on MinGW, but it was a struggle
Date: Sun, 18 Sep 2005 20:47:52 -0700 (PDT)

On 2005-09-18 13:08+0200 Ralf Wildenhues wrote:

Alan, and others, could you verify that in your setup, the following
patch fixes the problem?  It should avoid any of these issues, and,
unless someone comes up with the specific cause of this problem (or
problems!), should be ignorant to all of them.  Please test it, it's
unfortunately a non-minimal change.

Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/ltmain.in,v
retrieving revision 1.334.2.87
diff -u -r1.334.2.87 ltmain.in
--- ltmain.in   17 Sep 2005 07:40:54 -0000      1.334.2.87
+++ ltmain.in   18 Sep 2005 09:59:03 -0000
@@ -157,12 +157,11 @@
    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
      win32_nmres=`eval $NM -f posix -A $1 | \
-       sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
-      if test "X$win32_nmres" = "Ximport" ; then
-        win32_libid_type="x86 archive import"
-      else
-        win32_libid_type="x86 archive static"
-      fi
+       sed -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
+      case $win32_nmres in
+      import*)  win32_libid_type="x86 archive import";;
+      *)        win32_libid_type="x86 archive static";;
+      esac
    fi
    ;;
  *DLL*)

Here is the second patch as well which in our experience is also required
for MinGW/MSYS systems.

--- ltmain.sh_original  2005-09-15 16:55:41.000000000 -0700
+++ ltmain.sh   2005-09-15 16:57:25.000000000 -0700
@@ -1479,11 +1479,11 @@
      -l*)
        if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
          case $host in
-         *-*-cygwin* | *-*-pw32* | *-*-beos*)
+         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
            # These systems don't actually have a C or math library (as such)
            continue
            ;;
-         *-*-mingw* | *-*-os2*)
+         *-*-os2*)
            # These systems don't actually have a C library (as such)
            test "X$arg" = "X-lc" && continue
            ;;


The PLplot developer with access to MinGW/MSYS has the following system:

Mingw (2.0)
MSYS (1.1.10)
gcc (3.2)
Windows XP SP1

When he used the two patches above, he reports everything worked fine for the
PLplot shared library build so these patches are what we are going to
recommend for all our MinGW/MSYS users.

For what it is worth, I also tested the two patches on my Linux system
(Debian stable), and it did no harm, i.e., the PLplot patched shared library
build worked on that platform as well.

Alan
__________________________
Alan W. Irwin
email: address@hidden
phone: 250-727-2902

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________




reply via email to

[Prev in Thread] Current Thread [Next in Thread]