Qt5.15 crosscompile error cannot find Crt1.o, crti.o, crtbegin,-lstdc++
-
Hi,
Am trying to cross-compile Qt 5.15 using below configure line and yocto sdk:
./configure -opensource -release -confirm-license -optimized-qmake -reduce-exports -opengl es2 -sql-sqlite -skip qtwebview -skip qtwebengine -no-gcc-sysroot -sysroot /home/target/yocto_sdk_nodistro_oecore-x86_64/sysroots/armv7ahf-neon-oe-linux-gnueabi/usr/lib -device arm-linux-gnueabihf-g++ -device-option CROSS_COMPILE=/home/target/yocto_sdk_nodistro_oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi- -DQT_ARCH_ARM -prefix /usr -v
/home/target/yocto_sdk_nodistro_oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-g++ -mfloat-abi=hard -Wl,-O1 -o verifyspec verifyspec.o -lrt -lpthread -ldl
/home/target/yocto_sdk_nodistro_oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/7.3.0/real-ld: cannot find crt1.o: No such file or directory
/home/target/yocto_sdk_nodistro_oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/7.3.0/real-ld: cannot find crti.o: No such file or directory
/home/target/yocto_sdk_nodistro_oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/7.3.0/real-ld: cannot find crtbegin.o: No such file or directory
/home/target/yocto_sdk_nodistro_oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/7.3.0/real-ld: cannot find -lrt
/home/target/yocto_sdk_nodistro_oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/7.3.0/real-ld: cannot find -lpthread
/home/target/yocto_sdk_nodistro_oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/7.3.0/real-ld: cannot find -ldl
/home/target/yocto_sdk_nodistro_oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/7.3.0/real-ld: cannot find -lstdc++
/home/target/yocto_sdk_nodistro_oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/7.3.0/real-ld: cannot find -lm
/home/target/yocto_sdk_nodistro_oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/7.3.0/real-ld: cannot find -lgcc_s
/home/target/yocto_sdk_nodistro_oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/7.3.0/real-ld: cannot find -lgcc
/home/target/yocto_sdk_nodistro_oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/7.3.0/real-ld: cannot find -lc
/home/target/yocto_sdk_nodistro_oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/7.3.0/real-ld: cannot find -lgcc_s
/home/target/yocto_sdk_nodistro_oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/7.3.0/real-ld: cannot find -lgcc
/home/target/yocto_sdk_nodistro_oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/7.3.0/real-ld: cannot find crtend.o: No such file or directory
/home/target/yocto_sdk_nodistro_oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/7.3.0/real-ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status
Makefile:68: recipe for target 'verifyspec' failed
make: *** [verifyspec] Error 1
Note: Also available for Linux: linux-clang linux-iccERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken.
Any suggestions are appreciated.
-
Hi,
I might be wrong but doesn't yocto already provide support to build Qt SDKs ?
-
Yes with yocto recipe, it gives below errors:
arm-oe-linux-gnueabi-g++ -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard --sysroot=/home/target/yocto/qt5/build/tmp/work/armv7at2hf-neon-oe-linux-gnueabi/qtbase/5.15.2+gitAUTOINC+3a6d8df521-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/home/target/yocto/qt5/build/tmp/work/armv7at2hf-neon-oe-linux-gnueabi/qtbase/5.15.2+gitAUTOINC+3a6d8df521-r0/recipe-sysroot -Wl,-O1 -o libdl main.o
/home/target/yocto/qt5/build/tmp/work/armv7at2hf-neon-oe-linux-gnueabi/qtbase/5.15.2+gitAUTOINC+3a6d8df521-r0/recipe-sysroot-native/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/9.3.0/ld: main.o: in function `main':/home/target/yocto/qt5/build/tmp/work/armv7at2hf-neon-oe-linux-gnueabi/qtbase/5.15.2+gitAUTOINC+3a6d8df521-r0/recipe-sysroot-native/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/9.3.0/ld: main.o: in function
main': /usr/src/debug/qtbase/5.15.2+gitAUTOINC+3a6d8df521-r0/build/config.tests/libdl/main.cpp:7: undefined reference to
dlopen'/usr/src/debug/qtbase/5.15.2+gitAUTOINC+3a6d8df521-r0/build/config.tests/libdl/main.cpp:7: undefined reference to
dlopen' /home/target/yocto/qt5/build/tmp/work/armv7at2hf-neon-oe-linux-gnueabi/qtbase/5.15.2+gitAUTOINC+3a6d8df521-r0/recipe-sysroot-native/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/9.3.0/ld: /usr/src/debug/qtbase/5.15.2+gitAUTOINC+3a6d8df521-r0/build/config.tests/libdl/main.cpp:7: undefined reference to
dlclose'/home/target/yocto/qt5/build/tmp/work/armv7at2hf-neon-oe-linux-gnueabi/qtbase/5.15.2+gitAUTOINC+3a6d8df521-r0/recipe-sysroot-native/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/9.3.0/ld: /usr/src/debug/qtbase/5.15.2+gitAUTOINC+3a6d8df521-r0/build/config.tests/libdl/main.cpp:7: undefined reference to
dlclose' /home/target/yocto/qt5/build/tmp/work/armv7at2hf-neon-oe-linux-gnueabi/qtbase/5.15.2+gitAUTOINC+3a6d8df521-r0/recipe-sysroot-native/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/9.3.0/ld: /usr/src/debug/qtbase/5.15.2+gitAUTOINC+3a6d8df521-r0/build/config.tests/libdl/main.cpp:8: undefined reference to
dlsym'/home/target/yocto/qt5/build/tmp/work/armv7at2hf-neon-oe-linux-gnueabi/qtbase/5.15.2+gitAUTOINC+3a6d8df521-r0/recipe-sysroot-native/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/9.3.0/ld: /usr/src/debug/qtbase/5.15.2+gitAUTOINC+3a6d8df521-r0/build/config.tests/libdl/main.cpp:8: undefined reference to
dlsym' /home/target/yocto/qt5/build/tmp/work/armv7at2hf-neon-oe-linux-gnueabi/qtbase/5.15.2+gitAUTOINC+3a6d8df521-r0/recipe-sysroot-native/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/9.3.0/ld: /usr/src/debug/qtbase/5.15.2+gitAUTOINC+3a6d8df521-r0/build/config.tests/libdl/main.cpp:9: undefined reference to
dlerror'/home/target/yocto/qt5/build/tmp/work/armv7at2hf-neon-oe-linux-gnueabi/qtbase/5.15.2+gitAUTOINC+3a6d8df521-r0/recipe-sysroot-native/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/9.3.0/ld: /usr/src/debug/qtbase/5.15.2+gitAUTOINC+3a6d8df521-r0/build/config.tests/libdl/main.cpp:9: undefined reference to `dlerror'
collect2: error: ld returned 1 exit statusThe configure line is as follows:
/home/target/yocto/qt5/build/tmp/work/armv7at2hf-neon-oe-linux-gnueabi/qtbase/5.15.2+gitAUTOINC+3a6d8df521-r0/git/configure -v
-opensource -confirm-license
-sysroot /home/target/yocto/qt5/build/tmp/work/armv7at2hf-neon-oe-linux-gnueabi/qtbase/5.15.2+gitAUTOINC+3a6d8df521-r0/recipe-sysroot
-prefix /usr
-bindir /usr/bin
-libdir /usr/lib
-datadir /usr/share
-sysconfdir /etc
-docdir /usr/share/doc
-headerdir /usr/include
-archdatadir /usr/lib
-libexecdir /usr/lib/libexec
-plugindir /usr/lib/plugins
-qmldir /usr/lib/qml
-translationdir /usr/share/translations
-testsdir /usr/share/tests
-examplesdir /usr/share/examples
-hostprefix /home/target/yocto/qt5/build/tmp/work/armv7at2hf-neon-oe-linux-gnueabi/qtbase/5.15.2+gitAUTOINC+3a6d8df521-r0/recipe-sysroot-native
-hostlibdir /home/target/yocto/qt5/build/tmp/work/armv7at2hf-neon-oe-linux-gnueabi/qtbase/5.15.2+gitAUTOINC+3a6d8df521-r0/recipe-sysroot/usr/lib
-hostbindir /usr/bin
-external-hostbindir /home/target/yocto/qt5/build/tmp/work/armv7at2hf-neon-oe-linux-gnueabi/qtbase/5.15.2+gitAUTOINC+3a6d8df521-r0/recipe-sysroot-native/usr/bin
-hostdatadir /home/target/yocto/qt5/build/tmp/work/armv7at2hf-neon-oe-linux-gnueabi/qtbase/5.15.2+gitAUTOINC+3a6d8df521-r0/recipe-sysroot/usr/lib
-platform linux-oe-g++
-xplatform linux-oe-g++
-no-use-gold-linker -shared -silent -no-pch -no-rpath -pkg-config -accessibility -no-cups -no-dbus -no-directfb -no-eglfs -no-evdev -nomake examples -fontconfig -system-freetype -no-gbm -no-feature-getentropy -no-gif -glib -no-gtk -system-harfbuzz -no-ico -no-iconv -icu -no-journald -system-libjpeg -no-kms -no-libinput -system-libpng -no-libproxy -make libs -linuxfb -trace no -no-mtdev -no-opengl -no-openssl -system-pcre -qreal float -release -no-sm -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -system-sqlite -plugin-sql-sqlite -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-sql-tds -shared -make tests -nomake tools -tslib -libudev -no-vulkan -widgets -no-xcb -no-xcb-xinput -no-xkb -no-xkbcommon -no-xkbcommon -system-zlib
} -
There might be a misunderstanding between the two of us. Are you trying to cross-compile Qt 5 yourself or are you using a yocto recipe ?