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

Compiling for Arm 64bit fails #2

Open
bamirzada opened this issue Nov 10, 2016 · 5 comments
Open

Compiling for Arm 64bit fails #2

bamirzada opened this issue Nov 10, 2016 · 5 comments

Comments

@bamirzada
Copy link

I tried to compile LibSerial library for arm 64 bit (APP_ABI := armeabi-v7a arm64-v8a), but got the following error below using ndk-build. Wondering if you guys know what is needed to support arm 64 bit ?

Error:
[arm64-v8a] Compile++ : serial <= serial_jni.cc

[arm64-v8a] Compile++ : serial <= jni_utility.cc

[arm64-v8a] Compile++ : serial <= jni_main.cc

[arm64-v8a] Compile++ : nativehelper <= JNIHelp.cpp

[arm64-v8a] Compile++ : nativehelper <= JniConstants.cpp

[arm64-v8a] Compile++ : nativehelper <= toStringArray.cpp

[arm64-v8a] StaticLibrary : libnativehelper.a

[arm64-v8a] Compile : serialport <= glob.c

In file included from /serial-android/serial-android/libserial/src/main/jni/libs/serialport/glob.c:83:

In file included from /serial-android/serial-android/libserial/src/main/jni/libs/serialport/include/glob.h:40:

In file included from /usr/include/sys/_types.h:33:

/usr/include/machine/_types.h:34:2: error: architecture not supported

#error architecture not supported

^

In file included from /serial-android/serial-android/libserial/src/main/jni/libs/serialport/glob.c:83:

In file included from /serial-android/serial-android/libserial/src/main/jni/libs/serialport/include/glob.h:40:

/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'

typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */

    ^

2 errors generated.

@chzhong
Copy link
Owner

chzhong commented Nov 17, 2016

Since glob is missing in NDK, we have to include the code and header in our build.
But it seemed that the code I included won't build with 64 bit versions.

@bamirzada
Copy link
Author

So, is there a solution as this will come up quite a bit as more devices move to 64bit and require 64 bit libs.

@sachins
Copy link

sachins commented Mar 31, 2017

When I replace <sys/_types.h> with <sys/types.h> in glob.h file, it compiles fine for 64-bit and all other architectures.

@Windlesss
Copy link

@sachins works for me, thank you~

@nbelley
Copy link

nbelley commented Dec 17, 2020

Would anyone post the nbew .so for the other cpus?

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

No branches or pull requests

5 participants