mugurelspineci / hackerskeyboard

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

Support 64bit platforms such as arm64-v8a #468

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
ndk-build jni files with android-ndk-r10d on MacPro 10.10.
with APP_ABI := all,but [arm64-v8a] complains error:
chackerskeyboard/java/jni/jni/org_pocketworkstation_pckeyboard_BinaryDictionary.
cpp:53:19: error: cast from 'latinime::Dictionary*' to 'jint {aka int}' loses 
precision [-fpermissive]
     return (jint) dictionary;

seems to cast 64bit pointer to 32bit pointer.

Original issue reported on code.google.com by ggso...@gmail.com on 10 Apr 2015 at 6:58

GoogleCodeExporter commented 9 years ago
I also encountered this problem when I tried to build the native code. I'm 
using Eclipse Juno and android-ndk-r10e on a Windows 7 (64 bit) machine. 

Original comment by keishik...@gmail.com on 8 Jun 2015 at 6:06

Attachments:

GoogleCodeExporter commented 9 years ago
Indeed, the code assumes 32bit pointers.

I've just submitted an untested patch that attempts to fix this by upgrading 
the opaque pointer type to "long", can you give this a try and let me know if 
it works?

https://code.google.com/p/hackerskeyboard/source/detail?r=3c2bd051b2c8ff5e3dc126
b487216a1bb336a72d

Original comment by Klaus.We...@gmail.com on 9 Jun 2015 at 6:08

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thanks for the speedy reply.

Yep that worked. I no longer have errors during build.  However, suggested 
words are still not displaying. In the version I downloaded from the PlayStore, 
HK pops up suggested words when I start typing. It doesn't happen with my 
built-from-source HK. Thanks in advance.

Original comment by keishik...@gmail.com on 10 Jun 2015 at 2:58

Attachments:

GoogleCodeExporter commented 9 years ago
Can you check if it logs any warnings on startup, i.e. via "adb logcat"? It 
should log "loaded jni_pckeyboard" and "Loaded dictionary, len=..." on success.

Original comment by Klaus.We...@gmail.com on 10 Jun 2015 at 6:07

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
There's "loaded jni_pckeyboard" but there's no "Loaded dictionary, len=..." No 
warnings.

Original comment by keishik...@gmail.com on 11 Jun 2015 at 6:17