Lynn Avants wrote:
> OK, the program is looking for the *SQL.so files in /usr/lib/ulogd.
> The "missing" *SQL.so files are found by hand in the /usr/lib/ulogd
> directory. Right?
>

Right.

>... OR the program is
> actually looking for those shared libraries elsewhere. (hard-coded in the
> binary) Third option, you think they're there but they're not (unlikely ;-).
>

*SQL.so and the other libraries are plugins and their location is
specified in ulogd.conf so I can put them in /usr/lib/ulogd or
elsewhere. It's a function in ulogd.c which load these plugins:

/* plugin loader to dlopen() a plugins */
static int load_plugin(char *file)
{
if (!dlopen(file, RTLD_NOW)) {
ulogd_log(ULOGD_ERROR, "load_plugins: %s - %s\n", file, dlerror());
return 1;
}
ulogd_log(ULOGD_ERROR, "** LOADED PLUGIN: %s - %s\n", file, dlerror());
return 0;
}

> I can't attempt it myself, since I don't have a machine (yet) running uClibc,
> but I think these are the feasible options for the error. I may be able to
> help more with a more verbatose logging of the error sequence and the
> output of 'ls -al /usr/lib/ulogd/'.

[root@ ulogd-0.98.bering]# ls -al /usr/lib/ulogd/
total 296
drwxr-xr-x 2 root root 4096 Feb 7 08:45 .
drwxr-xr-x 134 root root 69632 Feb 6 15:12 ..
-rwxr-xr-x 1 root root 45576 Feb 7 08:44 ulogd_BASE.so
-rwxr-xr-x 1 root root 46090 Feb 7 08:44 ulogd_LOGEMU.so
-rwxr-xr-x 1 root root 44518 Feb 7 08:44 ulogd_MYSQL.so
-rwxr-xr-x 1 root root 33230 Feb 7 08:44 ulogd_OPRINT.so
-rwxr-xr-x 1 root root 42300 Feb 7 08:44 ulogd_PGSQL.so

---------------------------------------

[root@ ulogd-0.98.bering]# ls -al ulogd
-rwxr-xr-x 1 root root 65645 Feb 7 08:44 ulogd

---------------------------------------

[root@lwd ulogd-0.98.bering]# which gcc
/usr/i386-linux-uclibc/usr/bin/gcc
[root@lwd ulogd-0.98.bering]# which ldd
/usr/i386-linux-uclibc/usr/bin/ldd

---------------------------------------

[root@lwd ulogd-0.98.bering]# ldd ulogd
libdl.so.0 => /usr/i386-linux-uclibc/lib/libdl.so.0
libc.so.0 => /usr/i386-linux-uclibc/lib/libc.so.0
/usr/i386-linux-uclibc/lib/ld-uClibc.so.0 =>
/usr/i386-linux-uclibc/lib/ld-uClibc.so.0

---------------------------------------

Compilation output:

[root@ ulogd-0.98.bering]# ./ulogd.mk
./configure --prefix=/usr --sysconfdir=/etc --with-pgsql --with-mysql
creating cache ./config.cache
checking whether make sets ${MAKE}... yes
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 for a BSD compatible install... /usr/bin/install -c
checking for dlopen in -ldl... yes
checking how to run the C preprocessor... gcc -E
checking for pcap.h... no
checking for dirent.h that defines DIR... yes
checking for opendir in -ldir... no
checking for ANSI C header files... yes
checking for fcntl.h... yes
checking for unistd.h... yes
checking for working const... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for vprintf... yes
checking for socket... yes
checking for strerror... yes
checking for MySQL files... found mysql in /usr
checking for mysql_real_escape_string support... found new MySQL
checking for PGSQL files... found pgsql in /usr
updating cache ./config.cache
creating ./config.status
creating extensions/Makefile
creating doc/Makefile
creating conffile/Makefile
creating libipulog/Makefile
creating mysql/Makefile
creating pgsql/Makefile
creating pcap/Makefile
creating Makefile
creating Rules.make
touch configure-stamp
/usr/bin/make
make[1]: Entering directory `/tmp/ulogd-0.98.bering'
make[2]: Entering directory `/tmp/ulogd-0.98.bering/conffile'
gcc -g -O2 -DULOGD_CONFIGFILE=\"/etc/ulogd.conf\"
-I/usr/src/linux-2.4.20/include -c conffile.c -o conffile.o
make[2]: Leaving directory `/tmp/ulogd-0.98.bering/conffile'
make[2]: Entering directory `/tmp/ulogd-0.98.bering/libipulog'
gcc -g -O2 -DULOGD_CONFIGFILE=\"/etc/ulogd.conf\"
-I/usr/src/linux-2.4.20/include -Iinclude
-I/usr/src/linux-2.4.20/include -c libipulog.c -o libipulog.o
ld -i libipulog.o -o libipulog.a
make[2]: Leaving directory `/tmp/ulogd-0.98.bering/libipulog'
make[2]: Entering directory `/tmp/ulogd-0.98.bering/extensions'
gcc -g -O2 -DULOGD_CONFIGFILE=\"/etc/ulogd.conf\"
-I/usr/src/linux-2.4.20/include -I.. -I../libipulog/include
-I../conffile -fPIC -o ulogd_BASE_sh.o -c ulogd_BASE.c
ulogd_BASE.c:387: warning: initialization from incompatible pointer type
ulogd_BASE.c:388: warning: initialization from incompatible pointer type
ulogd_BASE.c:389: warning: initialization from incompatible pointer type
ulogd_BASE.c:390: warning: initialization from incompatible pointer type
ulogd_BASE.c:391: warning: initialization from incompatible pointer type
ulogd_BASE.c:392: warning: initialization from incompatible pointer type
ulogd_BASE.c:393: warning: initialization from incompatible pointer type
ld -shared -o ulogd_BASE.so ulogd_BASE_sh.o
gcc -g -O2 -DULOGD_CONFIGFILE=\"/etc/ulogd.conf\"
-I/usr/src/linux-2.4.20/include -I.. -I../libipulog/include
-I../conffile -fPIC -o ulogd_OPRINT_sh.o -c ulogd_OPRINT.c
ulogd_OPRINT.c:106: warning: initialization from incompatible pointer type
ld -shared -o ulogd_OPRINT.so ulogd_OPRINT_sh.o
gcc -g -O2 -DULOGD_CONFIGFILE=\"/etc/ulogd.conf\"
-I/usr/src/linux-2.4.20/include -I.. -I../libipulog/include
-I../conffile -fPIC -o ulogd_PWSNIFF_sh.o -c ulogd_PWSNIFF.c
ulogd_PWSNIFF.c:139: warning: initialization from incompatible pointer
type
ld -shared -o ulogd_PWSNIFF.so ulogd_PWSNIFF_sh.o
gcc -g -O2 -DULOGD_CONFIGFILE=\"/etc/ulogd.conf\"
-I/usr/src/linux-2.4.20/include -I.. -I../libipulog/include
-I../conffile -fPIC -o ulogd_LOGEMU_sh.o -c ulogd_LOGEMU.c
ulogd_LOGEMU.c:285: warning: initialization from incompatible pointer type
ld -shared -o ulogd_LOGEMU.so ulogd_LOGEMU_sh.o
gcc -g -O2 -DULOGD_CONFIGFILE=\"/etc/ulogd.conf\"
-I/usr/src/linux-2.4.20/include -I.. -I../libipulog/include
-I../conffile -fPIC -o ulogd_LOCALTIME_sh.o -c ulogd_LOCALTIME.c
ulogd_LOCALTIME.c:59: warning: initialization from incompatible
pointer type
ld -shared -o ulogd_LOCALTIME.so ulogd_LOCALTIME_sh.o
make[2]: Leaving directory `/tmp/ulogd-0.98.bering/extensions'
make[2]: Entering directory `/tmp/ulogd-0.98.bering/doc'
make[2]: Nothing to be done for `user_calls_make'.
make[2]: Leaving directory `/tmp/ulogd-0.98.bering/doc'
make[2]: Entering directory `/tmp/ulogd-0.98.bering/mysql'
gcc -I/usr/include/mysql -g -O2
-DULOGD_CONFIGFILE=\"/etc/ulogd.conf\" -I/usr/src/linux-2.4.20/include
-I.. -I../libipulog/include -I../conffile -fPIC -o ulogd_MYSQL_sh.o -c
ulogd_MYSQL.c
ld -shared -L/usr/lib/mysql -L/usr/lib -o ulogd_MYSQL.so
ulogd_MYSQL_sh.o
make[2]: Leaving directory `/tmp/ulogd-0.98.bering/mysql'
make[2]: Entering directory `/tmp/ulogd-0.98.bering/pgsql'
gcc -I/usr/local/pgsql/include -g -O2
-DULOGD_CONFIGFILE=\"/etc/ulogd.conf\" -I/usr/src/linux-2.4.20/include
-I.. -I../libipulog/include -I../conffile -fPIC -o ulogd_PGSQL_sh.o -c
ulogd_PGSQL.c
ld -shared /usr/local/pgsql/lib/libpq.so -o ulogd_PGSQL.so
ulogd_PGSQL_sh.o
make[2]: Leaving directory `/tmp/ulogd-0.98.bering/pgsql'
gcc -g -O2 -DULOGD_CONFIGFILE=\"/etc/ulogd.conf\"
-I/usr/src/linux-2.4.20/include -I./libipulog/include -I./conffile
-rdynamic -ldl ulogd.c conffile/conffile.o ./libipulog/libipulog.a -o
ulogd
make[1]: Leaving directory `/tmp/ulogd-0.98.bering'
touch build-stamp

---------------------------------------

The console output of ./ulogd -d &

[root@lwd ulogd-0.98.bering]# Fri Feb 7 11:01:49 2003 <3> ulogd.c:289
registering interpreter `raw'
Fri Feb 7 11:01:49 2003 <3> ulogd.c:289 registering interpreter `oob'
Fri Feb 7 11:01:49 2003 <3> ulogd.c:289 registering interpreter `ip'
Fri Feb 7 11:01:49 2003 <3> ulogd.c:289 registering interpreter `tcp'
Fri Feb 7 11:01:49 2003 <3> ulogd.c:289 registering interpreter `icmp'
Fri Feb 7 11:01:49 2003 <3> ulogd.c:289 registering interpreter `udp'
Fri Feb 7 11:01:49 2003 <3> ulogd.c:289 registering interpreter `ahesp'
Fri Feb 7 11:01:49 2003 <7> ulogd.c:452 ** LOADED PLUGIN:
/usr/lib/ulogd/ulogd_BASE.so - (null)

