relocation R_AARCH64_ADR_PREL_PG_HI21 against external symbol `__stack_chk_guard@@GLIBC_2.17' while cross complile
-
Hello,
I'm trying to cross compile qt 5.15.2 for my Asus tinkerboard 2S.
I have download the gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu toolchain, done the rsync with my board for create the sysroot and download the qt souce code. After adjust the broken symbolik link I have execute the following command for configure the build:
sudo /opt/qt5tinker/qt-everywhere-src-5.15.2/configure -device linux-tinkerboard-g++ -prefix /opt/QT -sysroot /opt/qt5tinker/sysroot/ -opensource -confirm-license -optimized-qmake -release -make libs -no-pch -nomake examples -nomake tests -xcb -vWhen it's done I have executed the make command for build the qt but it return to me this error:
/opt/qt5tinker/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/7.5.0/../../../../aarch64-linux-gnu/bin/ld: /opt/qt5tinker/sysroot//usr/lib/aarch64-linux-gnu/libpthread.a(pthread_create.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against external symbol
__stack_chk_guard@@GLIBC_2.17' can not be used when making a shared object; recompile with -fPIC /opt/qt5tinker/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/7.5.0/../../../../aarch64-linux-gnu/bin/ld: /opt/qt5tinker/sysroot//usr/lib/aarch64-linux-gnu/libpthread.a(pthread_create.o)(.text+0x4dc): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol
__stack_chk_guard@@GLIBC_2.17'
/opt/qt5tinker/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/7.5.0/../../../../aarch64-linux-gnu/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:1228: ../../lib/libQt5Core.so.5.15.2] Error 1
make[3]: Leaving directory '/opt/qt5tinker/build/qtbase/src/corelib'
make[2]: *** [Makefile:225: sub-corelib-make_first] Error 2
make[2]: Leaving directory '/opt/qt5tinker/build/qtbase/src'
make[1]: *** [Makefile:51: sub-src-make_first] Error 2
make[1]: Leaving directory '/opt/qt5tinker/build/qtbase'
make: *** [Makefile:88: module-qtbase-make_first] Error 2Why I have this error? How can I resolve it?