On 23/07/07, Farokh Irani <[EMAIL PROTECTED]> wrote:
>On 7/22/07, Farokh Irani <[EMAIL PROTECTED]> wrote:
>>/usr/local/apache2/bin/apxs -i -n mod_fancy .libs/mod_fancy.so
>>.libs/config.so
>>/usr/local/apache2/build/instdso.sh
>>SH_LIBTOOL='/usr/local/apache2/build/libtool' .libs/mod_fancy.so
>>/usr/local/apache2/modules
>>/usr/local/apache2/build/libtool --mode=install cp .libs/mod_fancy.so
>>/usr/local/apache2/modules/
>>cp .libs/mod_fancy.so /usr/local/apache2/modules/mod_fancy.so
>>Warning! dlname not found in /usr/local/apache2/modules/mod_fancy.so.
>>Assuming installing a .so rather than a libtool archive.
>>chmod 755 /usr/local/apache2/modules/mod_fancy.so
>>/usr/local/apache2/build/instdso.sh
>>SH_LIBTOOL='/usr/local/apache2/build/libtool' .libs/config.so
>>/usr/local/apache2/modules
>>/usr/local/apache2/build/libtool --mode=install cp .libs/config.so
>>/usr/local/apache2/modules/
>>cp .libs/config.so /usr/local/apache2/modules/config.so
>>Warning! dlname not found in /usr/local/apache2/modules/config.so.
>>Assuming installing a .so rather than a libtool archive.
>
>Was this msg truncated? I didn't see the same error as in the start of
>this thread.
Hmm. Well, that's the most recent set of errors :)
>It does unfortunately look like you're invoking apxs in such a way as
>to install two DSO's, not to link two pieces of object code into a
>single DSO.
I tried to use the .la files (as you mentioned in a different message) as in:
apxs -i -n mod_fancy mod_fancy.la config.la
Unfortunately, apxs generated two .so files, mod_fancy.so and
config.so. It seems that apxs doesn't want to link multiple .la files
into one .so as it does if I passed it .cpp files.
I think that what I'm going to have to do is to create a single
library out of everything and then use apxs to install that. Anyone
have thoughts on that?
Huh. If you use the -c option correctly, ie., list all source code,
object files with one invocation of apxs then all the source file
object files, plus other object files, should be combined into one
loadable module at that point.
I see the problem now. You have:
%.o : %.cpp
apxs -S CC=g++ -c $<
which is just wrong. You shouldn't be calling apxs on each source file
separately. Instead do something like:
SRCS= mod_python.c _apachemodule.c requestobject.c tableobject.c util.c \
serverobject.c connobject.c filterobject.c hlist.c \
hlistobject.c finfoobject.c
mod_python.la: $(SRCS)
$(APXS) $(INCLUDES) -c $(SRCS) $(LDFLAGS) $(LIBS)
The name of the output module will use the basename of the first code
file listed in the list of source files in this case.
Graham