AnsweredAssumed Answered

Cannot build graphs in VisionSDK_S32V2_RTM_1_2_0

Question asked by Viacheslav Slavinsky on Sep 14, 2018
Latest reply on Sep 19, 2018 by Kushal Shah

Hi, I'm trying to build some of the demos in VisionSDK_S32V2_RTM_1_2_0. They used to build fine in the pre-release version, but in that version some of the dependencies were simply included as precompiled .a libraries. Now it's not the case, they must be built and something is wrong.

 

For example, to build pedestrian_detection app, apexcv_pro_pyramid.a is required, so I'm in:

~/VisionSDK_S32V2_RTM_1_2_0/s32v234_sdk/libs/apexcv_pro/image_pyramid/graphs/build-apu-nxp-sa-d

 

When I run make, it appears to ignore the build environment and compiles using the host compiler:

Current SDK ROOT is /home/user/VisionSDK_S32V2_RTM_1_2_0/s32v234_sdk
apu-kernel-getgraphs.mk: updating pyramid_up_apu_process_desc_main.cpp
apu-kernel-getgraphs.mk: updating pyramid_up_apu_process_desc_main.cpp_g++.d
apu-kernel-getgraphs.mk: updating pyramid_down_apu_process_desc_main.cpp
apu-kernel-getgraphs.mk: updating pyramid_down_apu_process_desc_main.cpp_g++.d
Current SDK ROOT is /home/svo/VisionSDK_S32V2_RTM_1_2_0/s32v234_sdk
offline/X86 CX pyramid_down_apu_process_desc_main.o
offline/X86 LD pyramid_down_apu_process_desc_main.exe <= pyramid_down_apu_process_desc_main.o ../../../../../libs/apex/acf_offline/build-x86-gnu-linux-d/libacf_offline.a ../../../../../kernels/apu/apexcv_pro_pyramid/build-apu-nxp-sa-d/apexcv_pro_pyramidacf.a
../../../../../libs/apex/acf_offline/build-x86-gnu-linux-d/libacf_offline.a(acf_process_desc_apu-cpp.obj): In function `ACF_Process_Desc_APU::AnalyzeScenarios()':
/work/agent_home/xml-data/build-dir/AVS-CI174-LIN/vsdk/s32v234_sdk/libs/apex/acf_offline/build-x86-gnu-linux-d/../../../../libs/apex/acf_offline/src/acf_process_desc_apu.cpp:338: undefined reference to `__cxa_throw_bad_array_new_length'
/work/agent_home/xml-data/build-dir/AVS-CI174-LIN/vsdk/s32v234_sdk/libs/apex/acf_offline/build-x86-gnu-linux-d/../../../../libs/apex/acf_offline/src/acf_process_desc_apu.cpp:339: undefined reference to `__cxa_throw_bad_array_new_length'
collect2: error: ld returned 1 exit status
make: *** [pyramid_down_apu_process_desc_main.exe] Error 1

These error messages are just garbage caused by incompatible object file formats. It's not that surprising. If I run make V=1, I can see that it invokes host "g++" without prefix. This is also confirmed by probing some of the .o files:

$ file pyramid_down_apu_process_desc_main.o
pyramid_down_apu_process_desc_main.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped

The suffix .exe is also confusing, when building a linux library on linux host it seems out of place.

 

Relevant exports:

CROSS_COMPILE="aarch64-linux-gnu-"
CROSS_COMPILE_AARCH64_ELF="aarch64-none-elf-"
CROSS_COMPILE_M0_ELF="arm-none-eabi-"
APU_TOOLS=/home/svo/NXP/APU_Compiler_v1.0/
APU_COMP=nxp

This is on Linux Ubuntu 14.04.1, VisionSDK_S32V2_RTM_1_2_0 and NXP APU_Compiler_b530.

 

I guess the build system is missing some crucial environment variable but I don't know which one. Any help is greatly appreciated!

Outcomes