* [scarthgap] recipe's sysroot misconfiguration in multilib
@ 2025-03-26 18:53 Joao Marcos Costa
0 siblings, 0 replies; 2+ messages in thread
From: Joao Marcos Costa @ 2025-03-26 18:53 UTC (permalink / raw)
To: openembedded-core
Cc: Thomas Perrot, Alexandre Belloni, Khem Raj, richard.purdie
Hello,
(Just in case, I'm re-sending this email as the first one bounced back)
I have been trying to set up a multilib environment to generate
libraries built with Control Flow Integrity support. The gcc toolchain
is already patched to support this custom multilib ABI, and it is indeed
capable of generating binaries with the CFI flags.
I am, however, facing this strange issue where a header is not found in
the multilib recipe-sysroot (i.e., libcfi-recipe-sysroot) of a given
package (e.g., zstd), and do_compile task fails:
libcfi-zstd/1.5.5/libcfi-recipe-sysroot/usr/include/c++/13.2.0/cstdint:38:10:
fatal error: bits/c++config.h: No such file or directory
| 38 | #include <bits/c++config.h>
| | ^~~~~~~~~~~~~~~~~~
| compilation terminated.
| make: *** [Makefile:248: Options.o] Error 1
The strange part is the header is there:
libcfi-recipe-sysroot/usr/include/c++/13.2.0/riscv64-freedomusdkmllibcfi-linux/bits/c++config.h
Another strange aspect in this very same context is: the
recipe-sysroot-native seems misconfigured and incomplete. For reference,
let me use libcfi-zstd/zstd again:
zstd/1.5.5$ ls recipe-sysroot-native/sysroot-providers/ -l | wc -l
66
zstd/1.5.5$ du -sh recipe-sysroot-native/
457M recipe-sysroot-native/
libcfi-zstd/1.5.5$ ls recipe-sysroot-native/sysroot-providers/ -l | wc -l
27
libcfi-zstd/1.5.5$ du -sh recipe-sysroot-native/
194M recipe-sysroot-native/
Unless I'm missing something, shouldn't I have roughly the same values here?
Besides my TUNE_*, DEFAULTTUNE, BASE_LIB values set up, I also added
'GCCMULTILIB = "--enable-multilib"' to gcc-cross.inc, to enable multilib
for the cross toolchain. Could I be missing something, maybe with
recipes-devtools/gcc/gcc-multilib-config.inc?
Any help is very appreciated, and please excuse me for such a text wall.
--
Best regards,
João Marcos Costa
^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <5be84788-6fa5-453c-83bc-d547246dc037@bootlin.com>]
* Re: [scarthgap] recipe's sysroot misconfiguration in multilib
[not found] <5be84788-6fa5-453c-83bc-d547246dc037@bootlin.com>
@ 2025-03-26 18:55 ` Richard Purdie
0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2025-03-26 18:55 UTC (permalink / raw)
To: Joao Marcos Costa, openembedded-core
Cc: Thomas Perrot, Alexandre Belloni, Khem Raj
On Wed, 2025-03-26 at 19:47 +0100, Joao Marcos Costa wrote:
> I have been trying to set up a multilib environment to generate
> libraries built with Control Flow Integrity support. The gcc toolchain
> is already patched to support this custom multilib ABI, and it is indeed
> capable of generating binaries with the CFI flags.
>
> I am, however, facing this strange issue where a header is not found in
> the multilib recipe-sysroot (i.e., libcfi-recipe-sysroot) of a given
> package (e.g., zstd), and do_compile task fails:
>
> libcfi-zstd/1.5.5/libcfi-recipe-sysroot/usr/include/c++/13.2.0/cstdint:38:10:
> fatal error: bits/c++config.h: No such file or directory
> > 38 | #include <bits/c++config.h>
> > | ^~~~~~~~~~~~~~~~~~
> > compilation terminated.
> > make: *** [Makefile:248: Options.o] Error 1
>
> The strange part is the header is there:
> libcfi-recipe-sysroot/usr/include/c++/13.2.0/riscv64-freedomusdkmllibcfi-linux/bits/c++config.h
>
> Another strange aspect in this very same context is: the
> recipe-sysroot-native seems misconfigured and incomplete. For reference,
> let me use libcfi-zstd/zstd again:
>
> zstd/1.5.5$ ls recipe-sysroot-native/sysroot-providers/ -l | wc -l
> 66
> zstd/1.5.5$ du -sh recipe-sysroot-native/
> 457M recipe-sysroot-native/
>
> libcfi-zstd/1.5.5$ ls recipe-sysroot-native/sysroot-providers/ -l | wc -l
> 27
> libcfi-zstd/1.5.5$ du -sh recipe-sysroot-native/
> 194M recipe-sysroot-native/
>
> Unless I'm missing something, shouldn't I have roughly the same values here?
>
> Besides my TUNE_*, DEFAULTTUNE, BASE_LIB values set up, I also added
> 'GCCMULTILIB = "--enable-multilib"' to gcc-cross.inc, to enable multilib
> for the cross toolchain. Could I be missing something, maybe with
> recipes-devtools/gcc/gcc-multilib-config.inc?
I'm finding it odd that you have to add --enable-multilib since in
general with gcc-cross, we use separate cross toolchains for each
multilib. This kind of implies you're configuring the setup differently
to how the system would expect.
The recipe-sysroot-native/installeddeps/ directory will show you what
is installed in each and might help narrow down the size difference.
Cheers,
Richard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-03-26 18:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-26 18:53 [scarthgap] recipe's sysroot misconfiguration in multilib Joao Marcos Costa
[not found] <5be84788-6fa5-453c-83bc-d547246dc037@bootlin.com>
2025-03-26 18:55 ` Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.