[Expat-bugs] [ expat-Bugs-621797 ] Expat 1.95-5 build failure under Cygwin

noreply at sourceforge.net noreply at sourceforge.net
Sat Dec 7 17:12:51 2002


Bugs item #621797, was opened at 2002-10-11 12:07
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=621797&group_id=10127

Category: Build control
Group: Platform Specific
>Status: Closed
>Resolution: Postponed
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Gerrit Haase (siebenschlaefer)
Summary: Expat 1.95-5 build failure under Cygwin

Initial Comment:
Attempting to build expat 1.95-5 under cygwin fails
with the following: 

"/usr/lib/libcygwin.a(libcmain.o)(.text+0x81):
undefined reference to `WinMain@16'"

Full info from configure & make

robertm@CLEMFAR ~/expat-1.95.5
$ ./configure
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking for gcc... gcc
checking for C compiler default output... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for ld used by GCC...
/usr/i686-pc-cygwin/bin/ld.exe
checking if the linker (/usr/i686-pc-cygwin/bin/ld.exe)
is GNU ld... yes
checking for /usr/i686-pc-cygwin/bin/ld.exe option to
reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependant libraries...
file_magic file format pei*-i386(.*architecture: i386)?
checking command to parse /usr/bin/nm -B output... ok
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... no
checking for stdint.h... no
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for ranlib... ranlib
checking for strip... strip
checking for objdir... .libs
checking for gcc option to produce PIC... -DDLL_EXPORT
checking if gcc PIC flag -DDLL_EXPORT works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking whether the linker
(/usr/i686-pc-cygwin/bin/ld.exe) supports shared
libraries... yes
checking how to hardcode library paths into programs...
immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... Win32 ld.exe
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
creating libtool
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler...
(cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached)
none needed
checking for a BSD-compatible install...
/usr/bin/install -c
checking whether gcc accepts -fexceptions... yes
checking for ANSI C header files... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking whether byte ordering is bigendian... no
checking for an ANSI C-conforming const... yes
checking for off_t... yes
checking for size_t... yes
checking for working memcmp... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... no
checking for memmove... yes
checking for bcopy... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating expat_config.h

robertm@CLEMFAR ~/expat-1.95.5
$ make
/bin/bash ./libtool --silent --mode=compile gcc -g -O2
-Wall -Wmissing-prototypes -Wstrict-prototypes
-fexceptions   -I./lib -I. -o lib/xmlparse.lo -c
lib/xmlparse.c
/bin/bash ./libtool --silent --mode=compile gcc -g -O2
-Wall -Wmissing-prototypes -Wstrict-prototypes
-fexceptions   -I./lib -I. -o lib/xmltok.lo -c lib/xmltok.c
/bin/bash ./libtool --silent --mode=compile gcc -g -O2
-Wall -Wmissing-prototypes -Wstrict-prototypes
-fexceptions   -I./lib -I. -o lib/xmlrole.lo -c
lib/xmlrole.c
/bin/bash ./libtool --silent --mode=link gcc -g -O2
-Wall -Wmissing-prototypes -Wstrict-prototypes
-fexceptions   -I./lib -I. -no-undefined -version-info
4:0:4 -rpath /usr/local/lib  -o libexpat.la
lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo
/usr/lib/libcygwin.a(libcmain.o)(.text+0x81): undefined
reference to `WinMain@16'
collect2: ld returned 1 exit status
make: *** [libexpat.la] Error 1


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

>Comment By: Gerrit Haase (siebenschlaefer)
Date: 2002-12-07 18:12

Message:
Logged In: YES 
user_id=76037

Hello,

The problem with Cygwin is, that we use the devel version of
libtool because libtool 1.4 is really broken (for Cygwin needs).

In the future, after libtool 1.5 or later is released and used all
over the place there will be no more major problems like this.

Since the libtool and other autotool scripts in the original 
expat source are built using libtool 1.4.x they don't do the 
right thing for the Cygwin development chain and therefore 
all the scripts need to be rebuild with the current Cygwin 
'devel'-autotoolchain.  That is (as you can see in the patch): 

autoupdate
(cd conftools/; rm -f ltmain.sh ltconfig)
aclocal -I conftools
libtoolize --force --copy --automake
aclocal -I conftools

ltfiles=/usr/autotool/devel/share
cp $ltfiles/aclocal/libtool.m4 conftools/libtool.m4
cp $ltfiles/libtool/missing \
   $ltfiles/libtool/install-sh \
   $ltfiles/libtool/mkinstalldirs \
   conftools/

# Generate the autoconf header template (expat_config.h.in) 
and ./configure
#

${AUTOHEADER:-autoheader}

echo "Creating configure ..."
### do some work to toss config.cache?
${AUTOCONF:-autoconf}

# toss this; it gets created by autoconf on some systems
rm -rf autom4te*.cache

# exit with the right value, so any calling script can continue
exit 0


SOLUTION:
=========
Get the soucre from any Cygwin mirror or my site:
http://koeln.convey.de/cywgin/expat/expat-1.95.5-1-src.tar.bz2

There is a buildscript and a patch included which will prepare 
the source for building on Cygwin.

Also available separately:
http://koeln.convey.de/cywgin/expat/expat-1.95.5-1.sh
http://koeln.convey.de/cywgin/expat/expat-1.95.5-1.patch


HTH,

Gerrit


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

Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2002-10-11 15:10

Message:
Logged In: YES 
user_id=3066

Re-assigned to the CygWin expert.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110127&aid=621797&group_id=10127



More information about the Expat-bugs mailing list