[ expat-Bugs-463928 ] 1.95.2 Cygwin build fails

noreply@sourceforge.net noreply@sourceforge.net
Wed Oct 24 10:20:01 2001


Bugs item #463928, was opened at 2001-09-22 12:48
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=110127&aid=463928&group_id=10127

Category: Build control
Group: Platform Specific
Status: Open
Resolution: None
Priority: 5
Submitted By: Jari Aalto (jaalto)
Assigned to: Greg Stein (gstein)
Summary: 1.95.2  Cygwin build fails

Initial Comment:
Hi,

Is there any chance to get expat compiled under cygwin?
http://www.cygwin.com/ I would like to install the
Perl XML modules, but they require expat first.

If you need help to debug this, I will help gladly.
I'm former C++ programmer.

Jari.aalto@poboxes.com



//root@W2KPICASSO /usr/src/expat-1.95.2 $ CFLAGS=-
fexceptions ./configure
creating cache ./config.cache
checking host system type... i686-pc-cygwin
checking build system type... i686-pc-cygwin
checking for ranlib... ranlib
checking for gcc... gcc
checking whether the C compiler (gcc -fexceptions ) 
works... yes
checking whether the C compiler (gcc -fexceptions ) is 
a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
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 BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking for dlltool... dlltool
checking for as... as
checking for objdump... objdump
updating cache ./config.cache
checking for object suffix... o
checking for executable suffix... .exe
checking for gcc option to produce PIC... none
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 if gcc static flag -static works... -static
checking if the linker (/usr/i686-pc-
cygwin/bin/ld.exe) is GNU ld... yes
checking whether the linker (/usr/i686-pc-
cygwin/bin/ld.exe) supports shared lib
raries... yes
checking command to parse /usr/bin/nm -B output... ok
checking how to hardcode library paths into 
programs... immediate
checking for /usr/i686-pc-cygwin/bin/ld.exe option to 
reload object files... -r
checking dynamic linker characteristics... Win32 ld.exe
checking if libtool supports shared libraries... yes
checking if package supports dlls... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for objdir... .libs
creating libtool
loading cache ./config.cache
checking for gcc... (cached) gcc
checking whether the C compiler (gcc -fexceptions ) 
works... yes
checking whether the C compiler (gcc -fexceptions ) is 
a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for a BSD compatible 
install... /usr/bin/install -c
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for fcntl.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking for working const... yes
checking for off_t... yes
checking for size_t... yes
checking for 8-bit clean memcmp... yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... no
checking for memmove... yes
checking for bcopy... yes
updating cache ./config.cache
creating ./config.status
creating Makefile
creating lib/Makefile
creating lib/expat.h
creating xmlwf/Makefile
creating examples/Makefile
creating config.h
config.h is unchanged
//root@W2KPICASSO /usr/src/expat-1.95.2 $ make
cd lib && make
make[1]: Entering directory `/usr/src/expat-1.95.2/lib'
/bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -
DPACKAGE='"expat"' -DVERS
ION='"expat_1.95.2"' -I. -I. -I..  -fexceptions -Wall -
Wmissing-prototypes -Wstr
ict-prototypes -fexceptions -c xmlparse.c
rm -f .libs/xmlparse.lo
gcc -DHAVE_CONFIG_H -DPACKAGE=\expat\ -
DVERSION=\expat_1.95.2\ -I. -I. -I..
-fexceptions -Wall -Wmissing-prototypes -Wstrict-
prototypes -fexceptions -c xmlp
arse.c  -DPIC -o .libs/xmlparse.lo
mv -f .libs/xmlparse.lo xmlparse.o
(cd . && ln -s xmlparse.o xmlparse.lo)
/bin/sh ../libtool --mode=link  gcc -version-info 
1:0:1 -fexceptions -Wall -Wmis
sing-prototypes -Wstrict-prototypes -fexceptions  -o 
libexpat.la -rpath /usr/loc
al/lib  xmlparse.lo xmltok.lo xmlrole.lo
libtool: link: warning: undefined symbols not allowed 
in i686-pc-cygwin shared l
ibraries
rm -
fr .libs/libexpat.la .libs/libexpat.* .libs/libexpat.*
ar cru .libs/libexpat.a  xmlparse.o xmltok.o xmlrole.o
ranlib .libs/libexpat.a
creating libexpat.la
(cd .libs && rm -f libexpat.la && ln -s ../libexpat.la 
libexpat.la)
make[1]: Leaving directory `/usr/src/expat-1.95.2/lib'
cd xmlwf && make
make[1]: Entering directory `/usr/src/expat-
1.95.2/xmlwf'
gcc -o xmlwf -static xmlwf.o xmlfile.o codepage.o 
unixfilemap.o -L../lib/.libs -
lexpat
xmlwf.o(.text+0x914):xmlwf.c: undefined reference to 
`_imp__XML_DefaultCurrent'
xmlwf.o(.text+0x934):xmlwf.c: undefined reference to 
`_imp__XML_DefaultCurrent'
xmlwf.o(.text+0x954):xmlwf.c: undefined reference to 
`_imp__XML_DefaultCurrent'
xmlwf.o(.text+0x974):xmlwf.c: undefined reference to 
`_imp__XML_DefaultCurrent'
xmlwf.o(.text+0xa3c):xmlwf.c: undefined reference to 
`_imp__XML_GetBase'
xmlwf.o(.text+0xa76):xmlwf.c: undefined reference to 
`_imp__XML_GetCurrentColumn
Number'
xmlwf.o(.text+0xa8b):xmlwf.c: undefined reference to 
`_imp__XML_GetCurrentLineNu
mber'
xmlwf.o(.text+0xaa0):xmlwf.c: undefined reference to 
`_imp__XML_GetCurrentByteCo
unt'
xmlwf.o(.text+0xab5):xmlwf.c: undefined reference to 
`_imp__XML_GetCurrentByteIn
dex'
xmlwf.o(.text+0xbc0):xmlwf.c: undefined reference to 
`_imp__XML_GetSpecifiedAttr
ibuteCount'
xmlwf.o(.text+0xbe3):xmlwf.c: undefined reference to 
`_imp__XML_GetIdAttributeIn
dex'
xmlwf.o(.text+0x1bef):xmlwf.c: undefined reference to 
`_imp__XML_ParserCreateNS'

xmlwf.o(.text+0x1c09):xmlwf.c: undefined reference to 
`_imp__XML_ParserCreate'
xmlwf.o(.text+0x1c2b):xmlwf.c: undefined reference to 
`_imp__XML_SetNotStandalon
eHandler'
xmlwf.o(.text+0x1c41):xmlwf.c: undefined reference to 
`_imp__XML_SetParamEntityP
arsing'
xmlwf.o(.text+0x1c6a):xmlwf.c: undefined reference to 
`_imp__XML_SetElementHandl

...

xmlwf.o(.text+0x207b):xmlwf.c: undefined reference to 
`_imp__XML_ParserFree'
xmlfile.o(.text+0x38):xmlfile.c: undefined reference 
to `_imp__XML_GetErrorCode'

xmlfile.o(.text+0x4d):xmlfile.c: undefined reference 
to `_imp__XML_ErrorString'
xmlfile.o(.text+0x71):xmlfile.c: undefined reference 
to `_imp__XML_GetCurrentCol
umnNumber'
xmlfile.o(.text+0x86):xmlfile.c: undefined reference 
to `_imp__XML_GetCurrentLin
eNumber'
xmlfile.o(.text+0x100):xmlfile.c: undefined reference 
to `_imp__XML_Parse'
xmlfile.o(.text+0x242):xmlfile.c: undefined reference 
to `_imp__XML_ExternalEnti
tyParserCreate'
xmlfile.o(.text+0x285):xmlfile.c: undefined reference 
to `_imp__XML_SetBase'
xmlfile.o(.text+0x2cb):xmlfile.c: undefined reference 
to `_imp__XML_ParserFree'
xmlfile.o(.text+0x346):xmlfile.c: undefined reference 
to `_imp__XML_GetBuffer'
xmlfile.o(.text+0x3ec):xmlfile.c: undefined reference 
to `_imp__XML_ParseBuffer'