./ulogd: symbol 'mysql_real_escape_string': can't resolve symbol 'D''

./ulogd: symbol 'mysql_connect': can't resolve symbol 'H''

./ulogd: symbol 'mysql_list_fields': can't resolve symbol 'X''

./ulogd: symbol 'mysql_select_db': can't resolve symbol '\''

./ulogd: symbol 'mysql_real_query': can't resolve symbol 'l''

./ulogd: symbol 'mysql_error': can't resolve symbol 'p''

./ulogd: symbol 'mysql_fetch_field': can't resolve symbol '|''

./ulogd: symbol 'mysql_free_result': can't resolve symbol '''
Fri Feb 7 11:01:49 2003 <7> ulogd.c:449 load_plugins:
/usr/lib/ulogd/ulogd_MYSQL.so - Unable to resolve symbol

[1]+ Segmentation fault ./ulogd -d

---------------------------------------

And the log output:

[root@ ulogd-0.98.bering]# cat /var/log/ulog/ulogd.log
Fri Feb 7 11:01:49 2003 <3> ulogd.c:469 ulogd Version 0.98 starting
Fri Feb 7 11:01:49 2003 <7> ulogd.c:452 ** LOADED PLUGIN:
/usr/lib/ulogd/ulogd_BASE.so - (null)

I think it's a mismatch library usage, I mean ulogd and extensions are
compiled against uClibc but mysql and pgsql libraries are compiled
against glibc.

Thank you for help,
lwd.




-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
------------------------------------------------------------------------
leaf-user mailing list: [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user
SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html

Reply via email to