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

Bug 220023

Summary: cross compiling sys-libs/ss fails
Product: Gentoo Linux Reporter: Dave Bender <codehero>
Component: New packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED DUPLICATE    
Severity: normal CC: ve
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: ebuild environment file
complete build log

Description Dave Bender 2008-05-02 09:51:05 UTC
Attempting to cross compile sys-libs/ss fails not being able to find libcom_err. Cursory glance at the error indicates that the build process is attempting to link the host's libcom_err instead of the target's libcom_err.

Attaching relevant build information
Comment 1 Dave Bender 2008-05-02 09:51:46 UTC
Created attachment 151593 [details]
ebuild environment file
Comment 2 Dave Bender 2008-05-02 09:52:26 UTC
Created attachment 151594 [details]
complete build log
Comment 3 Dave Bender 2008-05-02 10:21:00 UTC
Identified culprit line:

In the ebuild ss-1.40.8.ebuild, lines 35-36

    echo "GROUP ( /usr/$(get_libdir)/libcom_err.a )" > lib/libcom_err.a
    echo "GROUP ( /usr/$(get_libdir)/libcom_err.so )" > lib/libcom_err.so

/usr/$(get_libdir)/lib_comerr.so resolves to the HOST's libcom_err at /usr/lib

This needs to resolve the the $ROOT's lib directory

Not sure how to patch, please advise
Comment 4 Dave Bender 2008-05-02 10:28:08 UTC
Please see e2fsprogs as well, it contains the same error for com_err and ss
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2008-05-02 16:22:20 UTC
com_err is a genuine dependency and the ebuild does require it (lines 16-7):

RDEPEND="~sys-libs/com_err-${PV}"
DEPEND="${RDEPEND}

Were you perhaps using emerge --nodeps?
Comment 6 Dave Bender 2008-05-02 18:02:01 UTC
Jeroen,
  This actually has nothing to do with dependencies. The problem is that the ebuild does not properly setup the build environment. The libcom_err stub to be linked to during building is incorrectly always set to the build host, rather than the ROOT's.
Comment 7 Vincent ETIENNE 2008-05-04 07:47:20 UTC
still present in version 1.40.9. For the moment, i have change the ebuild to do GROUP ( "${ROOT}/usr/$(get_libdir)/libcom_err.a" ) > "lib/libcom_err.a" and the same for .so file. That works for my case, but not sure how to get get_libdir in the rooted environment and not in the hosted environment (i.e i think it works because /usr/lib is present in the two environments )
Comment 8 Vincent ETIENNE 2008-05-04 08:20:48 UTC
Just a little follow-ups : had a better success ( ie. cross compiling ok ) when directing the .so file to ${ROOT}/lib instead of ${ROOT}/usr/lib. 
I have two "${ROOT}" a first one which is equivalent to a small stage3 (for arm-unknown-linux-glibc ) and a second one where i only install to produce a disk image (have only /lib, /usr/lib, /bin, /usr/bin and partially /etc, the rest being a mount -o bind of the first one for man pages,, var/db/pkg,/etc/portage ). In the second case it was necessary to use the real .so file. Don't understand exactly why. 
Comment 9 SpanKY gentoo-dev 2008-05-05 03:38:19 UTC

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