xmlfile.o(.text+0x46a):xmlfile.c: undefined reference 
to `_imp__XML_ExternalEnti
tyParserCreate'
xmlfile.o(.text+0x4a1):xmlfile.c: undefined reference 
to `_imp__XML_SetBase'
xmlfile.o(.text+0x4da):xmlfile.c: undefined reference 
to `_imp__XML_ParserFree'
xmlfile.o(.text+0x51c):xmlfile.c: undefined reference 
to `_imp__XML_SetBase'
xmlfile.o(.text+0x584):xmlfile.c: undefined reference 
to `_imp__XML_SetExternalE
ntityRefHandler'
collect2: ld returned 1 exit status
make[1]: *** [xmlwf] Error 1
make[1]: Leaving directory `/usr/src/expat-
1.95.2/xmlwf'
make: *** [xmlwf] Error 2
//root@W2KPICASSO /usr/src/expat-1.95.2 $


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

Comment By: Gerrit Haase (siebenschlaefer)
Date: 2001-10-24 10:19

Message:
Logged In: YES 
user_id=76037

I posted the patch here, (all in one line, please):

http://sourceforge.net/tracker/index.php?
func=detail&aid=454879&group_id=10127&atid=110127

Gerrit

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

Comment By: Gerrit Haase (siebenschlaefer)
Date: 2001-10-24 09:50

Message:
Logged In: YES 
user_id=76037

There is not much to do, a little change in the 
lib/Makefile.in and the expat-x.dll is build properly (I 
used the latest autotools of today, libtool-1.4.2, autoconf-
2.52, automake-1.5), here the patch (I added just -no-
undefined at the link line):

--- lib/Makefile.in.orig	Wed Oct 24 18:24:58 2001
+++ lib/Makefile.in	Wed Oct 24 18:23:29 2001
@@ -90,7 +90,7 @@
 COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
 LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) 
$(INCLUDES) $(CPPFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link  $(CCLD) -version-info 
$(LIBCURRENT):$(LIBREVISION):$(LIBAGE) $(CFLAGS) 
$(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --mode=link  $(CCLD) -no-undefined -
version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) 
$(CFLAGS) $(LDFLAGS) -o $@
 DIST_COMMON =  Makefile.in
 
 


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

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