GNOME Bugzilla – Bug 74503
Compiler error on HPUX
Last modified: 2009-08-15 18:40:50 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...
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
The version 2.4.18 relased today should not exhibit the problem anymore. This should close that bug, thanks, Daniel
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. ]
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
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