0

I was trying to cross-compile from a Debian PC for a BeagleBone Black, and i was able to build an "hello-world" sample, and build the wxWidgets, but when i compiled a wxWidgets app (the "minimal" sample) i failed, 'cause i've not been able to find how to get and link the needed libraries for armhf (GTK+, X11, etc... see my question here)

I've found a page explaining how to use BuildRoot to compile for a Raspberry, so i took that route and i was able to configure and make a "host" which compiled the wxWidgets first, and the "minimal" sample app next.

Problem is that on my BBB it does'nt run 'cause different gclib version

debian@beaglebone:~$ ./minimal
./minimal: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.28' not found (required by ./minimal)

debian@beaglebone:~$ ldd --version
ldd (Debian GLIBC 2.24-11+deb9u3) 2.24
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

So, i'm again bashing my head against a wall. What options should i use in BuildRoot to be able to use the same gcc (and all the required libraries, which i don't know to what should i look) that are present in my BBB?

Linux version 4.9.88-ti-r111 (root@b9-am57xx-beagle-x15-2gb) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ) #1 SMP PREEMPT Sun Apr 22 08:04:34 UTC 2018
gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
Parduz
  • 662
  • 5
  • 22

1 Answers1

0

It sounds like you are building with one environment and running in a different environment.

That's akin to compiling on one distro and trying to run on another distro.
Or even compiling on one distro release and using another to run - e.g. Debian Jessie vs. Stretch.

Further evidence is that you mention:

  • BuildRoot as your build environment
  • debian@beaglebone and ldd (Debian GLIBC 2.24-11+deb9u3) 2.24

The fundamental version conflict is that BuildRoot and Debian 9 use different versions of libc (and other libraries)

The proper way to address this is by building inside a matching environment. In this case that would be Debian 9 - either as distro proper or at least as a chroot. The package that you should install is:
crossbuild-essential-armhf
That will get you the necessary tool-chains and dependencies.

TBR
  • 2,790
  • 1
  • 12
  • 22
  • I think i'm not able to undertand what you're telling me, sorry. Should i install and use that package INSTEAD of build root? I've already done it, and it fails compiling the wxWidgets samples 'cause it can't find a lot of librearies (pango, gtk2, X11, etc) If instead you're saying that that was a package that BuildRoot should use to create the toolchain, then i don't know how to set BuildRoot to do it. – Parduz May 31 '19 at 10:45
  • 1
    That's exactly what @TBR is saying. And indeed, you'll also have to build all those dependencies. However, instead of building them you can install the multiarch development packages by adding `armhf` as one of the architectures on your Debian build machine. – Arnout May 31 '19 at 11:10