AGL SDK for raspberrypi4 for Needlefish branch not working

Description

Hello everyone,

when I build an agl-image-minimal-crosssdk for MACHINE raspberrypi4 and I install the SDK using poky-agl-glibc-x86_64-agl-image-minimal-crosssdk-armv7vet2hf-neon-vfpv4-raspberrypi4-toolchain-14.0.3.sh I am not able to compile any application. I get following error in the console output.

[proc] Executing command: /opt/agl-sdk/14.0.3-armv7vethf-neon-vfpv4/sysroots/x86_64-aglsdk-linux/usr/bin/cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=/opt/agl-sdk/14.0.3-armv7vethf-neon-vfpv4/sysroots/x86_64-aglsdk-linux/usr/bin/arm-agl-linux-gnueabi/arm-agl-linux-gnueabi-gcc -DCMAKE_CXX_COMPILER:FILEPATH=/opt/agl-sdk/14.0.3-armv7vethf-neon-vfpv4/sysroots/x86_64-aglsdk-linux/usr/bin/arm-agl-linux-gnueabi/arm-agl-linux-gnueabi-g++ -S/home/csolemendi/Test_sdk -B/home/csolemendi/Test_sdk/build -G Ninja
[cmake] Not searching for unused variables given on the command line.
[cmake] -- Toolchain file defaulted to '/opt/agl-sdk/14.0.3-armv7vethf-neon-vfpv4/sysroots/x86_64-aglsdk-linux/usr/share/cmake/OEToolchainConfig.cmake'
[cmake] -- The C compiler identification is GNU 11.3.0
[cmake] -- The CXX compiler identification is GNU 11.3.0
[cmake] -- Detecting C compiler ABI info
[cmake] -- Detecting C compiler ABI info - failed
[cmake] -- Check for working C compiler: /opt/agl-sdk/14.0.3-armv7vethf-neon-vfpv4/sysroots/x86_64-aglsdk-linux/usr/bin/arm-agl-linux-gnueabi/arm-agl-linux-gnueabi-gcc
[cmake] -- Check for working C compiler: /opt/agl-sdk/14.0.3-armv7vethf-neon-vfpv4/sysroots/x86_64-aglsdk-linux/usr/bin/arm-agl-linux-gnueabi/arm-agl-linux-gnueabi-gcc - broken
[cmake] CMake Error at /opt/agl-sdk/14.0.3-armv7vethf-neon-vfpv4/sysroots/x86_64-aglsdk-linux/usr/share/cmake-3.22/Modules/CMakeTestCCompiler.cmake:69 (message):
[cmake]   The C compiler
[cmake]
[cmake]     "/opt/agl-sdk/14.0.3-armv7vethf-neon-vfpv4/sysroots/x86_64-aglsdk-linux/usr/bin/arm-agl-linux-gnueabi/arm-agl-linux-gnueabi-gcc"
[cmake]
[cmake]   is not able to compile a simple test program.
[cmake]
[cmake]   It fails with the following output:
[cmake]
[cmake]     Change Dir: /home/csolemendi/Test_sdk/build/CMakeFiles/CMakeTmp
[cmake]     
[cmake]     Run Build Command(s):/opt/agl-sdk/14.0.3-armv7vethf-neon-vfpv4/sysroots/x86_64-aglsdk-linux/usr/bin/ninja cmTC_73181 && [1/2] Building C object CMakeFiles/cmTC_73181.dir/testCCompiler.c.o
[cmake]     [2/2] Linking C executable cmTC_73181
[cmake]     FAILED: cmTC_73181
[cmake]     : && /opt/agl-sdk/14.0.3-armv7vethf-neon-vfpv4/sysroots/x86_64-aglsdk-linux/usr/bin/arm-agl-linux-gnueabi/arm-agl-linux-gnueabi-gcc --sysroot=/opt/agl-sdk/14.0.3-armv7vethf-neon-vfpv4/sysroots/armv7vet2hf-neon-vfpv4-agl-linux-gnueabi -O2 -pipe -g -feliminate-unused-debug-types -Wl,-O1 Wl,-hash-style=gnu Wl,-as-needed  -Wl,-z,relro,-z,now   -rdynamic CMakeFiles/cmTC_73181.dir/testCCompiler.c.o -o cmTC_73181   && :
[cmake]     /opt/agl-sdk/14.0.3-armv7vethf-neon-vfpv4/sysroots/x86_64-aglsdk-linux/usr/libexec/arm-agl-linux-gnueabi/gcc/arm-agl-linux-gnueabi/11.3.0/ld: error: cmTC_73181 uses VFP register arguments, CMakeFiles/cmTC_73181.dir/testCCompiler.c.o does not
[cmake]     /opt/agl-sdk/14.0.3-armv7vethf-neon-vfpv4/sysroots/x86_64-aglsdk-linux/usr/libexec/arm-agl-linux-gnueabi/gcc/arm-agl-linux-gnueabi/11.3.0/ld: failed to merge target specific data of file CMakeFiles/cmTC_73181.dir/testCCompiler.c.o
[cmake]     collect2: error: ld returned 1 exit status
[cmake]     ninja: build stopped: subcommand failed.
[cmake]     
[cmake]     
[cmake]
[cmake]   
[cmake]
[cmake]   CMake will not be able to correctly generate this project.
[cmake] Call Stack (most recent call first):
[cmake]   CMakeLists.txt:2 (project)
[cmake]
[cmake]
[cmake] -- Configuring incomplete, errors occurred!
[cmake] See also "/home/csolemendi/Test_sdk/build/CMakeFiles/CMakeOutput.log".
[cmake] See also "/home/csolemendi/Test_sdk/build/CMakeFiles/CMakeError.log".
[proc] The command: /opt/agl-sdk/14.0.3-armv7vethf-neon-vfpv4/sysroots/x86_64-aglsdk-linux/usr/bin/cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=/opt/agl-sdk/14.0.3-armv7vethf-neon-vfpv4/sysroots/x86_64-aglsdk-linux/usr/bin/arm-agl-linux-gnueabi/arm-agl-linux-gnueabi-gcc -DCMAKE_CXX_COMPILER:FILEPATH=/opt/agl-sdk/14.0.3-armv7vethf-neon-vfpv4/sysroots/x86_64-aglsdk-linux/usr/bin/arm-agl-linux-gnueabi/arm-agl-linux-gnueabi-g++ -S/home/csolemendi/Test_sdk -B/home/csolemendi/Test_sdk/build -G Ninja exited with cod{}e: 1

