httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christiaan Lamprecht" <>
Subject Re: Linking to a Shared Object
Date Sat, 11 Nov 2006 13:58:40 GMT
> Don't do that.  If you need to use assl outside Apache, compile it
> to a separate shared lib, and load that with LoadFile for mod_assl.

Thanks for the help. I've now compiled both to shared libs:
cd /home/uxx/u01/n1054894/Apache2
./sbin/apxs -i -a -c ../ApacheSource/httpd-2.2.3/modules/ssl/mod_assl.c
./sbin/apxs -n assllib -i -a -c ../ApacheSource/httpd-2.2.3/modules/ssl/assl.c

Funny thing is that both libraries seem to use something from the
other, so which ever one I load first complains that it needs
something from the other when I start Apache:

httpd: Syntax error on line 53 of
/home/uxx/u01/n1054894/Apache2/etc/apache2/httpd.conf: Cannot load
/home/uxx/u01/n1054894/Apache2/libexec/ into server:
/home/uxx/u01/n1054894/Apache2/libexec/ undefined symbol:


httpd: Syntax error on line 53 of
/home/uxx/u01/n1054894/Apache2/etc/apache2/httpd.conf: Cannot load
/home/uxx/u01/n1054894/Apache2/libexec/ into server:
/home/uxx/u01/n1054894/Apache2/libexec/ undefined symbol:

I've tried to give apxs some extra parameters -l, -L, or -I in the
hope that it will find the functions but no luck. I can of course not
use the APR mutex's... and use the native ones and it should work

I also think that APR mutex's might not be ideal for my scenario:
If an external program is going to call functions in assl.c which, in
turn, is going use the mutex's, do I need to use apr_proc_mutex.h or
apr_thread_mutex.h routines? I am currently using the prefork MPM so
there's no serverside thread issues...

The mutex is stored in my server-config which of course needs to be
accessed before the mutex can be locked, and to access it we need a
server_rec which of course needs to be stored/pointed to in assl.c
somewhere so that assl.c can access it "on demand" rather than just
when requests are made to the server. Currently it points to
base_server given to it in the mod_assl ap_hook_post_config function.
Due to the compiling issues I haven't tested my external program yet,
so it might just break when it tries to lock the mutex, since the call
isn't associated with an Apache thread or process?

Thanks for the help once again
Christiaan Lamprecht

PS: Your online tutorials have been a great help! Thanks! Could have
really done with your book too... guess I'll have to wait...

View raw message