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 74503 - Compiler error on HPUX
Compiler error on HPUX
Status: VERIFIED FIXED
Product: libxml2
Classification: Platform
Component: general
2.4.13
Other HP-UX
: Normal normal
: ---
Assigned To: Daniel Veillard
Daniel Veillard
Depends on:
Blocks:
 
 
Reported: 2002-03-13 12:34 UTC by Ian Britten
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ian Britten 2002-03-13 12:34:19 UTC
libxml2 = 2.4.9
OS = HPUX 10.20
Compiler = gcc 3.0.3

When compiling libxml2, the following compiler error occurs:
    gcc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include -I/include -O3
-Wall -c nanohttp.c  -fPIC -DPIC -o .libs/nanohttp.lo
    nanohttp.c: In function `xmlNanoHTTPConnectHost':
    nanohttp.c:859: `h_errno' undeclared (first use in this function)

Inside /usr/include/netdb.h, the code looks like:
    #ifdef _XOPEN_SOURCE_EXTENDED
    extern int h_errno;
    #endif

Thus, the fix is to manually add -D_XOPEN_SOURCE_EXTENDED to CFLAGS before
running configure.  However, I would have thought that configure should
have been able to turn this on itself...
Comment 1 Daniel Veillard 2002-03-18 12:25:49 UTC
Fixed in a different way. That part is optional. Configure
has no good way of detecting that kind of things. If the
headers on your platforms don't provide by default the 
set of information expected, then this part will not be compiled
and you won't get complete debug informations.
If the platform compilers have decided on-purpose to not make
this availble by default libxml will not use it. Check with your
platform technical support why they did so and try to get this
fixed with them. In the meantime libxml will just not try to
access those informations.

Daniel
Comment 2 Daniel Veillard 2002-03-18 21:50:58 UTC
The version 2.4.18 relased today should not exhibit the
problem anymore. This should close that bug,

  thanks,

Daniel
Comment 3 Ian Britten 2002-03-22 21:38:05 UTC
I tried the latest 2.4.18 version, but there is no change.  The error
is the same as initially reported.
Would seeing some of the autoconf results help claraify the problem?

[ Note - I'm not stuck, and can easily work around this problem, so
this is probably low priority.  However, I'm willing to help resolve
it so others don't run into it. ]
Comment 4 Daniel Veillard 2002-03-22 21:46:40 UTC
Yes, others are having the problem too <grin/> and on other
platforms:
http://mail.gnome.org/archives/xml/2002-March/msg00238.html
Is adding 
#include <resolv.h>
fixing the problem on your platform ?

Daniel
Comment 5 Daniel Veillard 2002-03-25 22:08:46 UTC
I fixed this in a relatively abrupt way in 2.4.19 by
currently allowing this part to be compiled only on linux
where I know it does not generate troubles.

Daniel