Open tdyjv opened 1 month ago
Looks like a behavioral change in Meson is causing CMocka to fail to cross-compile (previously, it was not being compiled). Working on a fork of the build rules for that project, and then will adjust this repo to use the forked version.
Would there be a quick workaround to disable the cmocka cross build ?
Just completed the changes and pushed to the repo if you want to give that a try.
Thanks for the quick response, libc seems to have completed. I will start on the stdc++ libs now.
I had an additional error earlier in test/meson.build at line 156 which I had to change to "native_map_file.format(meson.current_build_dir()+'/sample_app')," to continue. Not sure if that was the right thing to do or not, but it got me further.
Do you recall the error? Was that in the skeleton?
Output from make.....
Dependency cmocka from subproject subprojects/cmocka-1.1.7 found: YES 1.1.7
Program arm-none-eabi-objcopy found: YES (/home/jvolpe/arm-tools/bin/arm-none-eabi-objcopy)
Message: Native objcopy program not available, .hex and .bin conversion targets will be disabled.
Compiler for C supports arguments -nostdinc: YES
Compiler for C supports arguments -fno-builtin: YES
Compiler for C supports arguments -nostdinc: YES
Compiler for C supports arguments -fno-builtin: YES
Compiler for C supports arguments -nolibc: YES
Compiler for C supports arguments -nolibc: YES (cached)
Compiler for C supports arguments -nolibc: YES (cached)
Compiler for C supports arguments -nostartfiles: YES
Compiler for C supports arguments -nolibc: YES (cached)
Compiler for C supports arguments -Wno-unused-parameter: YES
Compiler for C supports arguments -Wno-stringop-truncation: YES
Compiler for C supports arguments -Wno-stringop-overflow: YES
Message: Some tests are disabled when builtins and/or optimizations are enabled.
Program arm-none-eabi-objcopy found: YES (/home/jvolpe/arm-tools/bin/arm-none-eabi-objcopy)
test/meson.build:156:12: ERROR: Unknown method "format" in object <[ArrayHolder] holds [list]: []> of type ArrayHolder.
A full log can be found at /home/jvolpe/Projects/libc/buildresults/meson-logs/meson-log.txt
make: *** [Makefile:80: buildresults/build.ninja] Error 1
I'm attempting to compile libc for an STM32L4R5 (Cortex-M4F) on a Linux system running kubuntu 22.04 I cloned the latest libc from the GitHub repo. I am completely new to using the meson build system, but am willing to learn. Any help would be appreciated.
After cloning the libc repo...
It seems to fail trying to compile cmocka for the ARM STM32 complaining about a missing setjmp.h which I assume should be provided by the local libc headers not the system. setjmp.h is in the libc/include directory. The compiler invocation to compile cmocka.c does not include any reference to the local header files. Is there a simple way to add the local libc headers to the cmocka.c build command ljne ? The complete meson-log.txt file is attached here, but I don't see any reference to cmocka.c there so I'm not sure how helpful that will be.
Here is the final line of output from the build attempt
meson-log.txt