Skip to contentSkip to conversation

Standard library header bug when compiling x32 application

yocto Paul D. DeRocco 1 participant 1 message Jan 3, 2021 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 8 lines

From: Paul D. DeRocco

Using Yocto 3.2.1 on an Intel target, trying to use the x32 model. I'm getting this compile error when I use the SDK to separately compile my application. I get no such errors when I build Linux, or the SDK.

In file included from

/opt/poky/3.2.1/i64/sysroots/core2-64-poky-linux/usr/include/sys/cdefs.h:453

Quoted 3 lines

,
from

/opt/poky/3.2.1/i64/sysroots/core2-64-poky-linux/usr/include/features.h:465,

Quoted 5 lines

from
/opt/poky/3.2.1/i64/sysroots/core2-64-poky-linux/usr/include/dirent.h:25,

                 from ../my_header_file.h:7,
                 from ../my_source_file.cpp:3:

/opt/poky/3.2.1/i64/sysroots/core2-64-poky-linux/usr/include/bits/long-doubl

Quoted 2 lines

e.h:23:10: fatal error: bits/long-double-32.h: No such file or directory

etc., etc.

I solved this myself by building an SDK specific to the x32 configuration, rather than trying to use the plain 64-bit SDK. What led me to believe that the 64-bit SDK should work is that the host sysroot includes /usr/bin/x86_64-poky-linux and /usr/bin/x86_64-poky-linux-gnux32 subdirectories. The latter contains symlinks into the former, which is no surprise, since one toolchain should be able to do 32, 64, and 64x32, but the target sysroot include files don't quite work. The only reason I care is that each SDK is about 2.4GB. So I'm not sure if this is a bug, or whose bug it is, but 2.4GB seems awfully large for an SDK, especially since this is the standard SDK, not the ESDK.

Signature · 2 lines
Ciao,               Paul D. DeRocco
Paul                mailto:[email protected]