0

I would like to distribute my application in binary format. However, as I compile on Fedora 30 (which has glibc-2.29) my binary and required dependencies have multiple references to symbols in glibc-2.29. There seems to be too many to effectively (and occur deep in system dependencies) use something like the following:

__asm__(".symver logf,logf@GLIBC_2.2.5");

I have therefore been trying to build a glibc cross compiler. As I need to compile lots of dependencies (Xorg, OpenGL etc) I thought it would be easier to use Buildroot. Unfortunately, Buildroot 2019.05 seems to automatically use glibc-2.29 and there appears not to be an option in make menuconfig to change this.

Is there a way to force Buildroot to use glibc-2.24? I would much prefer not to have to compile on a distribution tracking an older glibc.

Luca Ceresoli
  • 1,591
  • 8
  • 19
Amanda
  • 321
  • 2
  • 12

2 Answers2

0

I think you can try older buildroot version. But I am not sure which one uses glibc-2.24.

Mr Pang
  • 1,083
  • 1
  • 8
  • 20
0

Solution 1:

Use the toolchain used originally to produce the root filesystem (or distribution) where your application must run.

This way you will have the same glibc version and the same version of all other libraries.

Solution 2:

Build your application statically. But you have to check if client/server components (such as Xorg) can work with a server version different from the client version.

Other solutions:

If those not possible, you might want to try one of the following:

  • Use Buildroot 2017.08. Glibc was bumped to 2.26 in 2017.11.
  • Build a toolchain with Crosstool-NG, which supports many glibc versions, then use it in Buildroot as an external toolchain and build all the libraries you need.

But they could add more problems than they solve, since you'll still need to find a Buildroot version that has all the libraries at a version compatible with your target.

Luca Ceresoli
  • 1,591
  • 8
  • 19
  • Thanks. I have been trying to use Buildroot with an external toolchain but it's causing various problems. Ultimately, I think it is going to be easier to build release distributions on an older Linux distro. – Amanda Jun 23 '19 at 18:44