After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 85161 - Compilation fails under Cygwin, libxml2 newer than 2.4.17
Compilation fails under Cygwin, libxml2 newer than 2.4.17
Status: VERIFIED INCOMPLETE
Product: libxml2
Classification: Platform
Component: general
2.4.18
Other Windows
: Normal normal
: ---
Assigned To: Daniel Veillard
Daniel Veillard
Depends on:
Blocks:
 
 
Reported: 2002-06-13 14:54 UTC by Stanislav Sinyagin
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Stanislav Sinyagin 2002-06-13 14:54:16 UTC
Starting from release 2.4.18, "./configure; make" 
produces errors, like follows:


gcc -g -O2 -Wall -o xmllint.exe xmllint.o  ./.libs/libxml2.a -lz
xmllint.o: In function `xmlHTMLEncodeSend':
/home/ssinyagin/make/libxml2-2.4.22/xmllint.c:273: undefined reference to 
`_imp__xmlGenericError'
/home/ssinyagin/make/libxml2-2.4.22/xmllint.c:273: undefined reference to 
`_imp__xmlGenericErrorContext'

The "nm xmllint.o" shows the following undefined references which cannot 
be resolved:

         U __imp__xmlDoValidityCheckingDefaultValue
         U __imp__xmlFree
         U __imp__xmlGenericError
         U __imp__xmlGenericErrorContext
         U __imp__xmlGetWarningsDefaultValue
         U __imp__xmlLoadExtDtdDefaultValue
         U __imp__xmlParserDebugEntities
         U __imp__xmlParserVersion

As far as I understood the new LIBXML_DLL_IMPORT paradigm, 
it relies on a fact that static linking should be done with 
LIBXML_STATIC defined. Actually, adding this definition 
to CPPFLAGS solved the problem temporarily.

My experience with DLLs under Cygwin is too poor for this 
problem resolution.

Regards, 
Stanislav
Comment 1 Stanislav Sinyagin 2002-06-14 07:38:33 UTC
libxslt-1.0.18 has same problems. It succeeded to compile 
with these commands:

./configure  --enable-shared=no
make CPPFLAGS="-DLIBXML_STATIC -DLIBEXSLT_STATIC -DLIBXSLT_STATIC"

Perhaps these options should be specified somewhere 
deep inside configure, in order to allow the shared compilation too.

Comment 2 Stanislav Sinyagin 2002-06-14 08:37:04 UTC
XML::LibXML Perl module compiles and works, if you add manually 
these flags to CCFLAGS:
-DLIBXML_STATIC -DLIBEXSLT_STATIC -DLIBXSLT_STATIC
Comment 3 Daniel Veillard 2002-06-14 11:32:04 UTC
The problem is how do I process this ? Is that really a bug report ?
Shall I try to get Cygwin people to look at it, which is slightly
surprizing since libxml2 is part of the default packages of cygwin
and I wouldn't expect troubles there. Shall I point Matt Sergeant
XML::Libxml module maintainer to it ?
How do you expect me to process it ? I'm a bit lost ...

Daniel
Comment 4 Stanislav Sinyagin 2002-06-14 11:55:38 UTC
This is something to solve together with Cygwin developers.
The Cygwin standard installation contains version 2.4.17, 
and the new LIBXML_DLL_IMPORT appeared in 2.4.18. The 
idea behind this is quite clear, but it doesn't work at the moment. 

With this new paradigm, shared and static libraries should be built 
from different object files, ones compiled without and with
-DLIBXML_STATIC correspondingly. And it implies major changes 
that are beyond my knowledge of Cygwin internals. 

I've already notified Robert Collins, the Cygwin package maintainer, 
about this problem. 

As far as I understand, Matt Sergeant has nothing to do with that, 
as soon as we get the shared libraries correctly compiled.

Cheers, 
Stan
Comment 5 Stanislav Sinyagin 2002-06-17 07:38:50 UTC
The issue is discussed in Cygwin developers list. 
Gerrit Haase has offered a patch.
See the whole discussion at:
http://cygwin.com/ml/cygwin-apps/2002-06/msg00128.html
or the thread index:
http://cygwin.com/ml/cygwin-apps/2002-06/threads.html

regards, 
Stanislav
Comment 6 Daniel Veillard 2002-08-21 12:05:06 UTC
Apparently the Cygwin version of libxml2-2.4.23 is availble,
moreover this is not a blocker bug (i.e. it's a platform/environment
specific problem).
Seems closed to me:
  http://www.cygwin.com/packages/libxml2/

Daniel