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)
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
Created attachment 28695 [details] Build output
As a test, I was just able to build 2.2.21 fine.
I applied the CVE-2011-3368.patch patch to the 2.2.21 source and compiled and it compiled fine.
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'
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.
Awesome Stefan, that worked! I guess I thought that was the default since APR was bundled with the download.
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.
this dep was removed in 2.2.24