httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Devin Ceartas <de...@nacredata.com>
Subject Re: Linking in libraries to Apache Module
Date Tue, 08 Dec 2009 00:07:54 GMT
hm. -rpath doesn't seem to be an accepted flag in the apxs included  
with the latest OpenBSD
-- devin

On Dec 7, 2009, at 6:56 PM, Joe Lewis wrote:

> Devin Ceartas wrote:
>> The logic of my SQLite code works if I compile it as a stand-alone  
>> executable.
>>
>> My mod_hello.c compiles and loads/works fine without the SQLite code
>>
>> Combining the two, the module compiles and is installed, but the  
>> apache process dies immediately (core dump) every time it is  
>> loaded. Stripping out all the SQLite code and simply linking  
>> against SQLite causes this problem. In other words, with the same  
>> code:
>>
>> apxs -cia -L/usr/local/lib -I/home/devin mod_hello.c
>> /* Works Fine, prints "hello world" */
>>
>> apxs -cia -L/usr/local/lib -I/home/devin -lsqlite3 mod_hello.c
>> /* compiles but dies on apache load */
>> The platform is OpenBSD 4.6 with the platform's version of Apache  
>> 1.3 and SQLite 3.6.20 downloaded from the SQLite site and compiled  
>> from source
>>
>> Since I'm just getting started with C apache modules, I assume I'm  
>> missing something basic.
>
> If using a Linux-based system, I'd suggest ensuring that ld.so.conf  
> is setup to point to the directory or that the compile has the  
> runtime path for the sqlite library.  For example, I have added  "- 
> rpath /usr/local/lib -rpath /usr/local/lib/mysql" to my -L  
> parameters for apxs to load mySQL external modules dynamically in  
> the past.
>
> Linux-based systems also have an "strace" command that may be used  
> to figure out what libraries are missing.
>
> -- 
> Joe Lewis
> Chief Nerd 	SILVERHAWK <http://www.silverhawk.net/> 	(801) 660-1900
>
> ------------------------------------------------------------------------
> /Rights that do not flow directly from duty well performed are not  
> worth having.
>   --Mohandas K. Gandhi/


Mime
View raw message