From: Mark Hatle <mark.hatle@windriver.com>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Multilib SDK, compiler issues
Date: Tue, 22 Jul 2014 19:11:40 -0500 [thread overview]
Message-ID: <53CEFDBC.9050007@windriver.com> (raw)
When you generate a multilib SDK, i.e. adding this to conf/local.conf:
MACHINE = "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
And then build an SDK using 'bitbake meta-toolchain', you end up with and SDK
that is only partially functional.
Using a small test program
/tmp/t.c:
int main()
{
return 0;
}
source ./environment-setup-core2-64-poky-linux
$CC /tmp/t.c -o /tmp/t
This works as expected.
However, if you change to the multilib:
source environment-setup-x86-pokymllib32-linux
You get a page of errors trying to link. The key thing is that a number of
necessary libraries and linker object files were not installed. This is fairly
easy to fix, using the manual settings added to the local.conf file:
TOOLCHAIN_DEPENDS = "packagegroup-core-standalone-sdk-target
packagegroup-core-standalone-sdk-target-dbg"
TOOLCHAIN_MULTILIB_DEPENDS = "${@' '.join([variant + '-' + pkg for variant in
(d.getVar("MULTILIB_VARIANTS", True) or "").split() for pkg in
(d.getVar("TOOLCHAIN_DEPENDS", True) or "").split()])}"
TOOLCHAIN_TARGET_TASK = "${TOOLCHAIN_DEPENDS} ${TOOLCHAIN_MULTILIB_DEPENDS}"
(perhaps that or something similar needs to go into meta-toolchain?)
But that doesn't resolve the problem.. the toolchain itself is not configured
properly.
Once you've done that you still can't link the alternative library toolchain.
The search-dirs are configured incorrectly:
$ $CC --print-search-dirs
install:
/usr/local/sdk/sysroots/x86_64-pokysdk-linux/usr/bin/i586-pokymllib32-linux/../../lib/i586-pokymllib32-linux/gcc/i586-pokymllib32-linux/4.9.0/
programs:
=/usr/local/sdk/sysroots/x86_64-pokysdk-linux/usr/bin/i586-pokymllib32-linux/../../libexec/i586-pokymllib32-linux/gcc/i586-pokymllib32-linux/4.9.0/:/usr/local/sdk/sysroots/x86_64-pokysdk-linux/usr/bin/i586-pokymllib32-linux/../../libexec/i586-pokymllib32-linux/gcc/:/usr/local/sdk/sysroots/x86_64-pokysdk-linux/usr/bin/i586-pokymllib32-linux/../../lib/i586-pokymllib32-linux/gcc/i586-pokymllib32-linux/4.9.0/../../../../../i586-pokymllib32-linux/bin/i586-pokymllib32-linux/4.9.0/:/usr/local/sdk/sysroots/x86_64-pokysdk-linux/usr/bin/i586-pokymllib32-linux/../../lib/i586-pokymllib32-linux/gcc/i586-pokymllib32-linux/4.9.0/../../../../../i586-pokymllib32-linux/bin/
libraries:
=/usr/local/sdk/sysroots/x86_64-pokysdk-linux/usr/bin/i586-pokymllib32-linux/../../lib/i586-pokymllib32-linux/gcc/i586-pokymllib32-linux/4.9.0/:/usr/local/sdk/sysroots/x86_64-pokysdk-linux/usr/bin/i586-pokymllib32-linux/../../lib/i586-pokymllib32-linux/gcc/:/usr/local/sdk/sysroots/x86_64-pokysdk-linux/usr/bin/i586-pokymllib32-linux/../../lib/i586-pokymllib32-linux/gcc/i586-pokymllib32-linux/4.9.0/../../../../../i586-pokymllib32-linux/lib/i586-pokymllib32-linux/4.9.0/:/usr/local/sdk/sysroots/x86_64-pokysdk-linux/usr/bin/i586-pokymllib32-linux/../../lib/i586-pokymllib32-linux/gcc/i586-pokymllib32-linux/4.9.0/../../../../../i586-pokymllib32-linux/lib/:/usr/local/sdk/sysroots/core2-64-poky-linux/lib64/i586-pokymllib32-linux/4.9.0/:/usr/local/sdk/sysroots/core2-64-poky-linux/lib64/:/usr/local/sdk/sysroots/core2-64-poky-linux/usr/lib64/i586-pokymllib32-linux/4.9.0/:/usr/local/sdk/sysroots/core2-64-poky-linux/usr/lib64/
It's looking in the /lib64 and /usr/lib64 directories of the sysroot for some
reason. The most I've tracked it down to at this point is that for some reason
the value 'target_base_libdir' is being set to '/lib64' within the
cross-canadian.bbclass -- but I can't figure out why that is occurring.
'bitbake -e' shows that it should be '/lib', so I suspect there is an issue with
overrides or something and multilib configurations.
Any help would be appreciated.. I'm stumped on this.
--Mark
reply other threads:[~2014-07-23 0:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53CEFDBC.9050007@windriver.com \
--to=mark.hatle@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox