GithubHelp home page GithubHelp logo

Comments (7)

taka-no-me avatar taka-no-me commented on July 27, 2024

Hi, and thanks for the report!

It would be interesting to support Linaro's NDK. The toolchain file from apitrace is older than master of android-cmake and your patch can't be directly applied so I have created an alternative one: 62bcf2b

Currently two options are needed to use a git cloned NDK:

-DANDROID_NDK=$(TOPDIR)/prebuilt/ndk/android-ndk-r8 -DANDROID_NDK_LAYOUT=LINARO

I think I will do few more tweaks in this branch and then merge it to master.

from android-cmake.

vasild avatar vasild commented on July 27, 2024

Hi,

I tested the new version of the toolchain. It works, but I had to add -DANDROID_NO_UNDEFINED=OFF to the cmake command line, otherwise I get:

...
prebuilt/ndk/android-ndk-r8/../../linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: CMakeFiles/egltrace.dir/egltrace.cpp.o: in function __static_initialization_and_destruction_0(int, int):egltrace.cpp(.text._Z41__static_initialization_and_destruction_0ii+0x5fc): error: undefined reference to '__dso_handle'

Thanks!

from android-cmake.

taka-no-me avatar taka-no-me commented on July 27, 2024

"undefined __dso_handle" message usually means some problem with crt linkage..

Could you post full CMake command you used?

from android-cmake.

vasild avatar vasild commented on July 27, 2024

Here are all the commands to repro:

cd /tmp
git clone git://android.git.linaro.org/platform/prebuilt # huuuge
git clone git://github.com/apitrace/apitrace.git
cd apitrace
cmake -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/android.toolchain.cmake -DANDROID_NDK=/tmp/prebuilt/ndk/android-ndk-r8 -DANDROID_NDK_LAYOUT=LINARO -DANDROID_API_LEVEL=9 -H. -B/tmp/0
make -C /tmp/0

(cmake/toolchain/android.toolchain.cmake inside apitrace directory was just recently pulled from 62bcf2b)

One way to make that undefined reference to '__dso_handle' go away is to add -DANDROID_NO_UNDEFINED=OFF to cmake command line, another one is to include crt_whatever.o on the ld command line. A quick googling shows that this err was caused by some recent changes in Android.

from android-cmake.

taka-no-me avatar taka-no-me commented on July 27, 2024

Thanks, I'll look at it.

from android-cmake.

taka-no-me avatar taka-no-me commented on July 27, 2024

Hi, I've committed fixes for remaining problems. 07dc8e7 works for me without extra CMake flags.

from android-cmake.

vasild avatar vasild commented on July 27, 2024

Thank you!

from android-cmake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.