Bug 53162 - Cannot compile Apache 2.2.22
Summary: Cannot compile Apache 2.2.22
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Build (show other bugs)
Version: 2.2.22
Hardware: PC Linux
: P2 critical (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Depends on:
Reported: 2012-04-30 05:16 UTC by Donald Tripp
Modified: 2014-01-20 00:08 UTC (History)
1 user (show)

Build output (196.61 KB, text/plain)
2012-04-30 05:25 UTC, Donald Tripp

Note You need to log in before you can comment on or make changes to this bug.
Description Donald Tripp 2012-04-30 05:16:37 UTC
Linux RHEL 5.8 2.6.18-308.el5xen #1 SMP Fri Jan 27 17:26:57 EST 2012 x86_64 x86_64 x86_64 GNU/Linux

While building 2.2.22, compile fails with following error. I have not been able to find anything on the internet relevant to this. Compiling with gcc version 4.1.2 20080704 (Red Hat 4.1.2-52)

/usr/lib64/apr-1/build/libtool --silent --mode=link gcc -pthread    -L/usr/kerberos/lib64      -o mod_dir.la -rpath /usr/lib64/httpd/modules -module -avoid-version  mod_dir.lo
/usr/lib64/apr-1/build/libtool --silent --mode=link gcc -pthread    -L/usr/kerberos/lib64      -o mod_actions.la -rpath /usr/lib64/httpd/modules -module -avoid-version  mod_actions.lo
/usr/lib64/apr-1/build/libtool --silent --mode=link gcc -pthread    -L/usr/kerberos/lib64      -o mod_speling.la -rpath /usr/lib64/httpd/modules -module -avoid-version  mod_speling.lo
/usr/lib64/apr-1/build/libtool --silent --mode=link gcc -pthread    -L/usr/kerberos/lib64      -o mod_userdir.la -rpath /usr/lib64/httpd/modules -module -avoid-version  mod_userdir.lo
/usr/lib64/apr-1/build/libtool --silent --mode=link gcc -pthread    -L/usr/kerberos/lib64      -o mod_alias.la -rpath /usr/lib64/httpd/modules -module -avoid-version  mod_alias.lo
/usr/lib64/apr-1/build/libtool --silent --mode=link gcc -pthread    -L/usr/kerberos/lib64      -o mod_rewrite.la -rpath /usr/lib64/httpd/modules -module -avoid-version  mod_rewrite.lo
make[4]: Leaving directory `/usr/src/redhat/BUILD/httpd-2.2.22/prefork/modules/mappers'
make[3]: Leaving directory `/usr/src/redhat/BUILD/httpd-2.2.22/prefork/modules/mappers'
make[2]: Leaving directory `/usr/src/redhat/BUILD/httpd-2.2.22/prefork/modules'
make[2]: Entering directory `/usr/src/redhat/BUILD/httpd-2.2.22/prefork/support'
make[2]: Leaving directory `/usr/src/redhat/BUILD/httpd-2.2.22/prefork/support'

make[1]: Leaving directory `/usr/src/redhat/BUILD/httpd-2.2.22/prefork'
make: *** [all-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.97040 (%build)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.97040 (%build)
Comment 1 Donald Tripp 2012-04-30 05:21:15 UTC
modules/http/.libs/libmod_http.a(byterange_filter.o): In function `ap_set_byterange':
byterange_filter.c:(.text+0x130d): undefined reference to `apr_array_clear'
collect2: ld returned 1 exit status
Comment 2 Donald Tripp 2012-04-30 05:25:46 UTC
Created attachment 28695 [details]
Build output
Comment 3 Donald Tripp 2012-04-30 05:48:10 UTC
As a test, I was just able to build 2.2.21 fine.
Comment 4 Donald Tripp 2012-04-30 06:00:53 UTC
I applied the CVE-2011-3368.patch patch to the 2.2.21 source and compiled and it compiled fine.
Comment 5 Serge Knystautas 2012-06-05 01:00:31 UTC
I have the same issue on CentOS 5.8.  I've been building apache by hand for a while... I can compile 2.2.21 and earlier, but 2.2.22 introduces this bug.  Exact same issue... modules/http/.libs/libmod_http.a(byterange_filter.o): In function `ap_set_byterange': byterange_filter.c:(.text+0x12c1): undefined reference to `apr_array_clear'
Comment 6 Stefan Fritsch 2012-06-06 21:04:55 UTC
It seems apr_array_clear has been introduced in apr 1.3.x. I guess you are trying to compile with apr 1.2.x. You can use --with-included-apr as a work-around.

Not sure if we should just document the apr 1.3 dependency or try to restore apr 1.2 compatibility in 2.2.23.
Comment 7 Serge Knystautas 2012-06-06 21:09:08 UTC
Awesome Stefan, that worked!  I guess I thought that was the default since APR was bundled with the download.
Comment 8 yakative 2013-01-30 15:37:54 UTC
Created an account just to say thanks on this.  worked for me 2.  I should add that I had a yum installed httpd which no doubt was where the compile was looked for the apr.
Comment 9 Eric Covener 2014-01-20 00:08:29 UTC
this dep was removed in 2.2.24