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.

J721EXCPXEVM: Failed to integrate assimpg. aarch64-none-linux-gnu/bin/ld cannot find libassimp.so.

Part Number: J721EXCPXEVM


Dear TI,
Due to suggestion from e2e.ti.com/.../j721excpxevm-tda4vm-app_srv_camera-fails-to-replace-car-model-pod.
I'm trying to integrate assimp with ti-processor-sdk-rtos-j721e-evm-09_00_00_02.

Step 1:
I first download the latest assimp-5.3.1.tar.gz.
After I decompressed it, I used the following command to compile. I don’t know if there is anything wrong. Please help me correct it.
cd /home/georgelin/ti-processor-sdk-rtos-j721e-evm-09_00_00_02_assimp_work/assimp-5.3.1
cmake.
make -C /home/georgelin/ti-processor-sdk-rtos-j721e-evm-09_00_00_02_assimp_work/assimp-5.3.1/ all TOOLS_INSTALL_PATH=/home/georgelin/ti BOARD=j721e_evm SOC=j721e CORE=mcu2_0 BUILD_PROFILE=release -s;

Then we will get
/home/georgelin/ti-processor-sdk-rtos-j721e-evm-09_00_00_02_assimp_work/assimp-5.3.1/bin/libassimp.so
/home/georgelin/ti-processor-sdk-rtos-j721e-evm-09_00_00_02_assimp_work/assimp-5.3.1/bin/libassimp.so.5
/home/georgelin/ti-processor-sdk-rtos-j721e-evm-09_00_00_02_assimp_work/assimp-5.3.1/bin/libassimp.so.5.3.0
Among them, libassimp.so and libassimp.so.5 are Symbolic links pointing to libassimp.so.5.3.0.

Step 2:
In order to compile pass, I copied a copy of /home/georgelin/ti-processor-sdk-rtos-j721e-evm-09_00_00_02_assimp_work/assimp-5.3.1/include/assimp/ to /home/georgelin/ti-processor-sdk- rtos-j721e-evm-09_00_00_02_assimp_work/vision_apps/kernels/srv/gpu/3dsrv/assimp.
Because I will modify /home/georgelin/ti-processor-sdk-rtos-j721e-evm-09_00_00_02_assimp_work/vision_apps/kernels/srv/gpu/3dsrv/car.cpp to read the glTF file in its InitView().
But link error keeps happening when compiling. as follows
make[1]: [/home/georgelin/ti-processor-sdk-rtos-j721e-evm-09_00_00_02_assimp_work/sdk_builder/concerto/finale.mak:257: /home/georgelin/ti-processor-sdk-rtos-j721e- evm-09_00_00_02_assimp_work/vision_apps/out/J721E/A72/LINUX/release/vx_app_srv_calibration.out] Error 1 (ignored)
Linking /home/georgelin/ti-processor-sdk-rtos-j721e-evm-09_00_00_02_assimp_work/vision_apps/out/J721E/A72/LINUX/release/vx_app_srv_camera.out
/home/georgelin/ti/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.3.1/.. /../../../aarch64-none-linux-gnu/bin/ld: /home/georgelin/ti-processor-sdk-rtos-j721e-evm-09_00_00_02_assimp_work/vision_apps/out/J721E/A72/LINUX /release/libtivision_apps.so: undefined reference to `aiTransformVecByMatrix4'
/home/georgelin/ti/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.3.1/.. /../../../aarch64-none-linux-gnu/bin/ld: /home/georgelin/ti-processor-sdk-rtos-j721e-evm-09_00_00_02_assimp_work/vision_apps/out/J721E/A72/LINUX /release/libtivision_apps.so: undefined reference to `aiImportFile'
/home/georgelin/ti/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.3.1/.. /../../../aarch64-none-linux-gnu/bin/ld: /home/georgelin/ti-processor-sdk-rtos-j721e-evm-09_00_00_02_assimp_work/vision_apps/out/J721E/A72/LINUX /release/libtivision_apps.so: undefined reference to `aiIdentityMatrix4'
/home/georgelin/ti/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.3.1/.. /../../../aarch64-none-linux-gnu/bin/ld: /home/georgelin/ti-processor-sdk-rtos-j721e-evm-09_00_00_02_assimp_work/vision_apps/out/J721E/A72/LINUX /release/libtivision_apps.so: undefined reference to `aiMultiplyMatrix4'
collect2: error: ld returned 1 exit status

vision_apps_log_20240122110647.zip

I tried two ways to make libassimp.so findable by ld.
1. Modify /sdk_builder/makerules/makefile_vision_apps.mak, but it has no effect.
Revise
     $(MAKE) -C $(VISION_APPS_PATH)
for
     $(MAKE) -C $(VISION_APPS_PATH) -L $(PSDK_PATH)/assimp-5.3.1/bin

2. Modify
     /vision_apps/apps/concerto_mpu_inc.mak
     /vision_apps/kernels/srv/gpu/3dsrv/concerto.mak
     /vision_apps/kernels/srv/gpu/concerto.mak
     /vision_apps/platform/j721e/rtos/concerto_a72_inc.mak
Add the following definition:
LDIRS += $(PSDK_PATH)/assimp-5.3.1/bin
It has no effect either.

