Ubuntu 18.04:跨平台编译期间加载共享库时出错:libstdc++.so.6

Ubuntu 18.04:跨平台编译期间加载共享库时出错:libstdc++.so.6

在 Ubuntu 18.04 上进行交叉编译时我遇到了非常奇怪的错误:

“arm-hisiv400-linux-gnueabi-g++:加载共享库时出错:libstdc++.so.6:无法打开共享对象文件:没有此文件或目录”

我已确保 libstdc++.so.6 确实已安装:

user@ubuntu:~$ ll trunk/artifacts/toolchain/arm3536/arm-hisiv400-linux/arm-hisiv400-linux-gnueabi/lib/
lrwxrwxrwx  1 user user      19 Jan 29 18:18 libstdc++.so -> libstdc++.so.6.0.19*
lrwxrwxrwx  1 user user      19 Jan 29 18:18 libstdc++.so.6 -> libstdc++.so.6.0.19*
-rwxr-xr-x  1 user user 5206303 Jan 29 18:18 libstdc++.so.6.0.19*

这是编译错误:

make[1]: Entering directory '/home/user/trunk/common/app/W32Linux'
arm-hisiv400-linux-gnueabi-g++ -c -g -DNDEBUG -DARM  -I../W32Linux   -DLINUX -DLINUX_2_6 -D_THREAD_SAFE -D_GNU_SOURCE -I.. -ISrc  -ffast-math -fsigned-char -fauto-inc-dec -fcprop-registers -fdce -fdefer-pop -fdse -fguess-branch-probability -fif-conversion2 -fif-conversion -finline-small-functions -fipa-pure-const -fipa-reference -fmerge-constants -fsplit-wide-types -ftree-ccp -ftree-ch -ftree-copyrename -ftree-dce -ftree-dominator-opts -ftree-dse -ftree-fre -ftree-sra -ftree-ter -funit-at-a-time -fomit-frame-pointer -fthread-jumps -falign-functions -falign-jumps -falign-loops -falign-labels -fcaller-saves -fcrossjumping -fcse-follow-jumps -fcse-skip-blocks -fdelete-null-pointer-checks -fexpensive-optimizations -fgcse -fgcse-lm -foptimize-sibling-calls -fpeephole2 -fregmove -freorder-blocks -freorder-functions -frerun-cse-after-loop -fsched-interblock -fsched-spec -fschedule-insns -fschedule-insns2 -fstrict-aliasing -fstrict-overflow -ftree-pre -ftree-vrp -std=c++0x -march=armv7-a -mfloat-abi=softfp -mfpu=neon-vfpv4 -mno-unaligned-access -fno-aggressive-loop-optimizations  -Wno-invalid-offsetof  -Wno-write-strings  -Wno-psabi -o arm3536_release/CriticalSection.o Src/CriticalSection.cpp
arm-hisiv400-linux-gnueabi-g++: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
../Makefile.rules:347: recipe for target 'arm3536_release/CriticalSection.o' failed
make[1]: *** [arm3536_release/CriticalSection.o] Error 127
make[1]: Leaving directory '/home/user/trunk/common/app/W32Linux'
Makefile.rules:359: recipe for target 'W32Linux' failed
make: *** [W32Linux] Error 2

有什么想法吗?谢谢

相关内容