OpenJDK 64-Bit Server VM warning: You have loaded library which might have disabled stack guard

Sam  Ben picture Sam Ben · Jun 22, 2014 · Viewed 28.3k times · Source

can any one help me with this error message .

while try to compile project in eclipse using jNetpcap API

I followed all the steps mentioned on the website below ,how to setup the environment on Debian distribution

http://jnetpcap.com/compile/debian

though I still get the following error message

choosedevice ... OpenJDK 64-Bit Server VM warning: You have loaded library /usr/lib/libjnetpcap.so.1.3.b0003 which might have disabled stack guard. The VM will try to fix the stack guard now. It's highly recommended that you fix the library with 'execstack -c ', or link it with '-z noexecstack'. Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/libjnetpcap.so.1.3.b0003: /usr/lib/libjnetpcap.so.1.3.b0003: mauvaise classe ELF : ELFCLASS32 (Possible cause: architecture word width mismatch) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1880) at java.lang.Runtime.loadLibrary0(Runtime.java:849) at java.lang.System.loadLibrary(System.java:1088) at org.jnetpcap.Pcap.(Unknown Source) at main.Main_app.choosedevice(Main_app.java:74) at main.Main_app.main(Main_app.java:273)

By the way I tried to execute " execstac -c " it doesn't work at all Also I spent days trying to figure out the solution , the only conclusion i come up with so far , is i need to use libjnetpcap.so (64 bit) since i have 64 bit architecture on my Debian . so is that what i need to do ?

PS : I can't find any ".deb" to install this library for 64 bit.

Answer

rubo77 picture rubo77 · Sep 10, 2020

What does the file /usr/lib/libjnetpcap.so.1.3.b0003 contain?

If the file is a 0-byte-file, there is something really wrong, so try to repair your system by reinstalling that library.

I had the same problem in smartgit, where a library in the local config folder was used, which was somehow corrupted and was a 0 byte file. So deleting the config folder and restarting the app worked for me. This could be a solution here too.