[ expat-Bugs-897857 ] error compiling for windows with mingw

"SourceForge.net" <[email protected]>
Newsgroups gmane.text.xml.expat.bugs
Message-ID <[email protected]>
Bugs item #897857, was opened at 2004-02-16 08:54
Message generated for change (Comment added) made by siebenschlaefer
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=897857&group_id=10127

>Category: Build control
>Group: Third-party Bug
>Status: Closed
Resolution: None
Priority: 5
Submitted By: Jason Short (jdorje)
Assigned to: Gerrit Haase (siebenschlaefer)
Summary: error compiling for windows with mingw

Initial Comment:
I tried to compile CVS Expat for win32 using Mingw on
Debian unstable (sid).  Everything is up-to-date as of
Feb 16.

Mingw is a set of tools for cross-compiling programs
targeted toward windows.  The compilation is done on a
non-windows machine (in this case a GNU/Linux box).

I run the following sequence to do the compilation:

export LD_LIBRARY_PATH=/usr/i586-mingw32msvc/lib
export CC=i586-mingw32msvc-gcc
export RANLIB=i586-mingw32msvc-ranlib
export AR=i586-mingw32msvc-ar
 
./configure --host=i586-mingw32msvc
make

this works fine until the very end of the compilation,
when I get this error:

/bin/sh ./libtool --silent --mode=link
i586-mingw32msvc-gcc -g -O2 -Wall -Wmissing-prototypes
-Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H
  -I./lib -I.  -o xmlwf/xmlwf xmlwf/xmlwf.o
xmlwf/xmlfile.o xmlwf/codepage.o xmlwf/readfilemap.o
libexpat.la
./libtool: line 4921: .libs/lt-xmlwf/xmlwf.c: No such
file or directory
./libtool: line 4937: .libs/lt-xmlwf/xmlwf.c: No such
file or directory
./libtool: line 4996: .libs/lt-xmlwf/xmlwf.c: No such
file or directory
./libtool: line 5000: .libs/lt-xmlwf/xmlwf.c: No such
file or directory
./libtool: line 5010: .libs/lt-xmlwf/xmlwf.c: No such
file or directory
./libtool: line 5014: .libs/lt-xmlwf/xmlwf.c: No such
file or directory
i586-mingw32msvc-gcc: .libs/lt-xmlwf/xmlwf.c: No such
file or directory

However compilation seems to complete all right.  I now
have a libexpat.la and the contents of .libs are:

[jdorje@devon:~/src/expat]$ ls -la .libs/
total 1148
drwxr-xr-x    2 jdorje   jdorje       4096 Feb 16 02:30 .
drwxr-xr-x   14 jdorje   jdorje       4096 Feb 16 02:30 ..
-rwxr-xr-x    1 jdorje   jdorje     706031 Feb 16 02:30
libexpat-0.dll
-rw-r--r--    1 jdorje   jdorje     387146 Feb 16 02:30
libexpat.a
-rw-r--r--    1 jdorje   jdorje      53002 Feb 16 02:30
libexpat.dll.a
lrwxrwxrwx    1 jdorje   jdorje         14 Feb 16 02:30
libexpat.la -> ../libexpat.la
-rw-r--r--    1 jdorje   jdorje        790 Feb 16 02:30
libexpat.lai

When I try to use the compiled library it works.  I
really have no idea what the error means or if it is
important.  I suspect there's an error in a Makefile.in
somewhere causing it.  Out of curiosity, why do you not
use automake?

jason short


----------------------------------------------------------------------

>Comment By: Gerrit Haase (siebenschlaefer)
Date: 2004-02-22 09:43

Message:
Logged In: YES 
user_id=76037

Libtool is somewhat broken, i.e. when automake is not used.

Try this patch to ltmain.sh (also attached to save the format):

$ diff -ud ltmain.sh~ ltmain.sh
--- ltmain.sh~  2003-08-18 07:36:11.001000000 +0200
+++ ltmain.sh   2003-10-30 00:13:30.104377600 +0100
@@ -4481,8 +4481,10 @@
        esac
        case $host in
          *cygwin* | *mingw* )
-           cwrappersource=`$echo ${objdir}/lt-${output}.c`
-           cwrapper=`$echo ${output}.exe`
+           output_name=`basename $output`
+           output_path=`dirname $output`
+           cwrappersource=`$echo
${output_path}/${objdir}/lt-${output_name}.c`
+           cwrapper=`$echo ${output_path}/${output_name}.exe`
            $rm $cwrappersource $cwrapper
            trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 15
 
@@ -4813,7 +4815,7 @@
          # are only useful if you want to execute the
"real" binary.
          # Since the "real" binary is built for $host, then
this
          # wrapper might as well be built for $host, too.
-         $run $LTCC -s -o $cwrapper $cwrappersource
+         $run ln -f
${output_path}/${objdir}/${output_name}.exe ${cwrapper}
          ;;
        esac
        $rm $output

  


----------------------------------------------------------------------

Comment By: Karl Waclawek (kwaclaw)
Date: 2004-02-18 16:55

Message:
Logged In: YES 
user_id=290026

Assigned to Gerrit - this seems close to Cygwin.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=897857&group_id=10127
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.