bammv / sguil

Sguil client for NSM
GNU General Public License v3.0
213 stars 74 forks source link

sguil not usable on OpenBSD 5.9 #35

Open hostingnuggets opened 8 years ago

hostingnuggets commented 8 years ago

I am trying to install sguil from source on OpenBSD 5.9 with Tcl 8.5 and managed to install without any problems TclX 8.4 but for the mysqltcl package it simply does not want to work... When I test it from the Tcl shell I get the following error:

% package require mysqltcl
couldn't load file "/usr/local/lib/tcl/mysqltcl-3.052/libmysqltcl3052.so.1.0": Cannot load specified object

an ldd on the library file does not show any missing libraries:

/usr/local/lib/mysqltcl-3.052/libmysqltcl3052.so.1.0:
Start End Type Open Ref GrpRef Name
00001d77173b4000 00001d77177be000 dlib 2 0 0 /usr/local/lib/mysqltcl-3.052/libmysqltcl3052.so.1.0
00001d76af76e000 00001d76afed5000 rlib 0 1 0 /usr/local/lib/libmysqlclient.so.27.0
00001d7704cb0000 00001d77050c2000 rlib 0 1 0 /usr/lib/libpthread.so.20.1
00001d769ee91000 00001d769f2a6000 rlib 0 1 0 /usr/lib/libz.so.5.0
00001d774da5e000 00001d774deb8000 rlib 0 1 0 /usr/lib/libssl.so.38.0
00001d7710a74000 00001d7711043000 rlib 0 2 0 /usr/lib/libcrypto.so.37.0
00001d76b1fda000 00001d76b24f0000 rlib 0 1 0 /usr/lib/libstdc++.so.57.0
00001d7772653000 00001d7772a7b000 rlib 0 2 0 /usr/lib/libm.so.9.0

I used the following configure parameters to compile mysqltcl:

--with-tcl=/usr/local/lib/tcl/tcl8.5/ --with-mysql-include=/usr/local/include/mysql/ --with-mysql-lib=/usr/local/lib/mysql/

Unfortunately sguil requires mysqltcl and without mysqltcl working on OpenBSD it is not possible to use sguil afaik. Any workaround or ideas how I could still use sguil on OpenBSD?

SgtMalicious commented 8 years ago

Is your library path correct? Tcl is looking in /usr/local/lib/tcl/mysqltcl-3.052/ but your library is in /usr/local/lib/mysqltcl-3.052/ Notice the missing /tcl/ part in that last path.

hostingnuggets commented 8 years ago

My path is correct because the /usr/local/lib/tcl/mysqltcl-3.052 directory is actually a symbolic link to /usr/local/lib/mysqltcl-3.052 as you can see below:

ls -lad /usr/local/lib/tcl/mysqltcl-3.052
lrwxr-xr-x  1 root  wheel  30 May 15 12:45 /usr/local/lib/tcl/mysqltcl-3.052 -> /usr/local/lib/mysqltcl-3.052/

If that's of any help I have used the following guide: http://tildedennis.blogspot.ch/2012/09/squert-on-openbsd.html

bammv commented 8 years ago

Open a tcl shell and type: % load /usr/local/lib/tcl/mysqltcl-3.052/libmysqltcl3052.so.1.0

If you get an error try: % load /usr/local/lib/mysqltcl-3.052/libmysqltcl3052.so.1.0

Bamm

On Wed, Jun 1, 2016 at 4:37 PM, Hosting Nuggets notifications@github.com wrote:

My path is correct because the /usr/local/lib/tcl/mysqltcl-3.052 directory is actually a symbolic link to /usr/local/lib/mysqltcl-3.052 as you can see below:

ls -lad /usr/local/lib/tcl/mysqltcl-3.052 lrwxr-xr-x 1 root wheel 30 May 15 12:45 /usr/local/lib/tcl/mysqltcl-3.052 -> /usr/local/lib/mysqltcl-3.052/

If that's of any help I have used the following guide:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bammv/sguil/issues/35#issuecomment-223116912, or mute the thread https://github.com/notifications/unsubscribe/AFIwmGQirK4UynWGUlvhhXlo2eQBPET9ks5qHe1wgaJpZM4If-ZW .

sguil - The Analyst Console for NSM http://www.sguil.net

hostingnuggets commented 8 years ago

Unfortunately no success:

% load /usr/local/lib/tcl/mysqltcl-3.052/libmysqltcl3052.so.1.0
couldn't load file "/usr/local/lib/tcl/mysqltcl-3.052/libmysqltcl3052.so.1.0": Cannot load specified object
% load /usr/local/lib/mysqltcl-3.052/libmysqltcl3052.so.1.0
couldn't load file "/usr/local/lib/mysqltcl-3.052/libmysqltcl3052.so.1.0": Cannot load specified object

but the files are there:

$ ls -la /usr/local/lib/tcl/mysqltcl-3.052/libmysqltcl3052.so.1.0
-rwxr-xr-x  1 root  wheel  48399 Jun  2 00:33 /usr/local/lib/tcl/mysqltcl-3.052/libmysqltcl3052.so.1.0
$ ls -la /usr/local/lib/mysqltcl-3.052/libmysqltcl3052.so.1.0
-rwxr-xr-x  1 root  wheel  48399 Jun  2 00:33 /usr/local/lib/mysqltcl-3.052/libmysqltcl3052.so.1.0
bammv commented 8 years ago

And you have verified the file(s) exist and are readable?

% file exists /usr/local/lib/tcl/mysqltcl-3.052/libmysqltcl3052.so.1.0

% file readable /usr/local/lib/tcl/mysqltcl-3.052/libmysqltcl3052.so.1.0

Bamm

On Wed, Jun 1, 2016 at 5:16 PM, Hosting Nuggets notifications@github.com wrote:

Unfortunately no success:

% load /usr/local/lib/tcl/mysqltcl-3.052/libmysqltcl3052.so.1.0 couldn't load file "/usr/local/lib/tcl/mysqltcl-3.052/libmysqltcl3052.so.1.0": Cannot load specified object % load /usr/local/lib/mysqltcl-3.052/libmysqltcl3052.so.1.0 couldn't load file "/usr/local/lib/mysqltcl-3.052/libmysqltcl3052.so.1.0": Cannot load specified object

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bammv/sguil/issues/35#issuecomment-223127410, or mute the thread https://github.com/notifications/unsubscribe/AFIwmJRq9RfcxLL_QlD1yVB3Sj99gxM6ks5qHfbAgaJpZM4If-ZW .

sguil - The Analyst Console for NSM http://www.sguil.net

hostingnuggets commented 8 years ago

Yes it indeed exists and is readable, for example:

$ file /usr/local/lib/tcl/mysqltcl-3.052/libmysqltcl3052.so.1.0
/usr/local/lib/tcl/mysqltcl-3.052/libmysqltcl3052.so.1.0: ELF 64-bit LSB shared object, x86-64, version 1

I don't get it...

SgtMalicious commented 8 years ago

Did you update your linker path information? ldconfig /usr/local/lib/tcl/mysqltcl-3.052

hostingnuggets commented 8 years ago

yep did that and also rebooted a few times in the mean time, does not change anything.

bammv commented 8 years ago

You don't seem to be the only one having issues with mysqltcl on openbsd: http://comments.gmane.org/gmane.os.openbsd.tech/38662

On Wed, Jun 1, 2016 at 5:53 PM, Hosting Nuggets notifications@github.com wrote:

yep did that and also rebooted a few times in the mean time, does not change anything.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bammv/sguil/issues/35#issuecomment-223136408, or mute the thread https://github.com/notifications/unsubscribe/AFIwmFzinOjObQoBGX5K0urNaVdupfBTks5qHf9LgaJpZM4If-ZW .

sguil - The Analyst Console for NSM http://www.sguil.net

hostingnuggets commented 8 years ago

Thanks for the link, I applied the patch patches/patch-configure included in the tar.gz and recompiled but it still does not work.

hostingnuggets commented 8 years ago

I managed now to get mysqltcl 3.052 working. For that I had to use Tcl version 8.6 instead of 8.5. But now that I am using Tcl version 8.6 I have the next problem related to sguild, when running sguild I get the following error:

$ /usr/local/bin/sguild
ERROR: This version of tcl was compile with threading enabled. Sguil is NOT compatible with threading.
SGUILD: Exiting...

It looks like the OpenBSD guys compiled their tcl-8.6.4.tgz package with threading enabled... What do you suggest here?

hostingnuggets commented 8 years ago

For your information I managed to compile Tcl 8.6.4 from the ports with the --disable-threads option but then the mysqltcl library does not work anymore. I have the feeling the problem with reside somehow with having threads disabled...

hostingnuggets commented 8 years ago

Here the post of another person having exactly the same issue:

http://openbsd-archive.7691.n7.nabble.com/sguil-0-9-0-on-OpenBSD-5-6-current-td256158.html