鏈結時缺少stdc so 6庫

2021-10-05 08:36:26 字數 1151 閱讀 6039

問題描述:演算法同事給了dsp同事新的演算法庫(一堆),dsp同事把需要的拿出來,編譯報了一堆錯:

/opt/hisi-linux/x86-arm/arm-hisiv300-linux/bin/../lib/gcc/arm-hisiv300-linux-uclibcgnueabi/4.8.3/../../../../arm-hisiv300-linux-uclibcgnueabi/bin/ld: warning: libstdc++.so.6, needed by ../lib/libicf/osal.so, not found (try using -rpath or -rpath-link)

/opt/hisi-linux/x86-arm/arm-hisiv300-linux/bin/../lib/gcc/arm-hisiv300-linux-uclibcgnueabi/4.8.3/../../../../arm-hisiv300-linux-uclibcgnueabi/bin/ld: warning: libhive_common.so, needed by ../lib/libicf/third_party/lib_hi3536_single_v300/libhive_aec.so, not found (try using -rpath or -rpath-link)

../lib/libicf/libicf_hisi3536.a(icf_toolkit.o):在函式『icf_setcoreaffinity』中:

icf_toolkit.cpp:(.text+0x328):對『__cxa_end_cleanup』未定義的引用

最後看到target的編譯規則:

$(target)

: $(obj)

$(cc) $(cflags) -o $@ $(obj) -lstdc++ -lpthread -ldl -lm -rdynamic $(ld_flags)

-rm -f $(obj)

最後才意識到gcc編譯時庫stdc++應該手動加進來,指令碼加一下就通過了:

$(bin)

: $(objs)

$(compile_tools) -wl,-map=$(bin_map) -o $@ $(objs) $(ldflags) -lstdc++ $(libs)

缺少動態鏈結庫錯誤修復

缺少動態鏈結庫錯誤修復 root test02 bin memcached h.memcached error while loading shared libraries libevent 2.0.so.5 cannot open shared object file no such file o...

缺少動態鏈結庫錯誤修復

缺少動態鏈結庫錯誤修復 安裝memcached時候遇到缺少動態鏈結庫錯誤 1 root test02 bin memcached h 1 2 memcached error while loading shared libraries libevent 2.0.so.5 cannot open sh...

缺少libstdc so 6庫的原因及解決辦法

問題原因 系統是64bit,該庫是32bit的,在64bit系統上安裝32bit庫 解決辦法 1.檢視哪個安裝包包含該庫 yum provides libstdc so.6 yum install libstdc 4.8.5 11.el7.i686 root localhost cn telecom...