Project

General

Profile

[Solved] Trying using the glib for the hashtable

Added by matdakillah almost 15 years ago

Hi,

I try to use the glib librarie in mod_accesslog.c with the version 1.4.19-5 on a Debian Lenny.

I can compile and link but when I start lighttpd I got this error message:

(plugin.c.165) dlopen() failed for: /usr/local/lib/mod_accesslog.so /usr/local/lib/mod_accesslog.so: undefined symbol: g_str_hash
(server.c.621) loading plugins finally failed

In the Makefile.am I append this line `pkg-config --cflags --libs glib-2.0` to use the glib but it seems to have a problem in the .so files...

I'm new using Makefile so I've probably forgotten a step...

Thx for helping me if you can.


Replies (3)

RE: Trying using the glib for the hashtable - Added by stbuehler almost 15 years ago

You have to use the link flags from pkg-config for the linker.

RE: Trying using the glib for the hashtable - Added by matdakillah almost 15 years ago

Thx for your answer but I still got the same problem. My Makefile.am in the src folder got the lines :

DEFS= DEFS -DLIBRARY_DIR="\"$(libdir)\"" -DSBIN_DIR="\"$(sbindir)\"" `pkg-config --cflags glib-2.0`

lighttpd_SOURCES = $(src)
lighttpd_LDADD = $(PCRE_LIB) $(DL_LIB) $(SENDFILE_LIB) $(ATTR_LIB) $(common_libadd) $(SSL_LIB) $(FAM_LIBS)
lighttpd_LDFLAGS = -export-dynamic -lglib-2.0
lighttpd_CCPFLAGS = $(FAM_CFLAGS)

The BOLD part are what I have happend in the Makefile.am, but it still doesn't work. I always got this:

(plugin.c.165) dlopen() failed for: /usr/local/lib/mod_accesslog.so /usr/local/lib/mod_accesslog.so: undefined symbol: g_str_hash
(server.c.621) loading plugins finally failed

I don't know if I've link well but it have been token because it appear when I do a make...

RE: Trying using the glib for the hashtable - Added by matdakillah almost 15 years ago

I've fixed my problem thx stbuehler.

    (1-3/3)