Build apitrace failed for Android X86_64
Wang, Gary C
gary.c.wang at intel.com
Tue Mar 21 10:22:03 UTC 2017
Dear Tapani,
I appreciate you guiding!
I use NDK 14.0.3770861 with following android.toolchain.cmake, curl -s -O https://raw.githubusercontent.com/taka-no-me/android-cmake/556cc14296c226f753a3778d99d8b60778b7df4f/android.toolchain.cmake
For Android.mk modified according to your guiding, but I have no idea still saw error 'error: '__NDK_FPABI__' does not name a type',
diff --git a/Android.mk b/Android.mk
index ccc1859b6081..1e6cde9b8fe4 100644
--- a/Android.mk
+++ b/Android.mk
@@ -17,13 +17,7 @@ $(shell echo "CMake present but NDK not found at $(abspath $(NDK)), will not com else # NDK $(shell echo "CMake and NDK ($(abspath $(NDK))) found, will compile apitrace" >&2)
-ifeq ($(TARGET_ARCH),arm)
-TOOLCHAIN := arm-linux-androideabi-4.4.x -endif
-
-ifeq ($(TARGET_ARCH),x86)
-TOOLCHAIN := i686-android-linux-4.4.3
-endif
+TOOLCHAIN := x86_64-4.9
LOCAL_PATH := $(call my-dir)
@@ -67,8 +61,8 @@ apitrace_private_target: android.toolchain.cmake
cd $(MY_APITRACE_ROOT) && \
cmake \
-DCMAKE_TOOLCHAIN_FILE=android.toolchain.cmake \
- -DANDROID_NDK=../../$(NDK) \
- -DANDROID_NDK_LAYOUT=LINARO \
+ -DANDROID_NDK=/home/garywang/work/android-ndk-linux \
+ -DANDROID_NDK_LAYOUT=RELEASE \
-DANDROID_TOOLCHAIN_NAME=$(TOOLCHAIN) \
-DANDROID_API_LEVEL=21 \
-DANDROID_NO_UNDEFINED=OFF \
cmake -H. -Bbuild -DCMAKE_TOOLCHAIN_FILE=$PWD/android.toolchain.cmake -DANDROID_NDK=/home/garywang/work/android-ndk-linux -DANDROID_STL=gnustl_shared -DANDROID_SDK=/home/garywang/work/android-sdk-linux -DANDROID_API_LEVEL=21 -DANDROID_ABI=x86_64 -DENABLE_STATIC_SNAPPY=true --debug-output
Any missing thing I need to check again? Thanks!
Gary
-----Original Message-----
From: Palli, Tapani
Sent: Thursday, March 16, 2017 8:10 PM
To: Wang, Gary C <gary.c.wang at intel.com>; apitrace <apitrace at lists.freedesktop.org>
Subject: Re: Build apitrace failed for Android X86_64
On 03/16/2017 12:48 PM, Rob Clark wrote:
> +apitrace list.. I've never really built apitrace on android, but
> +others have
>
> On Wed, Mar 15, 2017 at 11:21 PM, Wang, Gary C <gary.c.wang at intel.com> wrote:
>> Hi Rob,
>>
>>
>>
>> I use the latest Android-NDK to build apitrace, but suffered error.
>> Would you mind to give some advice on it? Thanks!
>>
I've tried this briefly with fresh NDK but did not get as far as you have. Things I had to do was:
- modify Android.mk to use ANDROID_NDK_HOME instead of hardcoded NDK path (ANDROID_NDK_HOME points to $HOME/Android/Sdk/ndk-bundle)
- get android.toolchain.cmake manually instead of curling in the script
- modify Android.mk to use 'x86_64-4.9' TOOLCHAIN
but even then build fails:
"Could not find any working toolchain in the NDK. Probably your Android NDK is broken."
Do you have some modifications for Android.mk?
Thanks;
>>
>>
>> …
>>
>> /home/garywang/3t_work/apitrace/thirdparty/khronos/EGL/egl.h:288:1:
>> note: in expansion of macro 'EGLAPI'
>>
>> EGLAPI EGLBoolean EGLAPIENTRY eglDestroySync (EGLDisplay dpy, EGLSync
>> sync);
>>
>> ^
>>
>> /home/garywang/3t_work/apitrace/thirdparty/khronos/KHR/khrplatform.h:106:67:
>> error: '__NDK_FPABI__' does not name a type
>>
>> # define KHRONOS_APICALL __attribute__((visibility("default")))
>> __NDK_FPABI__
>>
>> ^
>>
>> /home/garywang/3t_work/apitrace/thirdparty/khronos/EGL/eglplatform.h:50:16:
>> note: in expansion of macro 'KHRONOS_APICALL'
>>
>> #define EGLAPI KHRONOS_APICALL
>>
>> ^
>>
>> /home/garywang/3t_work/apitrace/thirdparty/khronos/EGL/egl.h:289:1:
>> note: in expansion of macro 'EGLAPI'
>>
>> EGLAPI EGLint EGLAPIENTRY eglClientWaitSync (EGLDisplay dpy, EGLSync
>> sync, EGLint flags, EGLTime timeout);
>>
>> ^
>>
>> /home/garywang/3t_work/apitrace/thirdparty/khronos/KHR/khrplatform.h:106:67:
>> error: '__NDK_FPABI__' does not name a type
>>
>> # define KHRONOS_APICALL __attribute__((visibility("default")))
>> __NDK_FPABI__
>>
>> ^
>>
>> /home/garywang/3t_work/apitrace/thirdparty/khronos/EGL/eglplatform.h:50:16:
>> note: in expansion of macro 'KHRONOS_APICALL'
>>
>> #define EGLAPI KHRONOS_APICALL
>>
>> ^
>>
>> /home/garywang/3t_work/apitrace/thirdparty/khronos/EGL/egl.h:290:1:
>> note: in expansion of macro 'EGLAPI'
>>
>> EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttrib (EGLDisplay dpy,
>> EGLSync sync, EGLint attribute, EGLAttrib *value);
>>
>> ^
>>
>> /home/garywang/3t_work/apitrace/thirdparty/khronos/KHR/khrplatform.h:106:67:
>> error: '__NDK_FPABI__' does not name a type
>>
>> # define KHRONOS_APICALL __attribute__((visibility("default")))
>> __NDK_FPABI__
>>
>> ^
>>
>> /home/garywang/3t_work/apitrace/thirdparty/khronos/EGL/eglplatform.h:50:16:
>> note: in expansion of macro 'KHRONOS_APICALL'
>>
>> #define EGLAPI KHRONOS_APICALL
>>
>> ^
>>
>> /home/garywang/3t_work/apitrace/thirdparty/khronos/EGL/egl.h:291:1:
>> note: in expansion of macro 'EGLAPI'
>>
>> EGLAPI EGLImage EGLAPIENTRY eglCreateImage (EGLDisplay dpy,
>> EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const
>> EGLAttrib *attrib_list);
>>
>> ^
>>
>> /home/garywang/3t_work/apitrace/thirdparty/khronos/KHR/khrplatform.h:106:67:
>> error: '__NDK_FPABI__' does not name a type
>>
>> # define KHRONOS_APICALL __attribute__((visibility("default")))
>> __NDK_FPABI__
>>
>> ^
>>
>> /home/garywang/3t_work/apitrace/thirdparty/khronos/EGL/eglplatform.h:50:16:
>> note: in expansion of macro 'KHRONOS_APICALL'
>>
>> #define EGLAPI KHRONOS_APICALL
>>
>> ^
>>
>> /home/garywang/3t_work/apitrace/thirdparty/khronos/EGL/egl.h:292:1:
>> note: in expansion of macro 'EGLAPI'
>>
>> EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImage (EGLDisplay dpy,
>> EGLImage image);
>>
>> ^
>>
>> /home/garywang/3t_work/apitrace/thirdparty/khronos/KHR/khrplatform.h:106:67:
>> error: '__NDK_FPABI__' does not name a type
>>
>> # define KHRONOS_APICALL __attribute__((visibility("default")))
>> __NDK_FPABI__
>>
>> ^
>>
>> /home/garywang/3t_work/apitrace/thirdparty/khronos/EGL/eglplatform.h:50:16:
>> note: in expansion of macro 'KHRONOS_APICALL'
>>
>> #define EGLAPI KHRONOS_APICALL
>>
>> ^
>>
>> /home/garywang/3t_work/apitrace/thirdparty/khronos/EGL/egl.h:293:1:
>> note: in expansion of macro 'EGLAPI'
>>
>> EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplay (EGLenum
>> platform, void *native_display, const EGLAttrib *attrib_list);
>>
>> ^
>>
>> /home/garywang/3t_work/apitrace/thirdparty/khronos/KHR/khrplatform.h:106:67:
>> error: '__NDK_FPABI__' does not name a type
>>
>> # define KHRONOS_APICALL __attribute__((visibility("default")))
>> __NDK_FPABI__
>>
>> ^
>>
>> /home/garywang/3t_work/apitrace/thirdparty/khronos/EGL/eglplatform.h:50:16:
>> note: in expansion of macro 'KHRONOS_APICALL'
>>
>> #define EGLAPI KHRONOS_APICALL
>>
>> ^
>>
>> /home/garywang/3t_work/apitrace/thirdparty/khronos/EGL/egl.h:294:1:
>> note: in expansion of macro 'EGLAPI'
>>
>> EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface
>> (EGLDisplay dpy, EGLConfig config, void *native_window, const
>> EGLAttrib *attrib_list);
>>
>> ^
>>
>> /home/garywang/3t_work/apitrace/thirdparty/khronos/KHR/khrplatform.h:106:67:
>> error: '__NDK_FPABI__' does not name a type
>>
>> # define KHRONOS_APICALL __attribute__((visibility("default")))
>> __NDK_FPABI__
>>
>> ^
>>
>> /home/garywang/3t_work/apitrace/thirdparty/khronos/EGL/eglplatform.h:50:16:
>> note: in expansion of macro 'KHRONOS_APICALL'
>>
>> #define EGLAPI KHRONOS_APICALL
>>
>> ^
>>
>> /home/garywang/3t_work/apitrace/thirdparty/khronos/EGL/egl.h:295:1:
>> note: in expansion of macro 'EGLAPI'
>>
>> EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface
>> (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const
>> EGLAttrib *attrib_list);
>>
>> ^
>>
>> /home/garywang/3t_work/apitrace/thirdparty/khronos/KHR/khrplatform.h:106:67:
>> error: '__NDK_FPABI__' does not name a type
>>
>> # define KHRONOS_APICALL __attribute__((visibility("default")))
>> __NDK_FPABI__
>>
>> ^
>>
>> /home/garywang/3t_work/apitrace/thirdparty/khronos/EGL/eglplatform.h:50:16:
>> note: in expansion of macro 'KHRONOS_APICALL'
>>
>> #define EGLAPI KHRONOS_APICALL
>>
>> ^
>>
>> /home/garywang/3t_work/apitrace/thirdparty/khronos/EGL/egl.h:296:1:
>> note: in expansion of macro 'EGLAPI'
>>
>> EGLAPI EGLBoolean EGLAPIENTRY eglWaitSync (EGLDisplay dpy, EGLSync
>> sync, EGLint flags);
>>
>> ^
>>
>> make[2]: *** [dispatch/CMakeFiles/glproc.dir/glproc.cpp.o] Error 1
>>
>> make[2]: Leaving directory `/media/garywang/MyHD3T/mywork/apitrace/build'
>>
>> make[1]: *** [dispatch/CMakeFiles/glproc.dir/all] Error 2
>>
>> make[1]: Leaving directory `/media/garywang/MyHD3T/mywork/apitrace/build'
>>
>> make: *** [all] Error 2
>>
>> make: Leaving directory `/media/garywang/MyHD3T/mywork/apitrace/build'
>>
>> …
>>
>>
>>
>> Gary
> _______________________________________________
> apitrace mailing list
> apitrace at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/apitrace
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: android.toolchain.cmake
Type: application/octet-stream
Size: 82348 bytes
Desc: android.toolchain.cmake
URL: <https://lists.freedesktop.org/archives/apitrace/attachments/20170321/e938aa5f/attachment-0001.obj>
More information about the apitrace
mailing list