Apache 2.4.25-> 2.4.26 make FAILS

piotrv

Verified User
Joined
May 10, 2013
Messages
27
Code:
lsb_release -d
Description:	Debian GNU/Linux 7.11 (wheezy)

./build apache

Trying to make Apache 2...
Making all in srclib
make[1]: Entering directory '/usr/local/directadmin/custombuild/httpd-2.4.26/srclib'
Making all in apr
make[2]: Entering directory '/usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr'
make[3]: Entering directory '/usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr'
make[3]: Nothing to be done for 'local-all'.
make[3]: Leaving directory '/usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr'
make[2]: Leaving directory '/usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr'
Making all in apr-util
make[2]: Entering directory '/usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr-util'
make[3]: Entering directory '/usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr-util'
/bin/bash /usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr/libtool --silent --mode=compile gcc -pthread  -I/usr/local/include -DHAVE_CONFIG_H  -DLINUX -D_REENTRANT -D_GNU_SOURCE   -I/usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr-util/include -I/usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr-util/include/private  -I/usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr/include    -o xml/apr_xml.lo -c xml/apr_xml.c && touch xml/apr_xml.lo
xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory
compilation terminated.
/usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr-util/build/rules.mk:206: recipe for target 'xml/apr_xml.lo' failed
make[3]: *** [xml/apr_xml.lo] Error 1
make[3]: Leaving directory '/usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr-util'
/usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr-util/build/rules.mk:118: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr-util'
/usr/local/directadmin/custombuild/httpd-2.4.26/build/rules.mk:75: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/usr/local/directadmin/custombuild/httpd-2.4.26/srclib'
/usr/local/directadmin/custombuild/httpd-2.4.26/build/rules.mk:75: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

*** The make has failed, would you like to try to make again?
 

I am afraid your suggestion is not relevant to the problem I face during compilation.
It seems the custom build script for Apache 2.4.26 tries to install a lib (for Debian 8) which conflicts with the Debian 7 repo:

Code:
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 [B]libexpat1-dev : Depends: libexpat1 (= 2.1.0-1+deb7u5) but 2.1.0-6+b3 is to be installed[/B]
E: Unable to correct problems, you have held broken packages.

.....

Code:
/bin/bash /usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr/libtool --silent --mode=compile gcc -pthread  -I/usr/local/include -DHAVE_CONFIG_H  -DLINUX -D_REENTRANT -D_GNU_SOURCE   -I/usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr-util/include -I/usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr-util/include/private  -I/usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr/include    -o xml/apr_xml.lo -c xml/apr_xml.c && touch xml/apr_xml.lo
xml/apr_xml.c:35:19: fatal error: [B]expat.h: No such file or directory[/B]
compilation terminated.
 
So .. try to, or in the text in link i write before to config without....

I have no expat entry in configure.apache or any other apache config file, it seems . . .
Code:
ap2# egrep -R expat *
:confused:

But Apache is using an expat library :

Code:
# ldd /usr/sbin/httpd | egrep expat

[I]	libexpat.so.0 => /usr/lib/apache/libexpat.so.0 (0x00007f5507ea4000)[/I]

# strings /usr/lib/apache/libexpat.so.0 | grep expat_

[I]strings: /usr/local/lib/libz.so.1: no version information available (required by /usr/lib/libbfd-2.25-system.so)
expat_1.95.7[/I]

# ps aux | grep http | head -3

[I]apache    3056  0.1  4.2 240884 87164 ?        Sl   08:53   0:14 /usr/sbin/httpd -k start -DSSL
apache    3537  0.1  3.9 234828 81472 ?        Sl   09:40   0:08 /usr/sbin/httpd -k start -DSSL
apache    3672  0.1  2.3 202200 48908 ?        Sl   09:52   0:09 /usr/sbin/httpd -k start -DSSL[/I]

# lsof -p 3056 | grep expat

[I]httpd   3056 apache  mem    REG  254,1   223304 253685 /usr/lib/apache/libexpat.so.0.5.0[/I]

# strings /usr/lib/apache/libexpat.so.0.5.0 | egrep expat_

[I]strings: /usr/local/lib/libz.so.1: no version information available (required by /usr/lib/libbfd-2.25-system.so)
expat_1.95.7[/I]

So it seems my current Apache 2.4.25 has been compiled against again a different expat library version than that of the operating system :confused::confused:

Obviously I am everything but an expert and I don't want to end up with different library versions causing conflicts.

I also have some reservations with backporting Debian packages.
I don't like to mess up any dependencies without knowing exactly the consequences of what I am doing ....
 
Last edited:
I have same problem like a piotrv.
Have any solution?

Sorry. Some more info:
System Debian 6 without --with-expat=builtin in custom/ap2/configure.apache
Code:
custombuild# grep expat configure/ap2/configure.apache
custombuild#

Code:
custombuild# ./build apache
...
gcc -E -DHAVE_CONFIG_H  -DLINUX -D_REENTRANT -D_GNU_SOURCE   -I/usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr-util/include -I/usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr-util/include/private  -I/usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr/include    exports.c | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$/\1/' >> aprutil.exp
xml/apr_xml.c:35:19: error: expat.h: No such file or directory
xml/apr_xml.c:66: error: expected specifier-qualifier-list before ‘XML_Parser’
xml/apr_xml.c: In function ‘cleanup_parser’:
xml/apr_xml.c:364: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:365: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c: At top level:
xml/apr_xml.c:384: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
xml/apr_xml.c: In function ‘apr_xml_parser_create’:
xml/apr_xml.c:401: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:402: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:410: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:411: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:412: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:424: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:424: error: ‘default_handler’ undeclared (first use in this function)
xml/apr_xml.c:424: error: (Each undeclared identifier is reported only once
xml/apr_xml.c:424: error: for each function it appears in.)
xml/apr_xml.c: In function ‘do_parse’:
xml/apr_xml.c:434: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:438: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:442: error: ‘apr_xml_parser’ has no member named ‘xp_err’
xml/apr_xml.c:442: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c: In function ‘apr_xml_parser_geterror’:
xml/apr_xml.c:500: error: ‘apr_xml_parser’ has no member named ‘xp_err’
xml/apr_xml.c:500: error: ‘apr_xml_parser’ has no member named ‘xp_err’
gcc -E -DHAVE_CONFIG_H  -DLINUX -D_REENTRANT -D_GNU_SOURCE   -I/usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr-util/include -I/usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr-util/include/private  -I/usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr/include    export_vars.c | sed -e 's/^\#[^!]*//' | sed -e '/^$/d' >> aprutil.exp
make[3]: *** [xml/apr_xml.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr-util'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/directadmin/custombuild/httpd-2.4.26/srclib/apr-util'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/directadmin/custombuild/httpd-2.4.26/srclib'
make: *** [all-recursive] Error 1

*** The make has failed, would you like to try to make again? (y,n): 
n
 
I added libexpat1-dev package and compile successfully.

Code:
root@host> dpkg -l | grep expat
ii  libexpat1                           2.0.1-7+squeeze2             XML parsing C library - runtime library
ii  libexpat1-dev                       2.0.1-7+squeeze2             XML parsing C library - development kit
 
Simply resolved issue by fixing version conflict between installed llibexpat1 and to be installed libexpat1-dev (for missing C header file expat.h).
Reinstalled libexpat1 from Debian 7 repo, then libexpat1-dev.

Works same for Apache 2.4.25-> 2.4.27

Issue solved :D
 
Last edited:
Back
Top