Solved
"Compilation Error: Missing limits.h Header in Cross-Compilation for GStreamer HelloWorld Example"
- November 4, 2025
- 2 replies
- 426 views
Description:
When attempting to compile a GStreamer "Hello World" example (basic-tutorial-1.c) using the cross-compiler toolchain on STM32MP1 with OpenSTLinux, a fatal error occurs indicating that the limits.h header file is missing.
https://gstreamer.freedesktop.org/documentation/tutorials/basic/hello-world.html?gi-language=c
Steps to Reproduce:
Source the environment setup script:
source /opt/st/stm32mp1/5.0.3-openstlinux-6.6-yocto-scarthgap-mpu-v24.11.06/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabiCheck the cross-compiler:
echo $CCarm-ostl-linux-gnueabi-gcc -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 --sysroot=/opt/st/stm32mp1/5.0.3-openstlinux-6.6-yocto-scarthgap-mpu-v24.11.06/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabiAttempt to compile the program:
arm-ostl-linux-gnueabi-gcc -Wall basic-tutorial-1.c -o helloworld $(pkg-config --cflags --libs gstreamer-1.0)
Error Message:
/opt/st/stm32mp1/5.0.3-openstlinux-6.6-yocto-scarthgap-mpu-v24.11.06/sysroots/x86_64-ostl_sdk-linux/usr/lib/arm-ostl-linux-gnueabi/gcc/arm-ostl-linux-gnueabi/13.3.0/include/limits.h:205:15: fatal error: limits.h: No such file or directory
205 | #include_next <limits.h> /* recurse down to the real one */ compilation terminated.
205 | #include_next <limits.h> /* recurse down to the real one */ compilation terminated.
