Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 210145 - sys-fs/e2fsprogs-1.40.5 local linker scripts break --sysroot cross-compiles
Summary: sys-fs/e2fsprogs-1.40.5 local linker scripts break --sysroot cross-compiles
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 228525 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-02-14 15:45 UTC by Joel Martin (RETIRED)
Modified: 2008-06-21 03:47 UTC (History)
1 user (show)

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 Joel Martin (RETIRED) gentoo-dev 2008-02-14 15:45:34 UTC
+++ This bug was initially created as a clone of Bug #207851 +++

The new way of setting up the local linker scripts doesn't work with --sysroot
style cross-compilers:

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

The problem here is that toolchain programs with --sysroot support will
normally resolve linker script GROUP values to be relative to the value of
sysroot. However, they only do this if the file containing the linker script is
within the sysroot. Otherwise it uses an absolute path which ends up picking up
system libraries when cross-compiling. I.e. this happens:

        CC prof_err.c
        LD e2fsck
/usr/libexec/gcc/mips64el-gentoo-linux-gnu/ld: cannot find
/usr/lib32/libcom_err.so
collect2: ld returned 1 exit status
Comment 1 SpanKY gentoo-dev 2008-02-15 07:40:37 UTC
so what you're saying is that your sysroot does not have the com_err and ss libraries installed ?  if that's the case, then install them into your sysroot
Comment 2 Joel Martin (RETIRED) gentoo-dev 2008-02-15 15:39:32 UTC
It DOES have them installed. The problem is that GROUP only gets resolved relative to the sysroot if the file containing the GROUP macro is also within the sysroot. So what's happening in my case is that it's trying to link against /usr/lib32/libcom_err.so instead of <sysroot>/usr/lib32/libcom_err.so

Comment 3 SpanKY gentoo-dev 2008-02-15 19:09:03 UTC
got ya ... the full paths arent actually needed, so try dropping the leading /usr/lib/ part
Comment 4 SpanKY gentoo-dev 2008-03-16 08:17:01 UTC
then again, that wont work as the linker will just keep searching the same path over and over in an infinite loop (finding the linker script)

i'd say just put the libraries into your sysroot like normal
Comment 5 SpanKY gentoo-dev 2008-06-21 03:47:51 UTC
*** Bug 228525 has been marked as a duplicate of this bug. ***