Mailing List Archive

[mod_backhand-users] Problem on solaris
I have 2 solaris 2.6 machine running apache 1.3.12 with ApacheJserv1.1.2 and
mod_php4.0.2.

I use the next commands to compile mod_backhand:
apxs -c -o mod_backhand.so apue.c arriba.c back_util.c builtins.c
mod_backhand.c
apxs -c -o byHostname.so byHostname.c

I put next lines into httpd.conf:
########
# LoadModule foo_module libexec/mod_foo.so
LoadModule backhand_module libexec/mod_backhand.so
LoadModule env_module libexec/mod_env.so
LoadModule config_log_module libexec/mod_log_config.so
LoadModule mime_module libexec/mod_mime.so
#######

ClearModuleList
AddModule mod_backhand.c
AddModule mod_env.c
AddModule mod_log_config.c
############
<IfModule mod_backhand.c>
# This directorty must be readable and writable by euid of apache (nobody)
# The mod_backhand-Arriba and the AF_UNIX domain files are stored in here.
UnixSocketDir /export/home/apache_jssl/backhand
# This would be the way to do ethernet broadcast
# MulticastStats 128.220.221.255:4445
# but we choose to use the following IP multicast address with a TTL of 1
MulticastStats 225.220.221.20:4445,1
# We want to accept resource information originating from any IP on our
# network.
AcceptStats 192.168.169.0/24
</IfModule>

<Location "/backhand/">
SetHandler backhand-handler
</Location>
##############
<Directory "/export/home/apache_jssl/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
Backhand byAge
Backhand byRandom
Backhand byLogWindow
Backhand byLoad
</Directory>
##############

When i start Apache with commands
apachectl stop
apachectl start
i receive te following message:
Syntax error on line 208 of /export/home/apache_jssl/conf/httpd.conf:
Cannot load /export/home/apache_jssl/libexec/mod_backhand.so into server:
ld.so.1: /export/home/apache_jssl/bin/httpd: fatal: relocation error: file
/export/home/apache_jssl/libexec/mod_backhand.so: symbol pow: referenced
symbol not found
../../bin/apachectl start: httpd could not be started

Someone could help me?

Thanks
Filippo Adessi
Milan, Italy
[mod_backhand-users] Problem on solaris [ In reply to ]
Filippo Adessi wrote:
> I have 2 solaris 2.6 machine running apache 1.3.12 with ApacheJserv1.1.2 and
> mod_php4.0.2.

Great. Two issues:

> I use the next commands to compile mod_backhand:
> apxs -c -o mod_backhand.so apue.c arriba.c back_util.c builtins.c
> mod_backhand.c

mod_backhand uses floating point arithmetic to calculate and compare costs.
This requires the math library and the kstat library on Solaris, so try:

apxs -c -o mod_backhand.so apue.c arriba.c back_util.c builtins.c
mod_backhand.c -lm -lkstat

> apxs -c -o byHostname.so byHostname.c

On Solaris, there are problems loading candidacy functions dynamically if
mod_backhand is dynamically loaded. I notice that you don't use byHostname,
but be warned that it may not work in your existing compile environment.

Two hacks:
(1) compile mod_backhand statically and load as many candidacy functions as
you want.
(2) compile mod_backhand dynamically and change builtins every time you add a
candidacy functions.

Both options have their trade-offs.


--
Theo Schlossnagle
1024D/A8EBCF8F/13BD 8C08 6BE2 629A 527E 2DC2 72C2 AD05 A8EB CF8F
2047R/33131B65/71 F7 95 64 49 76 5D BA 3D 90 B9 9F BE 27 24 E7