Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please fix the stack guard #63

Open
GoogleCodeExporter opened this issue Mar 28, 2015 · 1 comment
Open

Please fix the stack guard #63

GoogleCodeExporter opened this issue Mar 28, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

1. Create a simple .jar file that outputs the temperature:

public class Main {
    static final int VENDOR_ID = 3141;
    static final int PRODUCT_ID = 29697;
    static final int BUFSIZE = 2048;
    private static final long READ_UPDATE_DELAY_MS = 10;

    static {
        ClassPathLibraryLoader.loadNativeHIDLibrary();
    }

    public static void main(String[] args) {
        System.out.println("Temp");

        while(true)
        {
            readDevice();

            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            } // sleep for 10 seconds
        } 
    }
...


2. The example works on Mac OS X 10.9 from the terminal with the command:
 java -jar temper1.jar


3. On a raspberry pi with a raspbian (Debian) image i got the following error 
message:

OpenJDK Zero VM warning: You have loaded library 
/tmp/libhidapi-jni-642831176804085687937.so 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 <libfile>', 
or link it with '-z noexecstack'.
Temp
Exception in thread "main" java.lang.UnsatisfiedLinkError: 
com.codeminders.hidapi.HIDManager.init()V
    at com.codeminders.hidapi.HIDManager.init(Native Method)
    at com.codeminders.hidapi.HIDManager.<init>(HIDManager.java:53)
    at com.codeminders.hidapi.HIDManager.getInstance(HIDManager.java:121)
    at Main.main(Main.java:24)



Please, can you compile a new version of javahidapi with the described 
parameter: "-z noexecstack"


Best regards,
Andrej



Original issue reported on code.google.com by [email protected] on 8 Aug 2014 at 1:33

@jonathanstokes
Copy link

I have this problem too. Was any solution found?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants