Hi, Guys,
I compiled a shared object using mali GPU. But when linking it to produce an application I got an error:.../libGLES_mali.so:unknown CPU architecture.The CFLAGES is -mcpu=cortex-a15 -O2.
What's wrong? I need some help.
Best Regards!
That normally happens if your build is picking up host GCC rather than a cross-compiled version one part of the build (i.e. building an ARM library and trying to link with x86 tools, or visa-versa).
It is possible to share a small reproducer? It's hard to provide more specific help without seeing your whole build sequence.
Thanks,
Pete
I have built a binary that links against libGLES_mail. I compiled it on Intel Core(TM) platform to run it on the ARM and the toolchain was a corss-platform version (android-ndk-r10c/toolchains/arm-linux-androideabi-4.9/prebuilt/windows/bin/arm-linux-androideabi-gcc-4.9). The libGLES_mail.so I got is from a device with platform mt6752.
In addtion, today I exchanged the gcc version to an x64 version (android-ndk-r10c/toolchains/aarch64-linux-android-4.9/prebuilt/windows/bin/aarch64-linux-android-gcc-4.9).The error "unknown CPU architecture" was gone instead of an "skip incompatible -lCLES_mali" error.
Hi Phenix,
Makes sense that it is imcompatible if libGLES_mali.so is built for ARM. Just need to work out why the arm-linux-androideabi compiler doesn't want to link with it
Chris
View all questions in Graphics and Gaming forum