Bug 6452

Summary: eglibc from Linaro 2013.07 not copied to target correctly
Product: buildroot Reporter: henry
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: major CC: buildroot
Priority: P5    
Version: 2013.05   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
Host: Target:
Build:
Attachments: Preserve toolchain sysroot lib's directory structure on target

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.