certego / fw1-loggrabber

FW1-Loggrabber is a command-line tool to grab logfiles from remote Checkpoint devices using OPSEC LEA (Log Export API)
GNU General Public License v2.0
52 stars 35 forks source link

Skipping incompatile libopsec.so in RHEL 6.8 #21

Closed ThreatHunterDiary closed 8 years ago

ThreatHunterDiary commented 8 years ago

I am having similar problem to #1 in RHEL 6.8.

when I run make it gives below error.

/usr/bin/gcc -m64 -g -Wall -fpic -DLINUX -DUNIXOS=1 -DDEBUG -LOPSEC_SDK/pkg_rel/lib/release.dynamic -o fw1-loggrabber thread.o queue.o fw1-loggrabber.o -lopsec -lcpprod50 -lsicauth -lskey -lfwsetdb -lndb -lsic -lcp_policy -lcpca -lckpssl -lcpcert -lcpcryptutil -lEncode -lcpprng -lProdUtils -lcpbcrypt -lcpopenssl -lAppUtils -lComUtils -lResolve -lEventUtils -lDataStruct -lOS -lpthread -lresolv -ldl -lnsl -lelf -lstdc++ -lz /usr/bin/ld: skipping incompatible OPSEC_SDK/pkg_rel/lib/release.dynamic/libopsec.so when searching for -lopsec /usr/bin/ld: cannot find -lopsec collect2: ld returned 1 exit status make: *\ [fw1-loggrabber] Error 1

adepasquale commented 8 years ago

Hello @jet1276, are you on RHEL 32bits or 64bits? What is the output of the uname -mrs command?

ThreatHunterDiary commented 8 years ago

Hi @adepasquale.

I am on 64bit and the output of the said command is Linux 2.6.32-642.el6.x86_64 x86_64

adepasquale commented 8 years ago

Thanks @jet1276, Checkpoint provides 32bit libraries only. That's why in fw1-loggrabber Makefile we have this option:

CFLAGS += -m32 -g -Wall -fpic -DLINUX -DUNIXOS=1 -DDEBUG

If you haven't changed that line in the Makefile, then I have no idea why RHEL ignores that flag and uses -m64. Let me know and I will eventually investigate.

ThreatHunterDiary commented 8 years ago

Yes I have changed flag to -m64, that is because there was some errors coming regarding 32 bit and I did not understood it.

After i changed it to 64 that error was gone and some new error came and so on. And lastly I was stuck at this error.

After you asked for this I thought I'll again change it to -m32 and show you the error was coming. So I changed it to -m32. But this time there was some new error.

So what I did is that I extracted fw1-loggrabber in a new folder and then tried to run make. But surprisingly there came the error of #1 and the error which was coming previously didn't come.

So I solved it and similar error came for all the libraries. Once I installed all the libraries and then tried make. It gave me this error:`

/usr/bin/ld: warning: libpam.so.0, needed by OPSEC_SDK/pkg_rel/lib/release.dynamic/libopsec.so, not found (try using -rpath or -rpath-link)

`

So i tried make -rpath. It gave an error like make: invalid option -- 'a' But it also generated make database.

And I successfully ran make install

Thank you so much for your help. @adepasquale

adepasquale commented 8 years ago

The libpam.so.0 error might be related to the fact that the 32-bit version of libpam is not installed.

Nice to know that you solved the issue anyway. Can we close the issue?