I attach also the CMakeError.log file. It seems that some object files like Scrt1.o cannot be found in /libexec folder but they are actually available in /lib folder. There was also an issue with the sdk for raspberrypi4-64 but it was from a different nature. For rasperrypi4-64 the problem was that two different libraries were installed, the gcc and the musl one and in my case vscode was picking the wrong one. That issue was solved by deleting the musl folder manually. However this seems a different issue. 

Environment

Nifty needlefish for MACHINE = "raspberrypi4" (32bit)

Attachments

1

Activity

Jan-Simon Moeller 
March 23, 2023 at 4:13 PM

Happy it worked.

carles.solemendi@de.bosch.com 
March 6, 2023 at 5:11 PM

Hi Jan-Simon,

thanks for the hint. The dependency is KVM. It is enabled by default in bcm2711_defconfig for arm64 but not for arm. Once disabled it works.

Jan-Simon Moeller 
March 4, 2023 at 10:23 PM

Try   bitbake -c menuconfig virtual/kernel  . Then hit "/" (shift 7) , search for   "CONFIG_PREEMPT_RT" , look at the list, select the one matching (press the number in front) . Then look at HELP and it will list the dependencies. It lists the ones that are on (Y) already but also the ones that are off and would need to be enabled. You might have to crawl through the dependencies of the dependencies as well.

HTH.

JS

carles.solemendi@de.bosch.com 
February 27, 2023 at 1:17 PM

Hello Jan-Simon,

thanks for your reply. Using the 64bit option is also my preference. But unfortunately I have not been able to find which options are missing.

According to the Linux foundation wiki: https://wiki.linuxfoundation.org/realtime/documentation/howto/applications/preemptrt_setup

only CONFIG_PREEMPT_RT_FULL is required. However from what I could find with the current kernel version 5.15.y for Rpi CONFIG_PREEMPT_RT is the correct config. There is no information though on any dependencies that I can find anywhere and the 2711_defconfig for arm and arm64 have a significant number of differencies so it is not easy to pin point to the required configs so that CONFIG_PREEMPT_RT is applied.

I guess you can close this issue.

Best Regards,

Carles

Jan-Simon Moeller 
February 27, 2023 at 10:41 AM

Well, you altered the build for the pi4 to 32bit. We do only test pi4 w/ 64bit. Likely the macro files for autoconf/automake/cmake now do not match.

I'd suggest you return to 64bit and rather fix the RT-Kernel patch fragment inclusion. There are likely just a few options missing that you need to turn on as well.

Fixed

Details

Assignee

Reporter

Hardware Platform(s) Affected

Raspberry Pi 4

Components

Priority

Created February 17, 2023 at 11:17 AM
Updated March 29, 2023 at 2:42 PM
Resolved March 23, 2023 at 4:13 PM