Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

compiling a 32 bit version of mod_zeus

8 views
Skip to first unread message

ian diddams

unread,
Apr 27, 2012, 8:39:58 AM4/27/12
to
Hi,

I'm getting desperate now so any help very welcome.

We use zeus traffic managers, and apache servers with mod_zeus as a
method of placing real client IPs into apache logs.

Because another module is only availbal; as a 32 bit module, apache on
our Centos 5.8 server has had to be compiled as a 32 bit version.

the problem is that I am unable to build a suitable mod_zeus for use
with this.

Here's the compile errors I get. (the <---- are mine)


$/opt/apache/bin/apxs -Wc,-m32 -i -a -c -n 'mod_zeus' mod_zeus.c

/opt/apache/build/libtool --silent --mode=compile gcc -prefer-pic -m32
-DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -pthread -I/
opt/apache/include -I/opt/apache/include -I/opt/apache/include -m32 -c
-o mod_zeus.lo mod_zeus.c && touch mod_zeus.slo
/opt/apache/build/libtool --silent --mode=link gcc -o mod_zeus.la -
rpath /opt/apache/modules -module -avoid-version mod_zeus.lo

/usr/bin/ld: warning: i386 architecture of input file `.libs/
mod_zeus.o' is incompatible with i386:x86-64 output <------


.libs/mod_zeus.o: In function `create_zeus_config':
mod_zeus.c:(.text+0x21): undefined reference to `apr_palloc'
mod_zeus.c:(.text+0x4a): undefined reference to `apr_table_make'
.libs/mod_zeus.o: In function `mod_zeus_conf_load_balancer_ip':
mod_zeus.c:(.text+0x161): undefined reference to `apr_table_add'
.libs/mod_zeus.o: In function `zeus_trusted':
mod_zeus.c:(.text+0x1b3): undefined reference to `apr_table_get'
mod_zeus.c:(.text+0x1ea): undefined reference to `apr_table_get'
mod_zeus.c:(.text+0x210): undefined reference to `apr_table_setn'
mod_zeus.c:(.text+0x232): undefined reference to `apr_table_set'
mod_zeus.c:(.text+0x25d): undefined reference to `apr_table_setn'
.libs/mod_zeus.o: In function `zeus_handler':
mod_zeus.c:(.text+0x2de): undefined reference to `apr_table_get'
mod_zeus.c:(.text+0x351): undefined reference to `ap_log_rerror'
mod_zeus.c:(.text+0x375): undefined reference to `apr_table_get'
mod_zeus.c:(.text+0x396): undefined reference to `apr_table_setn'
mod_zeus.c:(.text+0x3f7): undefined reference to
`apr_sockaddr_info_get'
mod_zeus.c:(.text+0x439): undefined reference to `ap_log_rerror'
mod_zeus.c:(.text+0x45f): undefined reference to `apr_pstrdup'
.libs/mod_zeus.o: In function `register_hooks':
mod_zeus.c:(.text+0x4b9): undefined reference to
`ap_hook_post_read_request'
collect2: ld returned 1 exit status
apxs:Error: Command failed with rc=65536


modzeus is an unsupported utility apparently and I have been unable to
get any help from that direction.

Has anyone any ideas?

cheers

Ian

J.O. Aho

unread,
Apr 27, 2012, 11:49:50 AM4/27/12
to
ian diddams wrote:
> Hi,
>
> I'm getting desperate now so any help very welcome.
>
> We use zeus traffic managers, and apache servers with mod_zeus as a
> method of placing real client IPs into apache logs.
>
> Because another module is only availbal; as a 32 bit module, apache on
> our Centos 5.8 server has had to be compiled as a 32 bit version.
>
> the problem is that I am unable to build a suitable mod_zeus for use
> with this.
>
> Here's the compile errors I get. (the<---- are mine)
>
>
> $/opt/apache/bin/apxs -Wc,-m32 -i -a -c -n 'mod_zeus' mod_zeus.c
>
> /opt/apache/build/libtool --silent --mode=compile gcc -prefer-pic -m32
> -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -pthread -I/
> opt/apache/include -I/opt/apache/include -I/opt/apache/include -m32 -c
> -o mod_zeus.lo mod_zeus.c&& touch mod_zeus.slo
I would think you have issues with using 64bit libs and trying to compile
32bit (you sure you have 32bit libs of all the dependencies), I would suggest
you setup a 32bit CentOS instead, would make your life so much easier.


--

//Aho

ian diddams

unread,
Apr 27, 2012, 4:46:52 PM4/27/12
to
I suspect you are right... except we are 95% down a path and this is
the last "bit" and we were hoping to "get away with it".

As it is I can use apache LogFormat & XFF headers to report real
client IPs in customlogs, so that will (just about) do.

cheers

ian

J.O. Aho

unread,
Apr 28, 2012, 2:53:22 AM4/28/12
to
ian diddams wrote:
> I suspect you are right... except we are 95% down a path and this is
> the last "bit" and we were hoping to "get away with it".
>
> As it is I can use apache LogFormat& XFF headers to report real
> client IPs in customlogs, so that will (just about) do.

You can always set up a 32bit machine where you compile the program, see to
move all dependencies to the 64bit machine. I don't recommend this, as it will
usually lead to some missing dependency or libraries not found.


--

//Aho

Richard Kettlewell

unread,
Apr 28, 2012, 4:45:56 AM4/28/12
to
ian diddams <iandid...@googlemail.com> writes:
> $/opt/apache/bin/apxs -Wc,-m32 -i -a -c -n 'mod_zeus' mod_zeus.c
>
> /opt/apache/build/libtool --silent --mode=compile gcc -prefer-pic -m32
> -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -pthread -I/
> opt/apache/include -I/opt/apache/include -I/opt/apache/include -m32 -c
> -o mod_zeus.lo mod_zeus.c && touch mod_zeus.slo
> /opt/apache/build/libtool --silent --mode=link gcc -o mod_zeus.la -
> rpath /opt/apache/modules -module -avoid-version mod_zeus.lo
>
> /usr/bin/ld: warning: i386 architecture of input file `.libs/
> mod_zeus.o' is incompatible with i386:x86-64 output <------

The link command is missing -m32 so try adding -Wl,-m32.

> .libs/mod_zeus.o: In function `create_zeus_config':
> mod_zeus.c:(.text+0x21): undefined reference to `apr_palloc'

If the above doesn't fix this part too then try adding -lapr and perhaps
a suitable -L directive (probably -L/opt/apache/lib). The documentation
for apxs doesn't say it includes -lapr automatically so my guess would
be that you need to list it explicitly. OTOH the upstream instructions
for building the module don't mention it and I've not tried myself.

--
http://www.greenend.org.uk/rjk/
0 new messages