httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Subra A Narayanan" <>
Subject compiling using gcc directly rather than using apxs
Date Tue, 27 Nov 2007 18:21:56 GMT
Hello folks,

I have run in to a problem and hope someone can help me out. I am using
Apache HTTP server version 2.0.61

I have written a simple test module called mod_my.c in which all I do is
printout the contents of  request->parsed_uri structure which if of type
The module works just fine when I use the following command to compile and
install it:
*$ /usr/sbin/apxs -c mod_my.c
$ /usr/sbin/apxs -i
But if I use my own make file to compile the module, I see that the members
of the apr_uri_t are either null or incorrectly populated. Here is the
command I use to compile
*$ gcc -Wall -Werror -fPIC -D_REENTRANT -Di686 -D_FILE_OFFSET_BITS=64 -g -I
/usr/include/httpd -I /usr/include/apr-0 -c mod_my.c -o mod_my.o
$ gcc -fPIC -static-libgcc -shared -z initfirst ./mod_my.o -o ./

I know for sure that the problem is with the way I am compiling the module.
Can anyone tell me what am I missing here?

I am also attaching my module file for your reference.


  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message