On Tue, Aug 25, 2015 at 5:13 PM, Rainer Jung <rainer.j...@kippdata.de>
wrote:

> Am 25.08.2015 um 14:58 schrieb Falco Schwarz:
>
>> If I try to startup httpd though the following error occurs:
>>
>> httpd: Syntax error on line 88 of /opt/apache/conf/alles/httpd.conf:
>> Cannot
>> load /opt/apache/modules/mod_jk.so into server:
>> /opt/apache/modules/mod_jk.so: undefined symbol: __sync_add_and_fetch_4
>>
>
> simply change the #elif line 436 e.g. to
>
> #elif defined(JK_USE_GCC_ATOMICS) && defined(__GNUC__) && (__GNUC__ > 4 ||
> (__GNUC__ == 4 && __GNUC_MINOR__ >= 1))
>
>
> Since JK_USE_GCC_ATOMICS is not defined, the elif will be skipped and the
> next option (APR atomics) will be used, but you can later switch back to
> the GCC version by compiling with -DJK_USE_GCC_ATOMICS. We might add
> something like this and make the define be chosen according to configure
> flags (--disable-gcc-atomics). Or maybe we should even use a configure
> check to detect real support for GCC atomics on the target platform.
> <users-h...@tomcat.apache.org>
>

I switched the logic to better suit my needs, but that works:

#elif !defined(JK_NO_GCC_ATOMICS) && defined(__GNUC__) && (__GNUC__ > 4 ||
(__GNUC__ == 4 && __GNUC_MINOR__ >= 1))


So on our 32bit systems jk is built with:
CFLAGS='-DJK_NO_GCC_ATOMICS' ./configure --with-apxs=/opt/apache/bin/apxs

It would be nice if something like that (preferably a configure option)
would be built in. It would of course be even better if configure could
detect if gcc atomics work and decide whether to use them or not. Anyways,
thank you for your quick and very helpful response.

Falco

Reply via email to