devshift / jnativehook

Automatically exported from code.google.com/p/jnativehook
0 stars 0 forks source link

java.lang.UnsatisfiedLinkError raised on running NativeHookDemo #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Build using ant gives error message "-mtune=x86-64 is deprecated.  Use 
-mtune=k8 or -mtune=generic instead as appropriate."
2. Resolve (1) by editing build.properties to either i) remove Werror flag, ii) 
change mtune value to "k8" or "generic" 
3. Build successful
4. Run NativeHookDemo

(alternatively, use the pre-built binary)

What is the expected output? What do you see instead?

On running NativeHookDemo, the following error is raised:

Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: 
org.jnativehook.GlobalScreen.registerNativeHook()V

(stack trace attached)

What version of the product are you using? On what operating system?

Software version:  JNativeHook-1.1.0_beta1
Platform: Macbook Pro, (15-inch, Mid 2010 model)
OS: OS X 10.7.3

Please provide any additional information below.
GCC: i686-apple-darwin11-llvm-gcc-4.2
Java: 1.6.0_31-b04

Original issue reported on code.google.com by acey...@gmail.com on 22 Mar 2012 at 11:10

Attachments:

GoogleCodeExporter commented 9 years ago
The arch issue should be solved in the trunk.  If you don't mind can you test 
it and make sure it compiles for you.  I suspect the exception maybe caused by 
the cross-compiler.

Original comment by alex%1st...@gtempaccount.com on 22 Mar 2012 at 10:02

GoogleCodeExporter commented 9 years ago
I checked out the trunk. The build now raises the following error:

     [echo] Applying gcc on the following files: common/NativeErrors.c;common/NativeGlobals.c;common/org_jnativehook_GlobalScreen.c;osx/JConvertFromNative.c;osx/NativeHelpers.c;osx/NativeThread.c;osx/OSXButtonCodes.c
    [apply] llvm-gcc-4.2: Invalid arch name : k8

BUILD FAILED
/Users/graeme/Documents/workspace/zz_ky/build.xml:695: apply returned: 1

Original comment by acey...@gmail.com on 22 Mar 2012 at 10:13

GoogleCodeExporter commented 9 years ago
Ok updated again.  I tested building on ppc and i386 on OS X (10.5 & 10.6) and 
they appear to compile and run correctly.  I am using the regular gcc toolchain 
(i686-apple-darwin10-gcc-4.2.1) not llvm-gcc and I am not sure if llvm will 
work.  Give it another try if you have time and let me know what happens.

As far as the java.lang.UnsatisfiedLinkError, I am having similar problems on 
ppc with the cross-compiled binaries.  If you can get it to compile from trunk 
and the error continues try adding the ant flag -Dproject.debug=true and run 
the jar from the console.  If the locally built copy works for you just let me 
know.

Thanks

Original comment by alex%1st...@gtempaccount.com on 23 Mar 2012 at 12:02

GoogleCodeExporter commented 9 years ago
There is a problem with the unpacker on OS X.  I should have a fix out tonight 
or tomorrow. 

Original comment by heispsyc...@gmail.com on 23 Mar 2012 at 1:21

GoogleCodeExporter commented 9 years ago
I checked out revision 500. Everything now compiles and the demo runs without 
error.  I've successfully used both llvm-gcc and darwin10-gcc-4.2.1 to compile.

Thanks for fixing the bug so quickly!  

Original comment by acey...@gmail.com on 23 Mar 2012 at 8:25

GoogleCodeExporter commented 9 years ago

Original comment by alex%1st...@gtempaccount.com on 1 Apr 2012 at 4:54