[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    Re: [CMake] Trying to get android toolchain setup for Crystax
From:       Robert Dailey <rcdailey.lists () gmail ! com>
Date:       2017-03-23 20:42:16
Message-ID: CAHd499BsGw0LAHKfWpbC=mEuwG1M=+6TAqkAxp0iEekUa8BYxw () mail ! gmail ! com
[Download RAW message or body]

Sorry last email:

Assuming I get past the host tag issue, the next one is that the test
program is unable to compile because:

error: cannot find -lcrystax

Somehow, somewhere the linker is expecting this library. I do not see
it in the output from CMake when the build fails. I do know the file
is located here:

${CMAKE_ANDROID_NDK}/sources/crystax/libs/${ANDROID_ABI}

Is there a way I can add this to the linker search path from the
toolchain file? Or is there a better way?

On Thu, Mar 23, 2017 at 3:22 PM, Robert Dailey <rcdailey.lists@gmail.com> wrote:
> Update:
> 
> Using the x86_64 version of the Crystax NDK worked. Meaning, the
> directory name aligned with what CMake was expecting. However, the
> question now is: Why didn't changing
> CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG work?
> 
> On Thu, Mar 23, 2017 at 3:14 PM, Robert Dailey <rcdailey.lists@gmail.com> wrote:
> > Sorry I guess it would help if I showed where the ANDROID_ variables
> > are being defined:
> > 
> > cmake .. -G"Ninja" -DCMAKE_BUILD_TYPE="Release"
> > -DCMAKE_TOOLCHAIN_FILE="crystax.toolchain.cmake"
> > -DBUILD_TESTING=OFF     -DANDROID_API=15
> > -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.9
> > -DANDROID_ABI=armeabi-v7a     -DANDROID_TOOLCHAIN_VERSION=4.9
> > -DANDROID_STL=gnustl_static
> > 
> > On Thu, Mar 23, 2017 at 3:03 PM, Robert Dailey <rcdailey.lists@gmail.com> wrote:
> > > So I'm having no luck getting the Crystax NDK setup using built-in
> > > android support in CMake 3.8.
> > > 
> > > I have the following toolchain file:
> > > 
> > > set( CMAKE_SYSTEM_NAME Android )
> > > set( CMAKE_SYSTEM_VERSION ${ANDROID_API} )
> > > 
> > > # set( CMAKE_ANDROID_NDK $ENV{ANDROID_NDK} )
> > > set( CMAKE_ANDROID_NDK "E:/android/crystax-ndk-10.3.2-stable" )
> > > #set( CMAKE_ANDROID_API ${ANDROID_API} )
> > > set( CMAKE_ANDROID_ARCH_ABI ${ANDROID_ABI} )
> > > set( CMAKE_ANDROID_STL_TYPE ${ANDROID_STL} )
> > > set( CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION ${ANDROID_TOOLCHAIN_VERSION} )
> > > 
> > > if( CMAKE_ANDROID_ARCH_ABI MATCHES "armeabi" )
> > > set( CMAKE_ANDROID_ARM_MODE ON )
> > > set( CMAKE_ANDROID_ARM_NEON OFF )
> > > endif()
> > > 
> > > 
> > > The logs output as follows:
> > > 
> > > 
> > > -- Android: Targeting API '15' with architecture 'arm', ABI
> > > 'armeabi-v7a', and processor 'armv7-a'
> > > -- Android: Selected GCC toolchain 'arm-linux-androideabi-4.9'
> > > -- The C compiler identification is unknown
> > > -- The CXX compiler identification is unknown
> > > CMake Error at CMakeLists.txt:10 (project):
> > > The CMAKE_C_COMPILER:
> > > 
> > > E:/android/crystax-ndk-10.3.2-stable/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-gcc.exe
> > >  
> > > is not a full path to an existing compiler tool.
> > > 
> > > 
> > > The problem is the path to the toolchain it is trying to find is actually:
> > > 
> > > 
> > > "E:\android\crystax-ndk-10.3.2-stable\toolchains\arm-linux-androideabi-4.9\prebuilt\windows\bin\arm-linux-androideabi-gcc.exe"
> > >  
> > > The one difference is that the path has "windows" in it instead of
> > > "windows-x86_64". I installed the 32-bit version of Crystax NDK, not
> > > the 64 bit one (not sure if that makes a difference, but my native
> > > android code will not build with 64-bit compiler anyway).
> > > 
> > > How can I make it properly calculate the path? I tried setting this
> > > but it did not change the behavior:
> > > 
> > > set( CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG windows )
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: \
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information \
on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at \
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic