This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM62A7: AM62 cmake error

Part Number: AM62A7

Tool/software:

Hi,

 we use AM62 SDK V09_01_00_07. And we use cross compile toolchain to build the example from docemtent, but get the error info "linux-devkit/sysroots/x86_64-arago-linux/usr/bin/cmake: No such file or directory".

our configuration is following.

main.cpp

#include <iostream>

int main()
{
    std::cout << "Hello AM62" << std::endl;
    return 0;
}

CMakeLists.txt

cmake_minimum_required(VERSION 3.0)

project(hello)

FILE(GLOB SRC_LIST
	${PROJECT_SOURCE_DIR}/src/*.cpp
)

add_executable(${PROJECT_NAME} ${SRC_LIST})

build.sh

source environment-setup-aarch64-oe-linux

cmake -DCMAKE_GENERATOR_PLATFORM=ARM64 -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$GXX ..

make

error info

ti-processor-sdk-linux-edgeai-am62axx-evm-09_01_00_07/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/cmake: No such file or directory
make: *** No targets specified and no makefile found.  Stop.

  • Hi Charles,

    I only have SDK v9.2 installed (current version) and I can see `cmake` being part of the cross-toolchain sysroot. Can you try the steps below to see if you can call `cmake` directly from the command line?

    a0797059@dasso:~/ti/ti-processor-sdk-linux-edgeai-am62axx-evm-09_02_00_05
    $ file linux-devkit/sysroots/x86_64-arago-linux/usr/bin/cmake
    linux-devkit/sysroots/x86_64-arago-linux/usr/bin/cmake: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /home/a0797059/ti/ti-processor-sdk-linux-edgeai-am62axx-evm-09_02_00_05/linux-devkit/sysroots/x86_64-arago-linux/lib/ld-linux-x86-64.so.2, BuildID[sha1]=7e06637f76a36ef9ff7552d35ae39cdfcd25e3f9, for GNU/Linux 3.2.0, stripped
    
    a0797059@dasso:~/ti/ti-processor-sdk-linux-edgeai-am62axx-evm-09_02_00_05
    $ linux-devkit/sysroots/x86_64-arago-linux/usr/bin/cmake --version
    cmake version 3.22.3
    
    CMake suite maintained and supported by Kitware (kitware.com/cmake).
    
    a0797059@dasso:~/ti/ti-processor-sdk-linux-edgeai-am62axx-evm-09_02_00_05
    $ source linux-devkit/environment-setup-aarch64-oe-linux
    
    a0797059@dasso:~/ti/ti-processor-sdk-linux-edgeai-am62axx-evm-09_02_00_05
    $ which cmake
    /home/a0797059/ti/ti-processor-sdk-linux-edgeai-am62axx-evm-09_02_00_05/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/cmake
    
    a0797059@dasso:~/ti/ti-processor-sdk-linux-edgeai-am62axx-evm-09_02_00_05
    $ cmake --version
    cmake version 3.22.3
    
    CMake suite maintained and supported by Kitware (kitware.com/cmake).

    Regards, Andreas

  • Also see related recent post here of somebody using `cmake` on AM62A7 successfully... Perhaps you can try to re-create this.

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1319426/am62a7-q1-cmake-build-error

    Regards, Andreas

  • Hi,

    We found the cause of the problem, the cross toolchain was installed on computer A. We copy the toolchain to computer B, and compile our application with the toolchain, but the link library path of cmake was the path of computer A.

  • Hi Charles,

    yes the cross-toolchain should not be moved once installed. It's always advisable to install a new copy, to make sure all path-related elements are setup correctly (actually the toolchain installers directly patch compiler binaries during installation with updated path names!).

    Thanks for sharing the solution here.

    Regards,
    Andreas

  • We are developing applications and do not want to install the entire SDK environment. Is there an installation package for cross compilation tools?

  • Hi Charles,

    sounds like you only need what's installed into <SDK_INSTALL_DIR>/linux-devkit/ which is the cross-toolchain, but in an "installer" format to setup new machines/development environments.

    If you don't want to install the entire SDK what you can do is to perform a Yocto build of the meta-toolchain-arago-tisdk target, see https://software-dl.ti.com/processor-sdk-linux/esd/AM62AX/09_02_00/exports/docs/linux/Overview_Building_the_SDK.html#build-options. This will create exactly the toolchain installer that the SDK installer executes (and then deletes) to populate <SDK_INSTALL_DIR>/linux-devkit/. This installer will be portable and can be installed on any of your development machines.

    Regards, Andreas