Subject: Re: dlopen and mod_aolserver
To: Chris Jones <chris@cjones.org>
From: Michael Rauch <mrauch@netbsd.org>
List: port-sparc
Date: 08/17/2001 22:28:15
Hi Chris,
On Thu, Aug 16, 2001 at 10:16:47AM -0600, Chris Jones wrote:
> So, my ap-aolserver pkg works fine on i386, but it doesn't work on
> sparc. Specifically, when apache tries to load mod_aolserver.so, it
> says:
>
> Syntax error on line 19 of /usr/local/etc/httpd/httpd.conf:
> Cannot load /usr/local/lib/httpd/mod_aolserver.so into server:
> /usr/local/lib/httpd/mod_aolserver.so: Undefined symbol "" (reloc type =
> 12, symnum = 2)
That looks like this shared library contains code that wasn't compiled with
the "-fPIC" flag.
>
> Am I building the .so file wrong? Here are the lines that accomplish
> this:
> [...]
How do you get the .o files? The problem should be there. Just add the flag
-fPIC to the compiler command line, recompile everything and it should
work.
(i386 IIRC doesn't really distinguish between pic and non-pic, that's why
you haven't seen the problem already there.)
HTH
Michael