Discussion:
[yocto] Using multilib to build 32-bit glibc on 64-bit target platform
Nicholas Tsirakis
2018-12-10 20:37:19 UTC
Permalink
Hello,

I'm having trouble understanding the proper usage of multilib within the
Yocto project. I've read through Yocto's documentation, but I think I am
missing something crucial. Here are the steps I've taken:

1. Added the following to my local.conf:
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"

2. Attempted to build lib32-glibc with bitbake. Received the following
errors for lib32-glib-initial (shortened for brevity):

| <stdin>:10:36: error: 'REG_RBP' undeclared (first use in this function)
| <stdin>:9:26: note: in expansion of macro 'ucontext'
| <stdin>:10:20: note: in expansion of macro 'mcontext'
| <stdin>:11:61: note: in expansion of macro 'mreg'
| <stdin>:10:36: note: each undeclared identifier is reported only once for
each function it appears in
| <stdin>:9:26: note: in expansion of macro 'ucontext'
| <stdin>:10:20: note: in expansion of macro 'mcontext'
| <stdin>:11:61: note: in expansion of macro 'mreg'
| <stdin>:10:36: error: 'REG_RSP' undeclared (first use in this function)
| <stdin>:9:26: note: in expansion of macro 'ucontext'
| <stdin>:10:20: note: in expansion of macro 'mcontext'
| <stdin>:12:61: note: in expansion of macro 'mreg'
...
| <stdin>:5:73: error: 'La_x86_64_xmm' undeclared (first use in this
function)
...
| <stdin>:10:87: error: invalid use of undefined type 'struct
La_x86_64_regs'
...

3. At this point it appeared to me like it was attempting to build a 64-bit
version of glibc in a 32-bit environment, so I tried building the
lib32-linux-libc-headers by adding the following to its recipe:

do_install_prepend() {
if [ "${MLPREFIX}" == "lib32-" ]; then
ARCH="x86"
fi
}

This was more a shot in the dark than anything else and still yielded the
same result. Can someone clear up the proper usage of multilib and tell me
if I'm doing something wrong? Please note that my project currently uses
OE's pyro branches.

Thank you for your time.

Loading...