admin管理员组

文章数量:1313347

I have compiled my-very-own cross-toolchain with ct-ng.

I used the most recent GCC:

$ aarch64-myown-linux-gnu-g++ (crosstool-NG 1.27.0_rc1.1_0842e65 - MyOwn Toolchain Builder v1.0) 14.2.0
Copyright (C) 2024 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.

As you can see, it used GCC 14.2.0, which is using GLIBCXX_3.4.32.

I compiled the basic helloworld sample, and it is not running on my target:

$ ./helloworld
./helloworld: /lib/aarch64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.32' not found (required by ./helloworld)

On my target:

$ strings /lib/aarch64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBCXX_3.4.27
GLIBCXX_3.4.28
GLIBCXX_3.4.29
GLIBCXX_3.4.30
GLIBCXX_DEBUG_MESSAGE_LENGTH

Having the 3.4.30, I should have used GCC 12.2.0.

Now I have two options:

  1. recompile the cross-toolchain with GCC 12.2.0 OR
  2. update libstdc++.so on target

Both seems feasible, but out of curiosity: which is the "supposed" way?

Asking this, especially because I had problems earlier (not with my toolchain) with GLIBC version, which is then turned out that it's highly recommended to avoid downgrading/installing an older one to build for older targets.

So which one is better/more recommended?

本文标签: gGLIBCXX343239 not found update libstdc or rebuild toolchainStack Overflow