Wind River Support Network

HomeDefectsLIN6-9406
Fixed

LIN6-9406 : missing multilib support in SDK sysroot

Created: Feb 6, 2015    Updated: Dec 3, 2018
Resolved Date: Mar 31, 2015
Found In Version: 6.0.0.16
Fix Version: 6.0.0.19
Severity: Standard
Applicable for: Wind River Linux 6
Component/s: Build & Config

Description

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.

Workaround

# Add the new feature
cd /wr6-install-dir/layers/wr-base
patch -Np1 < 0001-feature-multilib-sdk-target-New-feature-to-enable-mu.patch # or `git am' if you are on a git clone
# Fix the arch of SDK package group
cd /new-project-dir/
/wr6-install-dir/wrlinux/configure --with-template=feature/multilib-sdk-target  <rest the same as before>  
cd layers/oe-core
git am 0001-packagegroup-core-standalone-sdk-target-specify-pack.patch
cd -
make export-sdk

------------------------------- the following things are obsolete ----------------------------

make -C build lib32-packagegroup-core-standalone-sdk-target.addpkg
make export-sdk
# after install the SDK, and in SDK installation dir
cd  sysroots/x86_64-wrs-linux
rpm2cpio /path/to/project/export/RPMS/lib32_x86/libc6-2.18-r2.0.lib32_x86.rpm | cpio -idm

#do the same to
ldd-2.18-r2.0.lib32_x86.rpm
libc6-dbg-2.18-r2.0.lib32_x86.rpm
libc6-dev-2.18-r2.0.lib32_x86.rpm
libc6-staticdev-2.18-r2.0.lib32_x86.rpm
libgcc1-4.8.1-r2.0.lib32_x86.rpm
libgcc-s-dbg-4.8.1-r2.0.lib32_x86.rpm
libgcc-s-dev-4.8.1-r2.0.lib32_x86.rpm
libstdc++6-4.8.1-r2.0.lib32_x86.rpm
libstdc++-dbg-4.8.1-r2.0.lib32_x86.rpm
libstdc++-dev-4.8.1-r2.0.lib32_x86.rpm
libstdc++-staticdev-4.8.1-r2.0.lib32_x86.rpm

Steps to Reproduce

$ 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. 

Other Downloads


Live chat
Online