2

I am cross compiling an application for an embedded device (Moxa UC-8100), and I am running into a version issue with GLIBC.

I installed Debian 9 (as instructed by the supplier of the embedded device) and using the arm-linux-gnueabihf toolchain. When running my build on the device, it says

moxa@Moxa:~$ ./fabs-uc8100 -h
./fabs-uc8100: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.17' not found (required by ./fabs-uc8100)
./fabs-uc8100: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.16' not found (required by ./fabs-uc8100)

When I run ldd --version, on the device, I can see it has version 2.13:

moxa@Moxa:~$ ldd --version
ldd (Debian EGLIBC 2.13-38+deb7u8) 2.13

So, the issue is clear (my program was built with 2.16, but I have 2.13 available), but how do I fix this?

Update I installed the crosscompile toolchain using standard Debian packages, including some Moxa packages, on a Debian 9 64-bit VM:

Added deb http://debian.moxa.com/debian stretch main contrib non-free to /etc/apt/sources.list.d/moxa.sources.list, then:

user@Linux:~$ apt-get install moxa-archive-keyring
user@Linux:~$ dpkg --add-architecture armhf
user@Linux:~$ apt-get install crossbuild-essential-armhf
user@Linux:~$ apt-get install libssl-dev:armhf
Bart Friederichs
  • 33,050
  • 15
  • 95
  • 195

2 Answers2

0

how do I fix this?

You need to install EGLIBC-2.13 on the build host and configure your cross-compiler to use it (obviously it's currently using GLIBC-2.17 or later).

Since you provided no details about the origin of your cross-compiler or the build setup, you can't expect someone to be able to tell you exactly what's wrong with your current setup.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362
0

According to this thread found on a Linaro mailing-list, you may have a chance with gcc-linaro-arm-linux-gnueabi-2012.03-20120326_linux.tar.bz2 available here:

wget http://releases.linaro.org/archive/12.03/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabi-2012.03-20120326_linux.tar.bz2
tar jxf gcc-linaro-arm-linux-gnueabi-2012.03-20120326_linux.tar.bz2

gcc-linaro-arm-linux-gnueabi-2012.03-20120326_linux/bin/arm-linux-gnueabi-gcc --version
arm-linux-gnueabi-gcc (crosstool-NG linaro-1.13.1-2012.03-20120326 - Linaro GCC 2012.03) 4.6.3
Copyright (C) 2011 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.

strings gcc-linaro-arm-linux-gnueabi-2012.03-20120326_linux/arm-linux-gnueabi/libc/lib/arm-linux-gnueabi/libc.so.6 | grep 2.13
GLIBC_2.13
GNU C Library (Ubuntu EGLIBC 2.13-20ubuntu5) stable release version 2.13, by Roland McGrath et al.
2.13
NPTL 2.13
glibc 2.13
libc-2.13.so

If you are using a Linux x86_64 system, you may need to add the packages required for executing x86 binaries in the case they would not be already installed - I am using Ubuntu 20.04.3 LTS.

Frant
  • 5,382
  • 1
  • 16
  • 22