Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 659752

Summary: When cross compiling (using ROOT=, SYSROOT=), static libraries are taken from the host.
Product: Portage Development Reporter: dE <de.techno>
Component: Core - DependenciesAssignee: Portage team <dev-portage>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description dE 2018-07-01 13:12:17 UTC
When cross compiling (using ROOT=), the build time dependencies are installed on the host (with the host's CFLAGS), and if the build time dependency is a static library, it's also copied from the host.

Setting SYSROOT, --sysroot, --root-deps does not make a difference. They just install the dependency in the ROOT but do not use it.
Comment 1 Mike Gilbert gentoo-dev 2018-07-01 13:22:44 UTC
That really depends on the build system of the package in question, not portage.
Comment 2 Mike Gilbert gentoo-dev 2018-07-01 13:27:52 UTC
Also, your cross-compiler (gcc, clang, etc) should be configured to look for libraries in SYSROOT instead of /. A tool like crossdev will set that up for you.
Comment 3 dE 2018-07-01 15:45:43 UTC
So, this will not be possible with plane ROOT?
Comment 4 dE 2018-07-01 15:46:49 UTC
Is there any documentation on how it can be achieved manually?
Comment 5 dE 2021-07-21 04:00:51 UTC
Looks like I had hit this issue twice.

*** This bug has been marked as a duplicate of bug 659766 ***