* Multilib SDK, compiler issues
@ 2014-07-23 0:11 Mark Hatle
0 siblings, 0 replies; only message in thread
From: Mark Hatle @ 2014-07-23 0:11 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-07-23 0:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-23 0:11 Multilib SDK, compiler issues Mark Hatle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.