Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 521182 - cross-armv7a-softfloat-linux-gnueabi/binutils-2.24-r3 looks in sysroot for GCC libdir
Summary: cross-armv7a-softfloat-linux-gnueabi/binutils-2.24-r3 looks in sysroot for GC...
Status: RESOLVED DUPLICATE of bug 291383
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Crossdev team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: crossdev-bugs
  Show dependency tree
 
Reported: 2014-08-26 21:05 UTC by Luke-Jr
Modified: 2018-04-07 18:28 UTC (History)
0 users

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


Attachments
build log (nestlink.log,17.66 KB, text/plain)
2018-04-07 18:05 UTC, Luke-Jr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke-Jr 2014-08-26 21:05:03 UTC
As installed by crossdev, libstdc++.so.6 is in /usr/lib/gcc/armv7a-softfloat-linux-gnueabi/4.8.3/, but the cross ld prefixes the sysroot and looks for it in /usr/armv7a-softfloat-linux-gnueabi/usr/lib/gcc/armv7a-softfloat-linux-gnueabi/4.8.3/ (where it fails to find it of course).

This only occurs when ld is looking for dependencies of a shared objects, such as a library using C++ being used in a C application. For example, libzmq provides C interfaces while using C++ internally. This results in a warning and then many unresolved symbols:
/usr/libexec/gcc/armv7a-linux-gnueabi/ld: warning: libstdc++.so.6, needed by /usr/armv7a-linux-gnueabi/usr/lib/libzmq.so, not found (try using -rpath or -rpath-link)
Comment 1 Luke-Jr 2014-08-26 21:05:27 UTC
Workaround: ln -s /usr/lib/gcc/armv7a-softfloat-linux-gnueabi/4.8.3/libstdc++.so.6 /usr/armv7a-softfloat-linux-gnueabi/lib/
Comment 2 SpanKY gentoo-dev 2014-09-02 14:05:35 UTC
please post concrete examples we can easily reproduce with.  vague descriptions don't really cut it.
Comment 3 Luke-Jr 2014-09-02 16:07:04 UTC
1. armv7a-softfloat-linux-gnueabi-emerge dev-libs/DirectFB dev-libs/jansson dev-libs/protobuf-c net-libs/zeromq (NOTE: will need fix from bug #432106 and bug #518440 for protobuf-c)
2. git clone https://github.com/luke-jr/freeabode.git
3. cd freeabode
4. autoreconf -if
5. ./configure --host=armv7a-softfloat-linux-gnueabi
6. make

Above will fail because it fails to find libc.
Further analysis (attaching a debugger to ld) reveals this is because the search is prepending /usr/armv7a-softfloat-linux-gnueabi to the path of /usr/lib/gcc/armv7a-softfloat-linux-gnueabi/4.8.3/ where it actually exists.
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2018-04-07 17:00:31 UTC
(In reply to Luke-Jr from comment #3)
> 1. armv7a-softfloat-linux-gnueabi-emerge dev-libs/DirectFB dev-libs/jansson
> dev-libs/protobuf-c net-libs/zeromq (NOTE: will need fix from bug #432106
> and bug #518440 for protobuf-c)
> 2. git clone https://github.com/luke-jr/freeabode.git
> 3. cd freeabode
> 4. autoreconf -if
> 5. ./configure --host=armv7a-softfloat-linux-gnueabi
> 6. make
> 
> Above will fail because it fails to find libc.
> Further analysis (attaching a debugger to ld) reveals this is because the
> search is prepending /usr/armv7a-softfloat-linux-gnueabi to the path of
> /usr/lib/gcc/armv7a-softfloat-linux-gnueabi/4.8.3/ where it actually exists.

Please attach actual command that fails and it's output if it's still an issue.
Comment 5 Luke-Jr 2018-04-07 17:51:50 UTC
You're replying to the actual command that failed... Whether it's still an issue or not, I don't know, because I found a workaround and moved on.
Comment 6 Luke-Jr 2018-04-07 18:05:40 UTC
Created attachment 526816 [details]
build log
Comment 7 Sergei Trofimovich (RETIRED) gentoo-dev 2018-04-07 18:28:48 UTC
(In reply to Luke-Jr from comment #5)
> You're replying to the actual command that failed... Whether it's still an
> issue or not, I don't know, because I found a workaround and moved on.

By "actual command" I meant what gcc executes and what it gets back.

Thanks for the build log!

The relevant failure here is:

/usr/libexec/gcc/armv7a-softfloat-linux-gnueabi/ld: warning: libstdc++.so.6, needed by /usr/armv7a-softfloat-linux-gnueabi/usr/lib/libzmq.so, not found (try using -rpath or -rpath-link)
/usr/armv7a-softfloat-linux-gnueabi/usr/lib/libzmq.so: undefined reference to `__gxx_personality_v0@CXXABI_1.3'
/usr/armv7a-softfloat-linux-gnueabi/usr/lib/libzmq.so: undefined reference to `std::__throw_logic_error(char const*)@GLIBCXX_3.4'
...

Which is bug #291383 (no libstdc++ installed in $SYSROOT).

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