Bug 33540 - apxs called with -o my_mod.so creates my_mod.la
Summary: apxs called with -o my_mod.so creates my_mod.la
Status: RESOLVED INVALID
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Build (show other bugs)
Version: 2.0.53
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-13 10:33 UTC by Gabriel de Perthuis
Modified: 2005-02-14 08:52 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gabriel de Perthuis 2005-02-13 10:33:01 UTC
apxs is called like this:
apxs2 -c -o mod_caml.so -I/usr/lib/ocaml/3.08 /tmp/camlprimdb957f.c
-L/usr/lib/ocaml/3.08/pcre -L/usr/lib/ocaml/3.08 -lunix -lpcre_stubs -lpcre
-lstr mod_caml_c.o apache_c.o wrappers.o -I/usr/include/apache2
-I/usr/include/apr-0 -pipe -I/usr/include/xmltok -I/usr/include/openssl -Wall
-O2 -lcamlrun -ltermcap -lunix -lstr -lcamlrun -lm -ldl -lcurses -lpthread

/usr/bin/libtool --silent --mode=compile gcc -prefer-pic -pipe
-I/usr/include/xmltok -I/usr/include/openssl -Wall -O2
-DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500
-D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE
-I/build/buildd/apache2-2.0.53/build-tree/apache2-build/prefork/srclib/pcre
-pipe -I/usr/include/xmltok -I/usr/include/openssl -Wall -O2 -pthread
-I/usr/include/apache2  -I/usr/include/apr-0   -I/usr/include/apr-0
-I/usr/include -I/usr/lib/ocaml/3.08  -c -o /tmp/camlprimdb957f.lo
/tmp/camlprimdb957f.c && touch /tmp/camlprimdb957f.slo

/usr/bin/libtool --silent --mode=link gcc -o mod_caml.la  -rpath
/usr/lib/apache2/modules -module -avoid-version    /tmp/camlprimdb957f.lo
-L/usr/lib/ocaml/3.08/pcre -L/usr/lib/ocaml/3.08 -lunix -lpcre_stubs -lpcre
-lstr mod_caml_c.o apache_c.o wrappers.o -I/usr/include/apache2
-I/usr/include/apr-0 -pipe -I/usr/include/xmltok -I/usr/include/openssl -Wall
-O2 -lcamlrun -ltermcap -lunix -lstr -lcamlrun -lm -ldl -lcurses -lpthread

Which means it doesn't create mod_caml.so . The file exists in .libs, however.
I'm not yet sure if this one works.
Comment 1 Sander Temme 2005-02-13 21:52:04 UTC
.libs/mod_caml.so should be a usable module. APXS uses GNU libtool under the hood, and this how 
GNU libtool comes out of the link phase. If you call APXS again with -i (for install), you'll get that same 
mod_caml.so in your Apache 2.0 modules directory. 
Comment 2 Gabriel de Perthuis 2005-02-14 17:51:00 UTC
This prevents apxs from being used in place of a compiler. For example, in a
makefile that involves OCaml and its special linking of C to bytecode, the OCaml
linker assumes that the compiler it calls with -o my_module.so assumes
(reasonnably?) it will get my_module.so .
This can be solved by writing a wrapper around apxs2 that copies the file,
however that doesn't integrate well with the autoconf infrastructure that uses
an APXS variable.
So I think you should consider a switch that makes apxs create that file.
Comment 3 Gabriel de Perthuis 2005-02-14 17:52:45 UTC
(I should proofread myself, sorry)