Mailing List Archive

Problem loading mod_backhand trough DSO
This is a multi-part message in MIME format.

------=_NextPart_000_0223_01C265A9.AA1A6490
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi
Anyone know how to deal with the following error?

Syntax error on line 223 of /usr/local/apache_1.3.26/conf/httpd.conf:
Can't locate API module structure `mod_backhand' in file =
/usr/local/apache_1.3.26/libexec/mod_backhand.so: ./bin/httpd: undefined =
symbol: mod_backhand

Install steps for creating module:
$./configure --with-apxs=3D/usr/local/apache_1.3.26/bin/apxs

####<output configure>
creating cache ./config.cache
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for fcntl.h... yes
checking for sys/ioctl.h... yes
checking for sys/time.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for working const... yes
checking for pid_t... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for uid_t in sys/types.h... yes
checking whether gcc needs -traditional... no
checking for 8-bit clean memcmp... yes
checking for gethostname... yes
checking for gettimeofday... yes
checking for regcomp... yes
checking for select... yes
checking for socket... yes
checking for strdup... yes
checking for strstr... yes
checking for pow in -lm... yes
checking for kstat_open in -lkstat... no
checking for sun_len and sun_family in sockaddr_un... no
checking for Apache module support via DSO through APXS... yes
checking for Apache module support via DSO through APACI... no
updating cache ./config.cache
creating ./config.status
creating Makefile

####</output configure>

$make
####<output make>
/usr/local/apache_1.3.26/bin/apxs -lm -o mod_backhand.so -c =
mod_backhand.c back_util.c apue.c arriba.c builtins.c
gcc -DLINUX=3D22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -fpic =
-DSHARED_MODULE -I/usr/local/apache_1.3.26/include -c mod_backhand.c
gcc -DLINUX=3D22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -fpic =
-DSHARED_MODULE -I/usr/local/apache_1.3.26/include -c back_util.c
gcc -DLINUX=3D22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -fpic =
-DSHARED_MODULE -I/usr/local/apache_1.3.26/include -c apue.c
gcc -DLINUX=3D22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -fpic =
-DSHARED_MODULE -I/usr/local/apache_1.3.26/include -c arriba.c
gcc -DLINUX=3D22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -fpic =
-DSHARED_MODULE -I/usr/local/apache_1.3.26/include -c builtins.c
gcc -shared -o mod_backhand.so builtins.o arriba.o apue.o back_util.o =
mod_backhand.o -lm

####</output make>

At this time i have the mod_backhand.so but NOT byHostname.so
Why?

$make install

####<output install>
./mkinstalldirs /usr/local/bin
./mkinstalldirs /usr/local/lib
./mkinstalldirs /usr/local/info
make: INSTALL@: Command not found
make: *** [install] Error 127
</output install>

the mod_backhand.so copied to the libexec dir of apache.
in httpd.conf
LoadModule mod_backhand libexec/mod_backhand.so
AddModule mod_backhand.c
added by hand

The configure command for apache was './configure --enable-shared=3Dmax'

Greetz
Henry




