Summary: | dev-db/sqlite[icu] failed to link; libstdc++.so.6 not found | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Simon Maurer <mauresim> |
Component: | [OLD] Development | Assignee: | Arfrever Frehtes Taifersar Arahesis <arfrever.fta> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | proxy-maint |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=478490 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
patch file for fixing linker error with cross compiler
the build log for the unmodified ebuild |
This looks incorrect, as it shouldn't be needed. Attach full build log from that cross compiling and output of 'ldd -r' on the lib created in such build. Created attachment 350494 [details]
the build log for the unmodified ebuild
if I use arm-linux-gnueabi-g++ instead of arm-linux-gnueabi-gcc it works.
(In reply to Simon Maurer from comment #2) > Created attachment 350494 [details] > the build log for the unmodified ebuild > > if I use arm-linux-gnueabi-g++ instead of arm-linux-gnueabi-gcc it works. Did you noticed, that the log basically says it's icu that's broken, not sqlite ? ...or rather your environment. It says that libicui18n and libicuuc link to libstdc++, but ld can't find it within the paths it searches. Yes because it is linked with gcc. http://stackoverflow.com/questions/5853664/whats-the-difference-between-gcc-and-g-gcc-c Another solution could be to patch the configure script, so g++ is used for linking instead of gcc. (In reply to Simon Maurer from comment #5) > Yes because it is linked with gcc. > > > http://stackoverflow.com/questions/5853664/whats-the-difference-between-gcc- > and-g-gcc-c :roll: No, because your cross environment isn't set up correctly. In case of native builds, gcc-config sets up an entry in /etc/ld.so.conf.d/ for gcc. Your arm-linux-gnueabi prefix seems to fail to do anything alike. Thank you for your help, i finally figured it out. You were right. Here is the complete solution for the problem: -create a symlink for the gcc libraries. mkdir /usr/arm-linux-gnueabi/usr/lib/gcc cd /usr/arm-linux-gnueabi/usr/lib/gcc/ ln -s /usr/lib/gcc/arm-linux-gnueabi arm-linux-gnueabi -add the ld path to the environment echo "LDPATH=/usr/lib/gcc/arm-linux-gnueabi/4.7.3" > /usr/arm-linux-gnueabi/etc/env.d/05gcc-arm-linux-gnueabi update the environment and check if the LDPATH was added to /usr/arm-linux-gnueabi/etc/ld.so.conf |
Created attachment 350414 [details, diff] patch file for fixing linker error with cross compiler sqlite is linked with gcc, but icu is a cpp library, which needs libstdc++. This bug only appeared when I use an arm cross-compiler. Somehow it worked with x86_64-pc-linux-gnu-gcc, but the patch should fix the problem anyway.