Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 642038 - mesa fails to (cross) compile on 32bit ARMv7 + x86_64 host due to library bleeding
Summary: mesa fails to (cross) compile on 32bit ARMv7 + x86_64 host due to library ble...
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-22 13:36 UTC by Emmanuel Lepage Vallee
Modified: 2021-01-08 08:52 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Emmanuel Lepage Vallee 2017-12-22 13:36:24 UTC
What happens:

 * Mesa build system tries to use /usr/lib for the cross compilation (libexpat, libdl, libz, etc)
 * It is only for ARMv7 so far, aarch64 works as expected, my guess is that it has to do with the 64-64bit with 64-32bit of the host/target mismatch

Workaround:

/usr/armv7a-hardfloat-linux-gnueabi/etc/portage/make.conf

# When host is 64bit and target 32bit, the `lib64` directory tend to leak
# into the build
LD_LIBRARY_PATH="/usr/armv7a-hardfloat-linux-gnueabi/lib:/usr/armv7a-hardfloat-linux-gnueabi/usr/lib/"
LD_RUN_PATH="/usr/armv7a-hardfloat-linux-gnueabi/lib:/usr/armv7a-hardfloat-linux-gnueabi/usr/lib/"

CFLAGS="-O2 -pipe -fomit-frame-pointer -L/usr/armv7a-hardfloat-linux-gnueabi/lib/ -L/usr/armv7a-hardfloat-linux-gnueabi/usr/lib/"

With the above additions, it starts to work again.

(I am mostly reporting this bug to document all issues I had creating my toolchain, I already reported a dozen or so, sorry for the noise)
Comment 1 tt_1 2019-05-25 16:09:32 UTC
may I ask, were you able to cross compile mesa with llvm useflag this way?
Comment 2 Emmanuel Lepage Vallee 2019-05-25 21:17:20 UTC
> may I ask, were you able to cross compile mesa with llvm useflag this way?

I was using GCC the whole time. At the time I felt that its LTO and PGO support was still quite superior. LTO is very important for "bundled" cross-compiled binaries on ARM because it cuts the startup time by 80%.
Comment 3 Fabian Groffen gentoo-dev 2021-01-08 08:52:21 UTC
this is not a Prefix bug, please take it up with the crossdev guys