So I want to ask you, how to solve this problem?

  • Hi,

    Essentially app_srv_calibration is not able to find the reference to these library functions, so can you please add library path and reference to library in the concerto.mk file in this example?

    Regards,

    Brijesh

  • Dear Brijesh,


    I modify /home/georgelin/ti-processor-sdk-rtos-j721e-evm-09_00_00_02_assimp_work/vision_apps/apps/srv_demos/app_srv_calibration/concerto.mak.
    Added 2 new lines of instructions for add library path:
    @@ -17,6 +17,9 @@ STATIC_LIBS += $(IMAGING_LIBS)
      STATIC_LIBS += $(VISION_APPS_SRV_LIBS)
      STATIC_LIBS += $(VISION_APPS_KERNELS_LIBS)
     
    +LDIRS += $(PSDK_PATH)/assimp-5.3.1/bin
    +SYS_SHARED_LIBS += assimp
    +
      ifeq ($(TARGET_OS),QNX)
      SYS_SHARED_LIBS += screen
      endif

    But I found that the new log of "make vision_apps" produced a different error log:
    /home/georgelin/ti/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.3.1/.. /../../../aarch64-none-linux-gnu/bin/ld: skipping incompatible /home/georgelin/ti-processor-sdk-rtos-j721e-evm-09_00_00_02_assimp_work/assimp-5.3.1/bin /libassimp.so when searching for -lassimp
    /home/georgelin/ti/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.3.1/.. /../../../aarch64-none-linux-gnu/bin/ld: skipping incompatible /home/georgelin/ti-processor-sdk-rtos-j721e-evm-09_00_00_02_assimp_work/targetfs//usr/lib/ libassimp.so when searching for -lassimp
    /home/georgelin/ti/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.3.1/.. /../../../aarch64-none-linux-gnu/bin/ld: skipping incompatible /home/georgelin/ti-processor-sdk-rtos-j721e-evm-09_00_00_02_assimp_work/targetfs/usr/lib/libassimp .so when searching for -lassimp
    /home/georgelin/ti/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.3.1/.. /../../../aarch64-none-linux-gnu/bin/ld: skipping incompatible /home/georgelin/ti-processor-sdk-rtos-j721e-evm-09_00_00_02_assimp_work/targetfs/usr/lib/libassimp .so when searching for -lassimp
    /home/georgelin/ti/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.3.1/.. /../../../aarch64-none-linux-gnu/bin/ld: cannot find -lassimp: No such file or directory
    /home/georgelin/ti/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.3.1/.. /../../../aarch64-none-linux-gnu/bin/ld: skipping incompatible /home/georgelin/ti-processor-sdk-rtos-j721e-evm-09_00_00_02_assimp_work/assimp-5.3.1/bin /libassimp.so when searching for -lassimp
    /home/georgelin/ti/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.3.1/.. /../../../aarch64-none-linux-gnu/bin/ld: skipping incompatible /home/georgelin/ti-processor-sdk-rtos-j721e-evm-09_00_00_02_assimp_work/targetfs//usr/lib/ libassimp.so when searching for -lassimp
    /home/georgelin/ti/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.3.1/.. /../../../aarch64-none-linux-gnu/bin/ld: skipping incompatible /home/georgelin/ti-processor-sdk-rtos-j721e-evm-09_00_00_02_assimp_work/targetfs/usr/lib/libassimp .so when searching for -lassimp
    /home/georgelin/ti/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.3.1/.. /../../../aarch64-none-linux-gnu/bin/ld: skipping incompatible /home/georgelin/ti-processor-sdk-rtos-j721e-evm-09_00_00_02_assimp_work/targetfs/usr/lib/libassimp .so when searching for -lassimp

    vision_apps_log_20240122135340.zip

    But compilation still fails.
    Please help me solve this problem.
    Thanks.


    George Lin

  • Dear Brijesh,

    My cross compiler locations are all as follows:
    /home/georgelin/ti/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf
    /home/georgelin/ti/ti-cgt-armllvm_2.1.3.LTS
    /home/georgelin/ti/gcc-arm-9.2-2019.12-x86_64-aarch64-none-elf
    /home/georgelin/ti/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu
    /home/georgelin/ti/ti-cgt-c7000_3.1.0.LTS
    /home/georgelin/ti/ti-cgt-c6000_8.3.7
    I want to create assimp static function library through TI cross compiler.

    But maybe there's something wrong with my approach.
    My approach is:

    cd /home/georgelin/ti-processor-sdk-rtos-j721e-evm-09_00_00_02_assimp_work/assimp-5.3.1
    cmake .
    make -C /home/georgelin/ti-processor-sdk-rtos-j721e-evm-09_00_00_02_assimp_work/assimp-5.3.1/ all TOOLS_INSTALL_PATH=/home/georgelin/ti BOARD=j721e_evm SOC=j721e CORE=mcu2_0 BUILD_PROFILE=release -s;

    ps.: The default make of assimp is cmake.

    Can you tell me if my instructions are correct?
    Or can you tell me what the correct command is?

    Best regard,
    George Lin

  • Dear

    Can you tell me how to use aarch64 cross compiler to run cmake?
    I found the following case and it looks like my case.
    e2e.ti.com/.../tda4m-building-opencv-on-a72
    But I still can not find aarch64-gnu.toolchain.cmake.
    can you help me?
    Thanks.

    The best rebuild,
    George Lin

  • Hi George,

    Can you please refer to file vision_apps\apps\concerto_a72_inc.mak? There are many libraries getting included for A72 Linux, or QNX in this file. So can you please refer to this file and include you libraries in STATIC_LIBS and Library path in LDIRS variables?

    Regards,

    Brijesh