Re: [leaf-user] Bering uClibc - ulogd: load_plugins: /usr/lib/ulogd/ulog_*.so - File not found

2003-02-07 Thread Lynn Avants
On Friday 07 February 2003 05:13 am, Laurentiu Drob wrote:

 ---

 [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



 ./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

 ---

 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.


OK, I didn't realize you were compiling this yourself I thought you were
using an available binary. Whatever you compile must have the same 
libraries that you compiled against on the box running the program.
If they are compiled against glibc, you'll have to load the same glibc
to run it.

I hope this helps,
-- 
~Lynn Avants
Linux Embedded Firewall Project developer
http://leaf.sourceforge.net


---
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



Re: [leaf-user] Bering uClibc - ulogd: load_plugins: /usr/lib/ulogd/ulog_*.so - File not found

2003-02-06 Thread Lynn Avants
On Thursday 06 February 2003 05:41 am, Laurentiu Drob wrote:
 Lynn Avants wrote:
  It sounds as if your shared libraries are compiled for a path that are
  NOT where the libraries are actually stored at on the LEAF box. This is
  likely a compile time option.

 The error message says:
 ... ulogd.c:449 load_plugins: /usr/lib/ulogd/ulogd_MYSQL.so -
 File not found
 and that's where all the plugins are: in /usr/lib/ulogd/. All
 plugins specified in ulogd.conf are loaded [BASE, LOGEMU,... those
 from ulogd-0.98/extensions directory], except MYSQL or PGSQL :( May be
 ulogd_MYSQL.so is not a shared library, although it looks like one :)
   Who knows ...

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?

That would leave the options of the permissions being non-accessable
by the program (wrong error I would think though) 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  ;-).

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/'.
-- 
~Lynn Avants
Linux Embedded Firewall Project developer
http://leaf.sourceforge.net


---
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



Re: [leaf-user] Bering uClibc - ulogd: load_plugins: /usr/lib/ulogd/ulog_*.so- File not found

2003-02-06 Thread Laurentiu Drob
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-x2 root root 4096 Feb  7 08:45 .
drwxr-xr-x  134 root root69632 Feb  6 15:12 ..
-rwxr-xr-x1 root root45576 Feb  7 08:44 ulogd_BASE.so
-rwxr-xr-x1 root root46090 Feb  7 08:44 ulogd_LOGEMU.so
-rwxr-xr-x1 root root44518 Feb  7 08:44 ulogd_MYSQL.so
-rwxr-xr-x1 root root33230 Feb  7 08:44 ulogd_OPRINT.so
-rwxr-xr-x1 root root42300 Feb  7 08:44 ulogd_PGSQL.so

---

[root@ ulogd-0.98.bering]# ls -al ulogd
-rwxr-xr-x1 root root65645 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: 

Re: [leaf-user] Bering uClibc - ulogd: load_plugins: /usr/lib/ulogd/ulog_*.so- File not found

2003-02-05 Thread Laurentiu Drob
Eric Spakman wrote:


It seems you need MySQL and PostgressSQL to compile the specific 
plugins and I have neither of them on my development machine... 
I made a new ulogd.mk and attached it, maybe you can try this one. My 
only other guess would be that configure cannot find the mysql and 
pgsql paths, you could try to set them also (but it is strange that 
it works with glibc).

I tried the new ulogd.mk but unfortunately results are almost the same 
for both MYSQL and PGSQL plugins [File not found]. The difference is 
that for pgsql I get File not found for BASE.so and PGSQL.so and for 
mysql File not found is only for MYSQL.so.


I don't know exactly how the two database 
applets interact with MySQL and Postgress.
You could also look at the config.log for errors after you build the 
sources.

config.log looks the same for uClibc and glibc. I'll try to ask the 
author of ulogd, maybe he has an idea.

Thank you very much for your 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


Re: [leaf-user] Bering uClibc - ulogd: load_plugins: /usr/lib/ulogd/ulog_*.so - File not found

2003-02-05 Thread Lynn Avants
On Wednesday 05 February 2003 11:10 am, Laurentiu Drob wrote:

 I tried the new ulogd.mk but unfortunately results are almost the same
 for both MYSQL and PGSQL plugins [File not found]. The difference is
 that for pgsql I get File not found for BASE.so and PGSQL.so and for
 mysql File not found is only for MYSQL.so.

It sounds as if your shared libraries are compiled for a path that are NOT
where the libraries are actually stored at on the LEAF box. This is likely
a compile time option.
-- 
~Lynn Avants
Linux Embedded Firewall Project developer
http://leaf.sourceforge.net


---
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



Re: [leaf-user] Bering uClibc - ulogd: load_plugins: /usr/lib/ulogd/ulog_*.so- File not found

2003-02-05 Thread Laurentiu Drob
Lynn Avants wrote:


It sounds as if your shared libraries are compiled for a path that are NOT
where the libraries are actually stored at on the LEAF box. This is likely
a compile time option.


The error message says:
   ... ulogd.c:449 load_plugins: /usr/lib/ulogd/ulogd_MYSQL.so - 
File not found
and that's where all the plugins are: in /usr/lib/ulogd/. All 
plugins specified in ulogd.conf are loaded [BASE, LOGEMU,... those 
from ulogd-0.98/extensions directory], except MYSQL or PGSQL :( May be 
ulogd_MYSQL.so is not a shared library, although it looks like one :) 
 Who knows ...

Best regards,
	   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


Re: [leaf-user] Bering uClibc - ulogd: load_plugins: /usr/lib/ulogd/ulog_*.so - File not found

2003-02-03 Thread Eric Spakman
 Hi all,
 
 I've downloaded ulogd-0.98 from CVS, applied the patch and compiled 
 for uClibc, made ulogd.lrp and reboot with the new package.
 Ulogd complains about finding plugins specified in /etc/ulogd.conf 
 [/usr/lib/ulogd/ulogd_*.so File not found] but all needed plugins are 
 fine, owned by root in /usr/lib/ulogd/ ]
 The same ulogd package built for glibc works fine :(
 If anyone has any idea ...
 
 Thanks in advance,
   lwd.
 
Laurentiu,

Did you follow the instructions in ulogd.txt and used ulogd.mk? 
(ulogd.mk changed a week ago, so maybe you must download it again) 
I know it works, just tried it myself. There is also a complete 
ulogd.lrp package compiled for uClibc in CVS.

Eric


---
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



Re: [leaf-user] Bering uClibc - ulogd: load_plugins: /usr/lib/ulogd/ulog_*.so- File not found

2003-02-03 Thread Laurentiu Drob
Eric Spakman wrote:


Laurentiu,

Did you follow the instructions in ulogd.txt and used ulogd.mk? 
(ulogd.mk changed a week ago, so maybe you must download it again) 
I know it works, just tried it myself. There is also a complete 
ulogd.lrp package compiled for uClibc in CVS.


Hi Eric,

Yes, I followed the instructions and used the new version of ulogd.mk; 
the trouble is at line 448 in ulogd.c:
if (!dlopen(file, RTLD_NOW)) {
ulogd_log(ULOGD_ERROR, load_plugins: %s - %s\n, 
file, dlerror());
  ..
I changed it to print file content and it's OK /usr/lib/ulogd/ 
...and so on. So, IMHO the problem may be dlopen() of uClibc ?...
Any suggestions?

I  did all this because I need ulogd_PGSQL plugin and I like to do 
things by myself. That's why I believe Bering is GREAT!

Thanks,
   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