------=_NextPart_000_0223_01C265A9.AA1A6490
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Anyone know how to deal with the =
following=20
error?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Syntax error on line 223 of=20
/usr/local/apache_1.3.26/conf/httpd.conf:<BR>Can't locate API module =
structure=20
`mod_backhand' in file /usr/local/apache_1.3.26/libexec/mod_backhand.so: =

./bin/httpd: undefined symbol: mod_backhand</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Install steps for creating =
module:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>$./configure=20
--with-apxs=3D/usr/local/apache_1.3.26/bin/apxs</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>####&lt;output =
configure&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>creating cache =
./config.cache<BR>checking for=20
gcc... gcc<BR>checking whether the C compiler (gcc&nbsp; ) works...=20
yes<BR>checking whether the C compiler (gcc&nbsp; ) is a =
cross-compiler...=20
no<BR>checking whether we are using GNU C... yes<BR>checking whether gcc =
accepts=20
-g... yes<BR>checking whether gcc and cc understand -c and -o =
together...=20
yes<BR>checking how to run the C preprocessor... gcc -E<BR>checking for =
ANSI C=20
header files... yes<BR>checking for fcntl.h... yes<BR>checking for=20
sys/ioctl.h... yes<BR>checking for sys/time.h... yes<BR>checking for =
unistd.h...=20
yes<BR>checking for dlfcn.h... yes<BR>checking for working const...=20
yes<BR>checking for pid_t... yes<BR>checking for size_t... =
yes<BR>checking=20
whether time.h and sys/time.h may both be included... yes<BR>checking =
whether=20
struct tm is in sys/time.h or time.h... time.h<BR>checking for uid_t in=20
sys/types.h... yes<BR>checking whether gcc needs -traditional... =
no<BR>checking=20
for 8-bit clean memcmp... yes<BR>checking for gethostname... =
yes<BR>checking for=20
gettimeofday... yes<BR>checking for regcomp... yes<BR>checking for =
select...=20
yes<BR>checking for socket... yes<BR>checking for strdup... =
yes<BR>checking for=20
strstr... yes<BR>checking for pow in -lm... yes<BR>checking for =
kstat_open in=20
-lkstat... no<BR>checking for sun_len and sun_family in sockaddr_un...=20
no<BR>checking for Apache module support via DSO through APXS... =
yes<BR>checking=20
for Apache module support via DSO through APACI... no<BR>updating cache=20
./config.cache<BR>creating ./config.status<BR>creating =
Makefile</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>####&lt;/output =
configure&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;</DIV></FONT>
<DIV><FONT face=3DArial size=3D2>$make</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>####&lt;output make&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>/usr/local/apache_1.3.26/bin/apxs&nbsp; =

-lm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -o mod_backhand.so -c =
mod_backhand.c=20
back_util.c apue.c arriba.c builtins.c<BR>gcc -DLINUX=3D22 -DUSE_HSREGEX =

-DUSE_EXPAT -I../lib/expat-lite -fpic -DSHARED_MODULE=20
-I/usr/local/apache_1.3.26/include&nbsp; -c mod_backhand.c<BR>gcc =
-DLINUX=3D22=20
-DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -fpic -DSHARED_MODULE=20
-I/usr/local/apache_1.3.26/include&nbsp; -c back_util.c<BR>gcc =
-DLINUX=3D22=20
-DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -fpic -DSHARED_MODULE=20
-I/usr/local/apache_1.3.26/include&nbsp; -c apue.c<BR>gcc -DLINUX=3D22=20
-DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -fpic -DSHARED_MODULE=20
-I/usr/local/apache_1.3.26/include&nbsp; -c arriba.c<BR>gcc -DLINUX=3D22 =

-DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -fpic -DSHARED_MODULE=20
-I/usr/local/apache_1.3.26/include&nbsp; -c builtins.c<BR>gcc -shared -o =

mod_backhand.so builtins.o arriba.o apue.o back_util.o mod_backhand.o =
-lm<BR>
<DIV><FONT face=3DArial size=3D2>####&lt;/output make&gt;</FONT></DIV>
<DIV>&nbsp;</DIV></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>At this time i have the mod_backhand.so =
but NOT=20
byHostname.so</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Why?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>$make install</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>####&lt;output install&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>./mkinstalldirs =
/usr/local/bin<BR>./mkinstalldirs=20
/usr/local/lib<BR>./mkinstalldirs /usr/local/info<BR>make: INSTALL@: =
Command not=20
found<BR>make: *** [install] Error 127<BR>&lt;/output =
install&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>the mod_backhand.so copied to the =
libexec dir of=20
apache.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>in httpd.conf</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>LoadModule=20
mod_backhand&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
libexec/mod_backhand.so</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>AddModule mod_backhand.c<BR>added by=20
hand</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The configure command for apache was =
'./configure=20
--enable-shared=3Dmax'</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Greetz</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Henry</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;</DIV>
<DIV><BR></DIV></FONT></BODY></HTML>

------=_NextPart_000_0223_01C265A9.AA1A6490--
Problem loading mod_backhand trough DSO [ In reply to ]
> Should be:
> LoadModule backhand_module libexec/mod_backhand.so
>
Thank you!
It works

Henry
Problem loading mod_backhand trough DSO [ In reply to ]
Henry Vermeulen wrote:

> At this time i have the mod_backhand.so but NOT byHostname.so
> Why?

byHostname.so is an _example_. If you really want it, type: make
byHostname.so

>
> $make install
>
> ####<output install>
> ./mkinstalldirs /usr/local/bin
> ./mkinstalldirs /usr/local/lib
> ./mkinstalldirs /usr/local/info
> make: INSTALL@: Command not found
> make: *** [install] Error 127
> </output install>

There is no make install target. Copy mod_backhand.so to your apache
libexec directory manually.

> the mod_backhand.so copied to the libexec dir of apache.
> in httpd.conf
> LoadModule mod_backhand libexec/mod_backhand.so

Should be:
LoadModule backhand_module libexec/mod_backhand.so

> AddModule mod_backhand.c
>


--
Theo Schlossnagle
Principal Consultant
OmniTI Computer Consulting, Inc. -- http://www.omniti.com/
Phone: +1 410 872 4910 x201 Fax: +1 410 872 4911
1024D/82844984/95FD 30F1 489E 4613 F22E 491A 7E88 364C 8284 4984
2047R/33131B65/71 F7 95 64 49 76 5D BA 3D 90 B9 9F BE 27 24 E7

-----------------------------------------------------------
-- Presenting at ApacheCon --
-- November 18th, 2002 --
-- Las Vegas, Nevada --
-- Backhand: understanding and building HA/LB clusters --
-- http://apachecon.com/2002/US/ --
-- --
-- Learn all there is to know about high availability --
-- internet systems and load balancing techniques --
-- focusing on applications driven by the Apache web --
-- server! --
-----------------------------------------------------------