[mod_python] undefined symbol: apr_table_compress ??

Jim Gallacher jpg at jgassociates.ca
Wed May 17 08:35:34 EDT 2006


hrz at geodata.soton.ac.uk wrote:
> I've just come across the problem defined below using mod_python
> 3.2.8. After some hunting around, it transpires that the problem is
> that the installed APR has been stripped (we're using Red Hat) as
> described very nicely at:
> 
> http://search.cpan.org/dist/mod_perl/docs/user/troubleshooting/troubleshooting.pod#undefined_symbol%3A_apr_table_compress
> 
> The attached patch to the 3.2.8 configure.in file seemed to catch the
> error (autoconf needs to be run after applying this). After looking at
> 
> http://www.modpython.org/pipermail/mod_python/2006-February/020286.html
> 
> some better solution using apr-config might be better to ensure that
> APR is as required.
> 

The fact that the library is stripped is not relevant to your problem. 
All the libs on Debian are stripped and everything works fine for me. 
Stripping just removes debugging symbols, making the lib smaller on disk 
and in memory.

I took a quick glance at the debian src for apache 2.0.55, and it looks 
like apr_table_compress was added in apr 0.9.4, so you might want to 
check your apr version with

$ apr-config --version

I'm not sure when we started to use apr_table_compress, but I have a 
feeling this may have been done in 3.2.x to fix a bug. I don't have time 
to investigate right now, but I will check the svn logs tonight.

Jim

> Kind regards,
> 
> Homme.
> 
> 
>>> I've downloaded mod_python 3.2.5b (Beta) and compiled it using
>>>
>>> ./configure --with-apxs=/usr/sbin/apxs --with-python=/usr/local/bin/ 
>>> python2.3
>>> make
>>> make install
>>>
>>> just as the documentation says. But when I add LoadModule... to my
>>> httpd.conf and restart Apache 2.0.46 I get the error message
>>>
>>> Cannot load /etc/httpd/modules/mod_python.so into server:
>>> /etc/httpd/modules/mod_python.so: undefined symbol: apr_table_compress
>>>
>>> any ideas on how to fix this??
>>>
>>> Regards
>>> Martin
>> Martin, did you ever sort this out? I appreciate no help was  
>> forthcoming on
>> the list. It doesn't seem to be anything we have specifically seen.  
>> Thus, bar
>> suggesting a rebuild of Apache and mod_python from scratch, probably
>> nothing else anyone could think of to suggest.
>>
>> Graham
> 
> 
> 
> ------------------------------------------------------------------------
> 
> --- configure.in
> +++ configure.in
> @@ -117,6 +117,15 @@
>      AC_MSG_ERROR([This version of mod_python only works with Apache 2. The one you have seems to be $ver.])
>    fi
>  
> +  # ensure the apr_* symbols can be read
> +  AC_CHECK_LIB(apr-0, apr_table_compress, [], 
> +  [
> +    AC_MSG_ERROR([Apache Portable Runtime (apr) library not found. This may be due to one of:
> +    - APR not being installed on the system
> +    - The shared object (libapr-0) being stripped
> +    - An installed APR that does not support the apr_table_compress() function])
> +  ])
> +  
>    # determine LIBEXEC
>    AC_MSG_CHECKING(for Apache libexec directory)
>    LIBEXECDIR=`${APXS} -q LIBEXECDIR`
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python



More information about the Mod_python mailing list