Fixed
Created: Mar 31, 2015
Updated: Sep 8, 2018
Resolved Date: Dec 6, 2015
Found In Version: 7.0.0.0.LB03
Fix Version: 7.0.0.12
Severity: Standard
Applicable for: Wind River Linux 7
Component/s: Build & Config
This is a follow-up case to LIN6-9340.
In the original case, toolchain wrappers were missing for the 32-bit toolchain when creating an SDK in a multilib project. The wrappers are now available but parts of the 32-bit sysroot seem to be missing so it is still not possible to compile a 32-bit application.
Manually expand the 32bit version of libc6 libc-dev libgcc libstdc++6 libstdc++-dev RPMs from export/RPM into SDK sysroot using
cd sysroots/x86_64-wrs-linux
rpm2cpio <RPMs> | cpio -idmv
$ configure --enable-board=intel-x86-64 \
--enable-rootfs=glibc_std --enable-kernel=preempt_rt \
--with-template=feature/toolchain-wrappers
Edit local.conf to add:
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
$ make export-sdk
Install the SDK. Attempt to build a simple hello world application.
$ /opt/windriver/intel-x86-64-glibc_std-preempt_rt-60p16-tcw/sysroots/x86_64-wrlinuxsdk-linux/usr/bin/x86_64-wrs-linux/x86_64-wrswrap-linux-gnu-gcc hello.c
$ file a.out
a.out: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.34, not stripped
$ rm a.out
$ /opt/windriver/intel-x86-64-glibc_std-preempt_rt-60p16-tcw/sysroots/x86_64-wrlinuxsdk-linux/usr/bin/i586-wrsmllib32-linux/x86-wrsmllib32wrap-linux-gnu-gcc hello.c
hello.c:1:19: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^
compilation terminated.
The 64-bit wrapper works but not the 32-bit.