[Buildroot] Error msg while using toolchain compiler

Richard Ash richardashaudacity at googlemail.com
Wed Jun 1 19:17:51 UTC 2022


I would think that the machine on which the error occurs is running a
different Linux distribution / version, and has Glibc 2.13 or older, where
as the building machine has Glibc 2.14 or newer.

As I understand it this error is an error trying to load the shared
libraries needed to execute the x86_64-buildroot-linux-gnu-gcc binary - the
fact that the binary is a compiler has not yet become important, because
it's not possible to load the dynamically linked executable. To confirm
this the OP could run `ldd` on the x86_64-buildroot-linux-gnu-gcc executable
and get a similar "not found" error for the same symbol.
The contents of
x86_64-buildroot-linux-gnu_sdk-buildroot/x86_64-buildroot-linux-gnu/sysroot/lib
is not used at all for this - that is the target sysroot, i.e. the library
set which will be used when the output of this compiler is run on the
target - no help at all to the host, and may be completely incompatible
(e.g. ARM target libraries). The fact that target and host are (maybe?) the
same in this instance is not exploited, they are still treated as separate.

The error is not unexpected - the cross-compiling toolchain is compiled to
run on the system which builds it (host), and makes no special efforts to
be (binary) portable between host environments. relocate-sdk.sh deals with
paths etc. but cannot change the binary linkage. I'm fairly certain that
copying any other binary compiled on the first machine and then copying it
to a second would give the same error, for the same reason.

Richard

On Wed, 1 Jun 2022 at 13:26, Thomas Petazzoni via buildroot <
buildroot at buildroot.org> wrote:

> Hello Reinoud,
>
> On Wed, 1 Jun 2022 02:09:21 +0000
> Reinoud Koornstra <sockstat at hotmail.com> wrote:
>
> > Hello Everyone,
> > I did configure a toolchain to be built (make sdk) and copied and
> extracted the tar ball to another machine.
> > On there I did run relocate-sdk.sh
> >
> > As this toolchain is another one compared to the default gcc installed
> on that machine I specific it by CC= and then make bla bla
> > The error is get is:
> > x86_64-buildroot-linux-gnu-gcc: /lib64/libc.so.6: version `GLIBC_2.14'
> not found (required by x86_64-buildroot-linux-gnu-gcc)
>
> Could you provide more details on how you're using the toolchain?
> Indeed, if incorrect flags are passed to the toolchain, it may cause it
> to look for libraries in /lib.
>
> But if you don't provide more details, we unfortunately can't really
> comment :-/
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
> _______________________________________________
> buildroot mailing list
> buildroot at buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildroot.org/pipermail/buildroot/attachments/20220601/57ceaba0/attachment-0001.html>


More information about the buildroot mailing list