Mail Archives: cygwin-apps/2002/06/17/12:38:30
I have an up-to-date cygwin installation (with some extras, e.g. iconv), and
I can build libxml2/libxslt static libraries from cvs.
But I seem to have a problem building libxml2 shared libraries, and I can't
say that I understand much of what goes on during the process.
I downloaded libxml2-2.4.22 (and libxslt-1.0.18), applied the patches, ran
the relibtoolize script, and get an undefined reference to `WinMain AT 16'.
If I do not configure --without-iconv (see below), the make stops when
building the symbol list for iconv:
./configure --with-history
SED=sed make
extracting exported symbol list from `cygiconv-2.dll'
test -f .libs/impgen.c || \
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends
here \*\// { s/^# //;s/^# *$//; p; }" -e d < ./libtool > .libs/impgen.c
test -f .libs/impgen.exe || (cd .libs && \
if test "x" != "x" ; then -o impgen impgen.c ; \
else gcc -o impgen impgen.c ; fi)
.libs/impgen /usr/local/lib/../bin/cygiconv-2.dll >
.libs/cygiconv-2.dll-def
/usr/lib/libcygwin.a(libcmain.o)(.text+0x6a): undefined reference to
`WinMain AT 16'
...
The problem is that libtool creates an empty .libs/impgen.c. What version of
libtool needed? My version:
$ libtool --version
ltmain.sh (GNU libtool) 1.4e (1.1103 2002/05/02 14:22:51)
Also note that I have to set SED=sed, i.e., configure doesn't set SED by
itself.
This is what I get --without-iconv:
./configure --with-history --without-iconv
SED=sed make
...
/bin/bash ./libtool --mode=link gcc -g -O2 -Wall -o libxml2.la -rpath
/usr/local/lib -no-undefined -version-info 6:22:4 SAX.lo entities.lo
encoding.lo error.lo parserInternals.lo parser.lo tree.lo hash.lo list.lo
xmlIO.lo xmlmemory.lo uri.lo valid.lo xlink.lo HTMLparser.lo HTMLtree.lo
debugXML.lo xpath.lo xpointer.lo xinclude.lo nanohttp.lo nanoftp.lo
DOCBparser.lo catalog.lo globals.lo threads.lo c14n.lo xmlregexp.lo
xmlschemas.lo xmlschemastypes.lo xmlunicode.lo -lz -lm
generating symbol list for `libxml2.la'
dlltool --export-all --exclude-symbols
DllMain AT 12,_cygwin_dll_entry AT 12,_cygwin_noncygwin_dll_entry AT 12,DllMainCRTSta
rtup AT 12,DllEntryPoint AT 12 --output-def .libs/cygxml2-2.dll-def .libs/SAX.o
.libs/entities.o .libs/encoding.o .libs/error.o .libs/parserInternals.o
.libs/parser.o .libs/tree.o .libs/hash.o .libs/list.o .libs/xmlIO.o
.libs/xmlmemory.o .libs/uri.o .libs/valid.o .libs/xlink.o .libs/HTMLparser.o
.libs/HTMLtree.o .libs/debugXML.o .libs/xpath.o .libs/xpointer.o
.libs/xinclude.o .libs/nanohttp.o .libs/nanoftp.o .libs/DOCBparser.o
.libs/catalog.o .libs/globals.o .libs/threads.o .libs/c14n.o
.libs/xmlregexp.o .libs/xmlschemas.o .libs/xmlschemastypes.o
.libs/xmlunicode.o
sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" <
.libs/cygxml2-2.dll-def > .libs/libxml2.exp
./libtool: test: : integer expression expected
./libtool: test: : integer expression expected
creating reloadable object files...
./libtool: test: : integer expression expected
./libtool: test: : integer expression expected
... more of these ...
./libtool: test: : integer expression expected
./libtool: test: : integer expression expected
creating a temporary reloadable object file: .libs/libxml2.la-31.o
/usr/i686-pc-cygwin/bin/ld.exe -r -o .libs/libxml2.la-1.o .libs/SAX.o
/usr/i686-pc-cygwin/bin/ld.exe -r -o .libs/libxml2.la-2.o .libs/entities.o
.libs/libxml2.la-1.o
/usr/i686-pc-cygwin/bin/ld.exe -r -o .libs/libxml2.la-3.o .libs/encoding.o
.libs/libxml2.la-2.o
... more of these ...
/usr/i686-pc-cygwin/bin/ld.exe -r -o .libs/libxml2.la-30.o
.libs/xmlschemastypes.o .libs/libxml2.la-29.o
/usr/i686-pc-cygwin/bin/ld.exe -r -o .libs/libxml2.la-31.o
.libs/xmlunicode.o .libs/libxml2.la-30.o
if test "x`head -1 .libs/libxml2.exp`" = xEXPORTS; then cp .libs/libxml2.exp
.libs/cygxml2-2.dll-def; else echo EXPORTS > .libs/cygxml2-2.dll-def;
_lt_hint=1; cat .libs/libxml2.exp | while read symbol; do set dummy $symbol;
case $# in 2) echo " $2 @ $_lt_hint ; " >> .libs/cygxml2-2.dll-def;; *) echo
" $2 @ $_lt_hint $3 ; " >> .libs/cygxml2-2.dll-def;; esac; _lt_hint=`expr 1
+ $_lt_hint`; done; fi
gcc -Wl,--base-file,.libs/cygxml2-2.dll-base -Wl,-e,__cygwin_dll_entry AT 12 -o
.libs/cygxml2-2.dll .libs/libxml2.la-31.o -lz
/usr/lib/libcygwin.a(libcmain.o)(.text+0x6a): undefined reference to
`WinMain AT 16'
...
Kind regards,
Peter Ring
-----Original Message-----
From: cygwin-apps-owner AT cygwin DOT com
[mailto:cygwin-apps-owner AT cygwin DOT com]On Behalf Of Stanislav Sinyagin
Sent: 17. juni 2002 09:57
To: cygwin-apps AT cygwin DOT com
Subject: Re: please update libXML
--- "Gerrit P. Haase" <gp AT familiehaase DOT de> wrote:
> Hallo Gerrit,
>
> >> Can you please give a clue how to compile the shared libraries?
>
> > I use this script to relibtoolize (attached).
> > Just run it once *after* applying the little patch (works for both,
> > libxml2 and libxslt).
>
> I'm sorry, the patch for libxslt was not tested and therefore not
> complete, here is a newer version.
OK, patched version works fine!
The only side issue is that after successful "make", "make install"
relinks all executables.
Thanks a lot,
Stan
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
- Raw text -