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

Can't compile native examples. #144

Open
RobMoloney opened this issue Feb 21, 2018 · 3 comments
Open

Can't compile native examples. #144

RobMoloney opened this issue Feb 21, 2018 · 3 comments

Comments

@RobMoloney
Copy link

Need some help compiling native examples.

ARWrapperNativeCarsExample.cpp:119: error: undefined reference to 'glStateCacheFlush'

robert@robert-VirtualBox:~/dev/artoolkit5/android$ ./build_native_examples.sh
Working from directory "/home/robert/dev/artoolkit5".
Building on Linux (x86_64)
from /home/robert/dev/artoolkit5: going to AndroidStudioProjects/ARSimpleNativeCarsProj/aRSimpleNativeCars
Android NDK: WARNING: APP_PLATFORM android-15 is higher than android:minSdkVersion 1 in ./AndroidManifest.xml. NDK binaries will not be comptible with devices older than android-15. See https://android.googlesource.com/platform/ndk/+/master/docs/user/common_problems.md for more information.
rm -f ./libs/arm64-v8a/* ./libs/armeabi/* ./libs/armeabi-v7a/* ./libs/mips/* ./libs/mips64/* ./libs/x86/* ./libs/x86_64/*
rm -f ./libs/arm64-v8a/gdbserver ./libs/armeabi/gdbserver ./libs/armeabi-v7a/gdbserver ./libs/mips/gdbserver ./libs/mips64/gdbserver ./libs/x86/gdbserver ./libs/x86_64/gdbserver
rm -f ./libs/arm64-v8a/gdb.setup ./libs/armeabi/gdb.setup ./libs/armeabi-v7a/gdb.setup ./libs/mips/gdb.setup ./libs/mips64/gdb.setup ./libs/x86/gdb.setup ./libs/x86_64/gdb.setup
[armeabi-v7a] Gdbserver : [arm-linux-androideabi] libs/armeabi-v7a/gdbserver
install -p /home/robert/Android/Sdk/ndk-bundle/prebuilt/android-arm/gdbserver/gdbserver ./libs/armeabi-v7a/gdbserver
[armeabi-v7a] Gdbsetup : libs/armeabi-v7a/gdb.setup
echo "set solib-search-path ./obj/local/armeabi-v7a" > ./libs/armeabi-v7a/gdb.setup
echo "directory /home/robert/Android/Sdk/ndk-bundle/sysroot jni/../../../../../../android/libs/armeabi-v7a jni/../../../../../../android/../include/android /home/robert/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include /home/robert/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/../llvm-libc++abi/include /home/robert/Android/Sdk/ndk-bundle/sources/android/support/include /home/robert/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++abi jni/../../../../../../android/jni/curl/libs/armeabi-v7a jni/../../../../../../android/obj/local/armeabi-v7a" >> ./libs/armeabi-v7a/gdb.setup
[x86] Gdbserver : [i686-linux-android] libs/x86/gdbserver
install -p /home/robert/Android/Sdk/ndk-bundle/prebuilt/android-x86/gdbserver/gdbserver ./libs/x86/gdbserver
[x86] Gdbsetup : libs/x86/gdb.setup
echo "set solib-search-path ./obj/local/x86" > ./libs/x86/gdb.setup
echo "directory /home/robert/Android/Sdk/ndk-bundle/sysroot jni/../../../../../../android/libs/x86 jni/../../../../../../android/../include/android /home/robert/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include /home/robert/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/../llvm-libc++abi/include /home/robert/Android/Sdk/ndk-bundle/sources/android/support/include /home/robert/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++abi jni/../../../../../../android/jni/curl/libs/x86 jni/../../../../../../android/obj/local/x86" >> ./libs/x86/gdb.setup
[armeabi-v7a] Prebuilt : libARWrapper.so <= jni/../../../../../../android/libs/armeabi-v7a/
cp -f jni/../../../../../../android/libs/armeabi-v7a/libARWrapper.so obj/local/armeabi-v7a/libARWrapper.so
[armeabi-v7a] Install : libARWrapper.so => libs/armeabi-v7a/libARWrapper.so
install -p ./obj/local/armeabi-v7a/libARWrapper.so ./libs/armeabi-v7a/libARWrapper.so
/home/robert/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip --strip-unneeded ./libs/armeabi-v7a/libARWrapper.so
[armeabi-v7a] SharedLibrary : libARWrapperNativeCarsExample.so
/home/robert/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -Wl,-soname,libARWrapperNativeCarsExample.so -shared --sysroot=/home/robert/Android/Sdk/ndk-bundle/platforms/android-15/arch-arm ./obj/local/armeabi-v7a/objs/ARWrapperNativeCarsExample/ARWrapperNativeCarsExample.o jni/../../../../../../android/obj/local/armeabi-v7a/libeden.a /home/robert/Android/Sdk/ndk-bundle/sources/android/support/../../cxx-stl/llvm-libc++/libs/armeabi-v7a/libandroid_support.a /home/robert/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libunwind.a -latomic -Wl,--exclude-libs,libatomic.a ./obj/local/armeabi-v7a/libARWrapper.so ./obj/local/armeabi-v7a/libc++_shared.so -gcc-toolchain /home/robert/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 -no-canonical-prefixes -target armv7-none-linux-androideabi15 -Wl,--fix-cortex-a8 -Wl,--exclude-libs,libunwind.a -Wl,--build-id -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--warn-shared-textrel -Wl,--fatal-warnings -L/home/robert/Android/Sdk/ndk-bundle/platforms/android-15/arch-arm/usr/lib -llog -lGLESv1_CM -lc -lm -o ./obj/local/armeabi-v7a/libARWrapperNativeCarsExample.so
jni/ARWrapperNativeCarsExample.cpp:119: error: undefined reference to 'glStateCacheFlush'
jni/ARWrapperNativeCarsExample.cpp:144: error: undefined reference to 'glStateCacheEnableDepthTest'
jni/ARWrapperNativeCarsExample.cpp:145: error: undefined reference to 'glStateCacheEnableLighting'
jni/../../lib/SRC/Eden/glm.c:2580: error: undefined reference to 'glStateCacheBlendFunc'
jni/../../lib/SRC/Eden/glm.c:2581: error: undefined reference to 'glStateCacheEnableBlend'
jni/../../lib/SRC/Eden/glm.c:2578: error: undefined reference to 'glStateCacheDisableBlend'
jni/../../lib/SRC/Eden/glm.c:2588: error: undefined reference to 'glStateCacheEnableClientStateVertexArray'
jni/../../lib/SRC/Eden/glm.c:2591: error: undefined reference to 'glStateCacheEnableClientStateNormalArray'
jni/../../lib/SRC/Eden/glm.c:2593: error: undefined reference to 'glStateCacheDisableClientStateNormalArray'
jni/../../lib/SRC/Eden/glm.c:2595: error: undefined reference to 'glStateCacheClientActiveTexture'
jni/../../lib/SRC/Eden/glm.c:2598: error: undefined reference to 'glStateCacheEnableClientStateTexCoordArray'
jni/../../lib/SRC/Eden/glm.c:2600: error: undefined reference to 'glStateCacheDisableClientStateTexCoordArray'
jni/../../lib/SRC/Eden/glm.c:2614: error: undefined reference to 'glStateCacheActiveTexture'
jni/../../lib/SRC/Eden/glm.c:2618: error: undefined reference to 'glStateCacheEnableTex2D'
jni/../../lib/SRC/Eden/glm.c:2618: error: undefined reference to 'glStateCacheDisableTex2D'
jni/../../lib/SRC/Eden/EdenSurfaces.c:132: error: undefined reference to 'glStateCachePixelStoreUnpackAlignment'
jni/../../lib/SRC/Eden/EdenSurfaces.c:178: error: undefined reference to 'glStateCacheActiveTexture'
jni/../../lib/SRC/Eden/EdenSurfaces.c:179: error: undefined reference to 'glStateCacheBindTexture2D'
jni/../../lib/SRC/Eden/EdenSurfaces.c:316: error: undefined reference to 'glStateCacheActiveTexture'
jni/../../lib/SRC/Eden/EdenSurfaces.c:317: error: undefined reference to 'glStateCacheBindTexture2D'
jni/../../lib/SRC/Eden/EdenSurfaces.c:318: error: undefined reference to 'glStateCacheTexEnvMode'
jni/../../lib/SRC/Eden/EdenSurfaces.c:330: error: undefined reference to 'glStateCacheActiveTexture'
jni/../../lib/SRC/Eden/EdenSurfaces.c:331: error: undefined reference to 'glStateCacheBindTexture2D'
jni/../../lib/SRC/Eden/EdenSurfaces.c:393: error: undefined reference to 'glStateCacheEnableClientStateVertexArray'
jni/../../lib/SRC/Eden/EdenSurfaces.c:395: error: undefined reference to 'glStateCacheEnableClientStateNormalArray'
jni/../../lib/SRC/Eden/EdenSurfaces.c:396: error: undefined reference to 'glStateCacheClientActiveTexture'
jni/../../lib/SRC/Eden/EdenSurfaces.c:398: error: undefined reference to 'glStateCacheEnableClientStateTexCoordArray'
jni/../../lib/SRC/Eden/EdenSurfaces.c:400: error: undefined reference to 'glStateCacheBindTexture2D'
jni/../../lib/SRC/Eden/EdenSurfaces.c:401: error: undefined reference to 'glStateCacheTexEnvMode'
jni/../../lib/SRC/Eden/EdenSurfaces.c:402: error: undefined reference to 'glStateCacheEnableTex2D'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [obj/local/armeabi-v7a/libARWrapperNativeCarsExample.so] Error 1

@RobMoloney
Copy link
Author

Just noticed that there is no rule to build glStateCache.c and glStateCache2.c in lib/SRC/GL/Makefile
What can I do to fix this?

@RobMoloney
Copy link
Author

fyi argsub_es missing from mk file for native cars example. Now I'm getting errors undefined reference tcgetattr and tcsetattr. Any idea what lib I should be including for these methods?

@lumtwj
Copy link

lumtwj commented Mar 20, 2018

Any chances for the native examples to be fixed in the near future?

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

2 participants