새로 컴파일된 libstdc++에는 버전 기호가 없습니다.

새로 컴파일된 libstdc++에는 버전 기호가 없습니다.

다음 구성으로 GCC 10.1 버전을 컴파일하고 있습니다.

../configure --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/home/user/toolchain/gcc  --enable-checking=release --enable-languages=c,c++,fortran --disable-multilib --enable-shared --enable-gnu-unique-object --with-linker-hash-style=gnu

컴파일이 완료된 후 컴파일된 listdc++에 버전 기호가 없는 것 같습니다. 그래서:

> strings ./x86_64-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6.0.28 | grep GLIBCXX
  GLIBCXX_FORCE_NEW
  GLIBCXX_DEBUG_MESSAGE_LENGTH

(다른 것은 없습니다) (그런데, 설치된 라이브러리를 확인하기 전에 gcc를 "make install"하면 동일한 결과를 얻습니다.)

다른 시스템으로 이동하여 동일한 명령을 실행하십시오(출력이 잘림).

> strings /usr/lib64/libstdc++.so.6.0.28 | grep GLIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.5
[ ... ]
GLIBCXX_3.4.26
GLIBCXX_3.4.27
GLIBCXX_3.4.28
[ ... ]

새로 컴파일된 gcc/libstdc++ 버전에 버전 기호가 표시되지 않는 이유는 무엇입니까?

답변1

실제로 오류가 발견되었습니다. 시스템에 대해 GCC를 구성할 때 libstdc++v3의 config.log에서 다음을 발견했습니다.

configure:74963: WARNING: === Linker version 2501 is too old for
configure:74965: WARNING: === full symbol versioning support in this release of GCC.
configure:74967: WARNING: === You would need to upgrade your binutils to version
configure:74969: WARNING: === 21400 or later and rebuild GCC.
configure:74971: WARNING: === Symbol versioning will be disabled.

(binutils) ld의 새 버전을 컴파일하고 이를 사용하여 gcc를 다시 빌드하면 됩니다.

관련 정보