0
我編譯上運行Ubuntu 16.04.1的odroidC2板(armv8-64bit)一些文件,我得到了以下錯誤:誤差與LD編譯:__stack_chk_guard @@ GLIBC_2.17
[email protected]:~/flext-master/tutorial/simple1$ g++ -fPIC -L/usr/lib -pthread -shared -Wl,-S -L/usr/local/src/pd/bin -L/usr/local/lib -o pd-linux/release-single/simple1.pd_linux pd-linux/release-single/main.opp -lflext-pd_s
/usr/bin/ld: /usr/local/lib/libflext-pd_s.a(libflext_pd_s_la-flxlet.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against external symbol `[email protected]@GLIBC_2.17' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libflext-pd_s.a(libflext_pd_s_la-flxlet.o)(.text+0x344): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `[email protected]@GLIBC_2.17'
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
由於您可以看到-fPIC選項存在。所以我不明白爲什麼編譯器建議「用-fPIC重新編譯」。任何想法?
你是如此的正確,謝謝 –