[Buildroot] crosstool/buildroot ldconfig failure in "target-finalize" during build using Fedora 13

Darcy Watkins dwatkins at tranzeo.com
Fri Aug 6 16:08:14 UTC 2010

On Fri, 2010-08-06 at 08:49 -0700, Darcy Watkins wrote:
> Hello,
> After upgrading my build machine from Fedora 10 to Fedora 13 it appears
> that the host's "ldconfig" command is no longer usable for cross build
> application.  The build thus fails when it attempts to execute
> /sbin/ldconfig during the "target-finalize" stage.
> When building using the internal toolchain generated by buildroot, I do
> not see an issue.  When using an external toolchain such as crosstool-ng
> it shows up.
> To work around the issue I pulled in the July 26th changeset to the
> Makefile to check for and use a $(TARGET_CROSS)ldconfig and then I
> modified my copy of crosstool (version 1.7.2) so that it would install
> the cross ldconfig along with its cross ldd.  That gets me working fine
> for uclibc builds.

FYI - the change I applied to crosstool-ng 1.7.2 is...

--- a/scripts/build/libc/uClibc.sh
+++ b/scripts/build/libc/uClibc.sh
@@ -176,8 +176,9 @@ do_libc() {
              ${CT_LIBC_UCLIBC_VERBOSITY}    \
              -C utils hostutils

-        CT_DoLog EXTRA "Installing C library cross-ldd"
+        CT_DoLog EXTRA "Installing C library cross-ldd (and cross-ldconfig)"
         CT_DoExecLog ALL install -m 0755 utils/ldd.host "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ldd"
+        CT_DoExecLog ALL install -m 0755 utils/ldconfig.host "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ldconfig"


... and the change from July 26 I applied is at ...


I only used the change to Makefile since I never applied the earlier
related changes that are being undone in package/Makefile.in.



> When I tried a glibc build, there is no cross ldconfig available.
> I also notice that in crosstool 1.8.0 the cross ldd is replaced by a
> script so the cross ldconfig may not even be available (I don't know for
> sure since so far I have only seen the notes in the changelog and
> haven't actually tried crosstool 1.8.0 yet).
> It appears to me that the assumption an external toolchain will provide
> a cross ldconfig is not valid and the assumption that the host ldconfig
> is usable as a cross tool in the absence of this is no longer valid.
> Since it is the buildroot "target-finalize" that needs a usable ldconfig
> I figure it is appropriate to raise this matter here for discussion
> first.
> Anyone have suggestions as to how best to approach this?
> Regards,
> Darcy

More information about the buildroot mailing list