Bug 6452 - eglibc from Linaro 2013.07 not copied to target correctly
Summary: eglibc from Linaro 2013.07 not copied to target correctly
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2013.05
Hardware: Other Linux
: P5 major
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-14 05:11 UTC by henry
Modified: 2013-10-30 21:54 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
Preserve toolchain sysroot lib's directory structure on target (1.12 KB, application/octet-stream)
2013-08-14 05:11 UTC, henry
Details

Note You need to log in before you can comment on or make changes to this bug.
Description henry 2013-08-14 05:11:40 UTC
Created attachment 5042 [details]
Preserve toolchain sysroot lib's directory structure on target

When building buildroot with Linaro 2013.07 (configured as external or custom tool), the target would fail to come up, with error:

/sbin/init: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

The reason is that starting with Linaro 2013.07, they switched to eglibc-2.17 with multi-arch support. Arch-specific libraries, including libc.so.6, are expected to be in /lib/arm-linux-gnueabihf/ instead of just /lib. However, copy_toolchain_lib_root() in helper.mk would end up copying them to /lib rather than arch-specific directories.

Attached is my own patch to preserve the toolchain sysroot's lib directory structure, except for SUPPORT_LIB_DIR which are still copied directly under DESTDIR.
Comment 1 Jaap Crezee 2013-10-02 13:20:54 UTC
I am having the same issue with the current master of buildroot-git. When building binaries with the linaro toolchain, generated binaries expect libc.so.6 to be in /lib/arm-linux-gnueabihf/ but they are only copied to /lib .
A simple symlink also resolves the issue, but I argue with myself if this is correct...
Comment 2 Thomas Petazzoni 2013-10-06 14:32:41 UTC
I've sent a fix for this problem as part of the patch set at http://lists.busybox.net/pipermail/buildroot/2013-October/079647.html.
Comment 3 Thomas Petazzoni 2013-10-30 21:54:18 UTC
This has now been fixed in the latest master by adding a symlink in /lib. Another fix was needed to create a symlink in /usr/lib, and this patch is pending in the for-peter-2013.11 branch. Marking this bug as fixed.