-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ubuntu bazel编译报错 #438
Comments
buntu22.04,gcc 11.4.0,g++ 11.4.0,bazel 7.4.1,bazelisk 1.20.0 |
编译执行命令是什么? |
bazel build //yacl/... |
GLIBCXX_3.4.21 = GCC 5.1.0 see: https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html 请检查一下你系统里面的 gcc 版本以及对应的 libstdc++.so.6 版本,建议至少 GCC 11.1.0: libstdc++.so.6.0.29 这个版本的 |
更新gcc之后,编译成功 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[ 95%] Built target leveldb
[ 97%] Building CXX object CMakeFiles/leveldbutil.dir/db/leveldbutil.cc.o
[100%] Linking CXX executable leveldbutil
/usr/bin/ld: CMakeFiles/leveldbutil.dir/db/leveldbutil.cc.o: undefined reference to symbol '_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc@@GLIBCXX_3.4.21'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/libstdc++.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/leveldbutil.dir/build.make:98: leveldbutil] Error 1
make[1]: *** [CMakeFiles/Makefile2:111: CMakeFiles/leveldbutil.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
_____ END BUILD LOGS _____
rules_foreign_cc: Build wrapper script location: bazel-out/k8-opt/bin/external/leveldb~/libleveldb_foreign_cc/wrapper_build_script.sh
rules_foreign_cc: Build script location: bazel-out/k8-opt/bin/external/leveldb~/libleveldb_foreign_cc/build_script.sh
rules_foreign_cc: Build log location: bazel-out/k8-opt/bin/external/leveldb~/libleveldb_foreign_cc/CMake.log
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 90.395s, Critical Path: 50.86s
INFO: 2938 processes: 1624 internal, 1314 linux-sandbox.
ERROR: Build did NOT complete successfully
The text was updated successfully, but these errors were encountered: