Qt raspberry pi cross compilation make issue
-
Hello,
I'm following this tutorial to set a virtal machine with Ubuntu 18.04.3 LTS for raspberry pi 3 cross compilation. I follow every step of the tutorial with success except for make.
This is my config (Qt version 5.12.3)
./configure -release -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -skip qtwayland -skip qtlocation -skip qtscript -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -no-use-gold-linker -v -no-gbm
This is make output:
/home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libpthread.a(pthread_create.o): In function `__pthread_create_2_1': /build/glibc-FUvrFr/glibc-2.28/nptl/pthread_create.c:697: undefined reference to `_dl_stack_flags' /home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libpthread.a(unwind.o): In function `unwind_stop': /build/glibc-FUvrFr/glibc-2.28/nptl/unwind.c:72: undefined reference to `__pointer_chk_guard_local' /home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libpthread.a(nptl-init.o): In function `__pthread_initialize_minimal_internal': /build/glibc-FUvrFr/glibc-2.28/nptl/nptl-init.c:434: undefined reference to `_dl_pagesize' /build/glibc-FUvrFr/glibc-2.28/nptl/nptl-init.c:434: undefined reference to `_dl_init_static_tls' /build/glibc-FUvrFr/glibc-2.28/nptl/nptl-init.c:434: undefined reference to `_dl_wait_lookup_done' /home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libpthread.a(nptl-init.o): In function `__pthread_get_minstack': /build/glibc-FUvrFr/glibc-2.28/nptl/nptl-init.c:443: undefined reference to `_dl_pagesize' collect2: error: ld returned 1 exit status Makefile:1149: recipe for target '../../lib/libQt5Core.so.5.12.3' failed make[3]: *** [../../lib/libQt5Core.so.5.12.3] Error 1 make[3]: Leaving directory '/home/edu/raspi/qt-everywhere-src-5.12.3/qtbase/src/corelib' Makefile:199: recipe for target 'sub-corelib-make_first' failed make[2]: *** [sub-corelib-make_first] Error 2 make[2]: Leaving directory '/home/edu/raspi/qt-everywhere-src-5.12.3/qtbase/src' Makefile:50: recipe for target 'sub-src-make_first' failed make[1]: *** [sub-src-make_first] Error 2 make[1]: Leaving directory '/home/edu/raspi/qt-everywhere-src-5.12.3/qtbase' Makefile:82: recipe for target 'module-qtbase-make_first' failed make: *** [module-qtbase-make_first] Error 2
Same error with -device linux-rasp-pi3-g++ .
What i'm doing wrong? Thanks!
-
Hello,
I'm following this tutorial to set a virtal machine with Ubuntu 18.04.3 LTS for raspberry pi 3 cross compilation. I follow every step of the tutorial with success except for make.
This is my config (Qt version 5.12.3)
./configure -release -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -skip qtwayland -skip qtlocation -skip qtscript -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -no-use-gold-linker -v -no-gbm
This is make output:
/home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libpthread.a(pthread_create.o): In function `__pthread_create_2_1': /build/glibc-FUvrFr/glibc-2.28/nptl/pthread_create.c:697: undefined reference to `_dl_stack_flags' /home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libpthread.a(unwind.o): In function `unwind_stop': /build/glibc-FUvrFr/glibc-2.28/nptl/unwind.c:72: undefined reference to `__pointer_chk_guard_local' /home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libpthread.a(nptl-init.o): In function `__pthread_initialize_minimal_internal': /build/glibc-FUvrFr/glibc-2.28/nptl/nptl-init.c:434: undefined reference to `_dl_pagesize' /build/glibc-FUvrFr/glibc-2.28/nptl/nptl-init.c:434: undefined reference to `_dl_init_static_tls' /build/glibc-FUvrFr/glibc-2.28/nptl/nptl-init.c:434: undefined reference to `_dl_wait_lookup_done' /home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libpthread.a(nptl-init.o): In function `__pthread_get_minstack': /build/glibc-FUvrFr/glibc-2.28/nptl/nptl-init.c:443: undefined reference to `_dl_pagesize' collect2: error: ld returned 1 exit status Makefile:1149: recipe for target '../../lib/libQt5Core.so.5.12.3' failed make[3]: *** [../../lib/libQt5Core.so.5.12.3] Error 1 make[3]: Leaving directory '/home/edu/raspi/qt-everywhere-src-5.12.3/qtbase/src/corelib' Makefile:199: recipe for target 'sub-corelib-make_first' failed make[2]: *** [sub-corelib-make_first] Error 2 make[2]: Leaving directory '/home/edu/raspi/qt-everywhere-src-5.12.3/qtbase/src' Makefile:50: recipe for target 'sub-src-make_first' failed make[1]: *** [sub-src-make_first] Error 2 make[1]: Leaving directory '/home/edu/raspi/qt-everywhere-src-5.12.3/qtbase' Makefile:82: recipe for target 'module-qtbase-make_first' failed make: *** [module-qtbase-make_first] Error 2
Same error with -device linux-rasp-pi3-g++ .
What i'm doing wrong? Thanks!
@drazz said in Qt raspberry pi cross compilation make issue:
libpthread.a
It looks like it tries to use static version of pthread lib.
Can you show the compiler/linker call just before first error? -
@jsulm said in Qt raspberry pi cross compilation make issue:
Can you show the compiler/linker call just before first error?
Sure!
/home/edu/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/edu/raspi/sysroot -Wl,--no-undefined -Wl,--version-script,QtCore.version -Wl,-O1 -Wl,--enable-new-dtags -Wl,-rpath-link,/home/edu/raspi/sysroot/opt/vc/lib -Wl,-rpath-link,/home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/home/edu/raspi/sysroot/lib/arm-linux-gnueabihf -shared -Wl,-soname,libQt5Core.so.5 -o libQt5Core.so.5.12.3 .obj/minimum-linux.o .obj/qstring_compat.o .obj/qabstractanimation.o .obj/qvariantanimation.o .obj/qpropertyanimation.o .obj/qanimationgroup.o .obj/qsequentialanimationgroup.o .obj/qparallelanimationgroup.o .obj/qpauseanimation.o .obj/qendian.o .obj/qglobal.o .obj/qlibraryinfo.o .obj/qmalloc.o .obj/qnumeric.o .obj/qfloat16.o .obj/qoperatingsystemversion.o .obj/qlogging.o .obj/qrandom.o .obj/qhooks.o .obj/qversiontagging.o .obj/qrunnable.o .obj/qthread.o .obj/qthread_unix.o .obj/qatomic.o .obj/qmutex.o .obj/qmutexpool.o .obj/qreadwritelock.o .obj/qsemaphore.o .obj/qthreadpool.o .obj/qthreadstorage.o .obj/qwaitcondition_unix.o .obj/qexception.o .obj/qfutureinterface.o .obj/qfuturewatcher.o .obj/qresultstore.o .obj/qarraydata.o .obj/qbitarray.o .obj/qbytearray.o .obj/qbytearraylist.o .obj/qbytearraymatcher.o .obj/qcollator.o .obj/qcryptographichash.o .obj/qdatetime.o .obj/qeasingcurve.o .obj/qfreelist.o .obj/qhash.o .obj/qline.o .obj/qlinkedlist.o .obj/qlist.o .obj/qlocale.o .obj/qlocale_tools.o .obj/qpoint.o .obj/qmap.o .obj/qmargins.o .obj/qmessageauthenticationcode.o .obj/qcontiguouscache.o .obj/qrect.o .obj/qregexp.o .obj/qrefcount.o .obj/qringbuffer.o .obj/qshareddata.o .obj/qsharedpointer.o .obj/qsimd.o .obj/qsize.o .obj/qstring.o .obj/qstringbuilder.o .obj/qstringlist.o .obj/qstringview.o .obj/qtextboundaryfinder.o .obj/qtimeline.o .obj/qunicodetools.o .obj/qvsnprintf.o .obj/qversionnumber.o .obj/qlocale_unix.o .obj/qcollator_posix.o .obj/qtimezone.o .obj/qtimezoneprivate.o .obj/qtimezoneprivate_tz.o .obj/qdatetimeparser.o .obj/qregularexpression.o .obj/qcommandlineoption.o .obj/qcommandlineparser.o .obj/harfbuzz-buffer.o .obj/harfbuzz-gdef.o .obj/harfbuzz-gsub.o .obj/harfbuzz-gpos.o .obj/harfbuzz-impl.o .obj/harfbuzz-open.o .obj/harfbuzz-stream.o .obj/harfbuzz-shaper-all.o .obj/qharfbuzz.o .obj/qabstractfileengine.o .obj/qbuffer.o .obj/qdataurl.o .obj/qtldurl.o .obj/qdebug.o .obj/qdir.o .obj/qdiriterator.o .obj/qfile.o .obj/qfiledevice.o .obj/qfileinfo.o .obj/qipaddress.o .obj/qiodevice.o .obj/qlockfile.o .obj/qnoncontiguousbytedevice.o .obj/qstorageinfo.o .obj/qtemporarydir.o .obj/qtemporaryfile.o .obj/qresource.o .obj/qresource_iterator.o .obj/qsavefile.o .obj/qstandardpaths.o .obj/qurl.o .obj/qurlidna.o .obj/qurlquery.o .obj/qurlrecode.o .obj/qfsfileengine.o .obj/qfsfileengine_iterator.o .obj/qfilesystementry.o .obj/qfilesystemengine.o .obj/qfileselector.o .obj/qloggingcategory.o .obj/qloggingregistry.o .obj/qfilesystemwatcher.o .obj/qfilesystemwatcher_polling.o .obj/qfilesystemwatcher_inotify.o .obj/qprocess.o .obj/qprocess_unix.o .obj/qsettings.o .obj/qfsfileengine_unix.o .obj/qfilesystemengine_unix.o .obj/qlockfile_unix.o .obj/qfilesystemiterator_unix.o .obj/forkfd_qt.o .obj/qstandardpaths_unix.o .obj/qstorageinfo_unix.o .obj/qabstractitemmodel.o .obj/qitemselectionmodel.o .obj/qabstractproxymodel.o .obj/qidentityproxymodel.o .obj/qsortfilterproxymodel.o .obj/qstringlistmodel.o .obj/qfactoryinterface.o .obj/qpluginloader.o .obj/qfactoryloader.o .obj/quuid.o .obj/qabstracteventdispatcher.o .obj/qabstractnativeeventfilter.o .obj/qbasictimer.o .obj/qdeadlinetimer.o .obj/qelapsedtimer.o .obj/qeventloop.o .obj/qcoreapplication.o .obj/qcoreevent.o .obj/qmetaobject.o .obj/qmetatype.o .obj/qmetaobjectbuilder.o .obj/qmimedata.o .obj/qobject.o .obj/qobjectcleanuphandler.o .obj/qsignalmapper.o .obj/qsocketnotifier.o .obj/qtimer.o .obj/qtranslator.o .obj/qvariant.o .obj/qcoreglobaldata.o .obj/qsharedmemory.o .obj/qsystemsemaphore.o .obj/qpointer.o .obj/qmath.o .obj/qsystemerror.o .obj/qtestsupport_core.o .obj/qcore_unix.o .obj/qeventdispatcher_unix.o .obj/qtimerinfo_unix.o .obj/qelapsedtimer_unix.o .obj/qeventdispatcher_glib.o .obj/qsharedmemory_posix.o .obj/qsharedmemory_systemv.o .obj/qsharedmemory_unix.o .obj/qsystemsemaphore_posix.o .obj/qsystemsemaphore_systemv.o .obj/qsystemsemaphore_unix.o .obj/qutfcodec.o .obj/qlatincodec.o .obj/qsimplecodec.o .obj/qtextcodec.o .obj/qisciicodec.o .obj/qtsciicodec.o .obj/qgb18030codec.o .obj/qjpunicode.o .obj/qeucjpcodec.o .obj/qjiscodec.o .obj/qsjiscodec.o .obj/qeuckrcodec.o .obj/qbig5codec.o .obj/qiconvcodec.o .obj/qcborstream.o .obj/qcbordiagnostic.o .obj/qcborvalue.o .obj/qdatastream.o .obj/qjson.o .obj/qjsoncbor.o .obj/qjsondocument.o .obj/qjsonobject.o .obj/qjsonarray.o .obj/qjsonvalue.o .obj/qjsonwriter.o .obj/qjsonparser.o .obj/qtextstream.o .obj/qxmlstream.o .obj/qxmlutils.o .obj/qstatemachine.o .obj/qabstractstate.o .obj/qstate.o .obj/qfinalstate.o .obj/qhistorystate.o .obj/qabstracttransition.o .obj/qsignaltransition.o .obj/qeventtransition.o .obj/qmimedatabase.o .obj/qmimetype.o .obj/qmimemagicrulematcher.o .obj/qmimetypeparser.o .obj/qmimemagicrule.o .obj/qmimeglobpattern.o .obj/qmimeprovider.o .obj/qfloat16tables.o .obj/qrc_mimetypes.o .obj/moc_qmimetype.o -lpthread -lm /home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libz.a /home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libpcre2-16.so /home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libdouble-conversion.so /home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libgthread-2.0.so /home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libglib-2.0.so /home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libpthread.a(pthread_create.o): In function `__pthread_create_2_1': /build/glibc-FUvrFr/glibc-2.28/nptl/pthread_create.c:697: undefined reference to `_dl_stack_flags' /home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libpthread.a(unwind.o): In function `unwind_stop': /build/glibc-FUvrFr/glibc-2.28/nptl/unwind.c:72: undefined reference to `__pointer_chk_guard_local' /home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libpthread.a(nptl-init.o): In function `__pthread_initialize_minimal_internal': /build/glibc-FUvrFr/glibc-2.28/nptl/nptl-init.c:434: undefined reference to `_dl_pagesize' /build/glibc-FUvrFr/glibc-2.28/nptl/nptl-init.c:434: undefined reference to `_dl_init_static_tls' /build/glibc-FUvrFr/glibc-2.28/nptl/nptl-init.c:434: undefined reference to `_dl_wait_lookup_done' /home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libpthread.a(nptl-init.o): In function `__pthread_get_minstack': /build/glibc-FUvrFr/glibc-2.28/nptl/nptl-init.c:443: undefined reference to `_dl_pagesize' collect2: error: ld returned 1 exit status Makefile:1158: recipe for target '../../lib/libQt5Core.so.5.12.3' failed make[3]: *** [../../lib/libQt5Core.so.5.12.3] Error 1 make[3]: Leaving directory '/home/edu/raspi/qt-everywhere-src-5.12.3/qtbase/src/corelib' Makefile:198: recipe for target 'sub-corelib-make_first' failed make[2]: *** [sub-corelib-make_first] Error 2 make[2]: Leaving directory '/home/edu/raspi/qt-everywhere-src-5.12.3/qtbase/src' Makefile:50: recipe for target 'sub-src-make_first' failed make[1]: *** [sub-src-make_first] Error 2 make[1]: Leaving directory '/home/edu/raspi/qt-everywhere-src-5.12.3/qtbase' Makefile:82: recipe for target 'module-qtbase-make_first' failed make: *** [module-qtbase-make_first] Error 2
All output can be found here
-
@jsulm said in Qt raspberry pi cross compilation make issue:
Can you show the compiler/linker call just before first error?
Sure!
/home/edu/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/edu/raspi/sysroot -Wl,--no-undefined -Wl,--version-script,QtCore.version -Wl,-O1 -Wl,--enable-new-dtags -Wl,-rpath-link,/home/edu/raspi/sysroot/opt/vc/lib -Wl,-rpath-link,/home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/home/edu/raspi/sysroot/lib/arm-linux-gnueabihf -shared -Wl,-soname,libQt5Core.so.5 -o libQt5Core.so.5.12.3 .obj/minimum-linux.o .obj/qstring_compat.o .obj/qabstractanimation.o .obj/qvariantanimation.o .obj/qpropertyanimation.o .obj/qanimationgroup.o .obj/qsequentialanimationgroup.o .obj/qparallelanimationgroup.o .obj/qpauseanimation.o .obj/qendian.o .obj/qglobal.o .obj/qlibraryinfo.o .obj/qmalloc.o .obj/qnumeric.o .obj/qfloat16.o .obj/qoperatingsystemversion.o .obj/qlogging.o .obj/qrandom.o .obj/qhooks.o .obj/qversiontagging.o .obj/qrunnable.o .obj/qthread.o .obj/qthread_unix.o .obj/qatomic.o .obj/qmutex.o .obj/qmutexpool.o .obj/qreadwritelock.o .obj/qsemaphore.o .obj/qthreadpool.o .obj/qthreadstorage.o .obj/qwaitcondition_unix.o .obj/qexception.o .obj/qfutureinterface.o .obj/qfuturewatcher.o .obj/qresultstore.o .obj/qarraydata.o .obj/qbitarray.o .obj/qbytearray.o .obj/qbytearraylist.o .obj/qbytearraymatcher.o .obj/qcollator.o .obj/qcryptographichash.o .obj/qdatetime.o .obj/qeasingcurve.o .obj/qfreelist.o .obj/qhash.o .obj/qline.o .obj/qlinkedlist.o .obj/qlist.o .obj/qlocale.o .obj/qlocale_tools.o .obj/qpoint.o .obj/qmap.o .obj/qmargins.o .obj/qmessageauthenticationcode.o .obj/qcontiguouscache.o .obj/qrect.o .obj/qregexp.o .obj/qrefcount.o .obj/qringbuffer.o .obj/qshareddata.o .obj/qsharedpointer.o .obj/qsimd.o .obj/qsize.o .obj/qstring.o .obj/qstringbuilder.o .obj/qstringlist.o .obj/qstringview.o .obj/qtextboundaryfinder.o .obj/qtimeline.o .obj/qunicodetools.o .obj/qvsnprintf.o .obj/qversionnumber.o .obj/qlocale_unix.o .obj/qcollator_posix.o .obj/qtimezone.o .obj/qtimezoneprivate.o .obj/qtimezoneprivate_tz.o .obj/qdatetimeparser.o .obj/qregularexpression.o .obj/qcommandlineoption.o .obj/qcommandlineparser.o .obj/harfbuzz-buffer.o .obj/harfbuzz-gdef.o .obj/harfbuzz-gsub.o .obj/harfbuzz-gpos.o .obj/harfbuzz-impl.o .obj/harfbuzz-open.o .obj/harfbuzz-stream.o .obj/harfbuzz-shaper-all.o .obj/qharfbuzz.o .obj/qabstractfileengine.o .obj/qbuffer.o .obj/qdataurl.o .obj/qtldurl.o .obj/qdebug.o .obj/qdir.o .obj/qdiriterator.o .obj/qfile.o .obj/qfiledevice.o .obj/qfileinfo.o .obj/qipaddress.o .obj/qiodevice.o .obj/qlockfile.o .obj/qnoncontiguousbytedevice.o .obj/qstorageinfo.o .obj/qtemporarydir.o .obj/qtemporaryfile.o .obj/qresource.o .obj/qresource_iterator.o .obj/qsavefile.o .obj/qstandardpaths.o .obj/qurl.o .obj/qurlidna.o .obj/qurlquery.o .obj/qurlrecode.o .obj/qfsfileengine.o .obj/qfsfileengine_iterator.o .obj/qfilesystementry.o .obj/qfilesystemengine.o .obj/qfileselector.o .obj/qloggingcategory.o .obj/qloggingregistry.o .obj/qfilesystemwatcher.o .obj/qfilesystemwatcher_polling.o .obj/qfilesystemwatcher_inotify.o .obj/qprocess.o .obj/qprocess_unix.o .obj/qsettings.o .obj/qfsfileengine_unix.o .obj/qfilesystemengine_unix.o .obj/qlockfile_unix.o .obj/qfilesystemiterator_unix.o .obj/forkfd_qt.o .obj/qstandardpaths_unix.o .obj/qstorageinfo_unix.o .obj/qabstractitemmodel.o .obj/qitemselectionmodel.o .obj/qabstractproxymodel.o .obj/qidentityproxymodel.o .obj/qsortfilterproxymodel.o .obj/qstringlistmodel.o .obj/qfactoryinterface.o .obj/qpluginloader.o .obj/qfactoryloader.o .obj/quuid.o .obj/qabstracteventdispatcher.o .obj/qabstractnativeeventfilter.o .obj/qbasictimer.o .obj/qdeadlinetimer.o .obj/qelapsedtimer.o .obj/qeventloop.o .obj/qcoreapplication.o .obj/qcoreevent.o .obj/qmetaobject.o .obj/qmetatype.o .obj/qmetaobjectbuilder.o .obj/qmimedata.o .obj/qobject.o .obj/qobjectcleanuphandler.o .obj/qsignalmapper.o .obj/qsocketnotifier.o .obj/qtimer.o .obj/qtranslator.o .obj/qvariant.o .obj/qcoreglobaldata.o .obj/qsharedmemory.o .obj/qsystemsemaphore.o .obj/qpointer.o .obj/qmath.o .obj/qsystemerror.o .obj/qtestsupport_core.o .obj/qcore_unix.o .obj/qeventdispatcher_unix.o .obj/qtimerinfo_unix.o .obj/qelapsedtimer_unix.o .obj/qeventdispatcher_glib.o .obj/qsharedmemory_posix.o .obj/qsharedmemory_systemv.o .obj/qsharedmemory_unix.o .obj/qsystemsemaphore_posix.o .obj/qsystemsemaphore_systemv.o .obj/qsystemsemaphore_unix.o .obj/qutfcodec.o .obj/qlatincodec.o .obj/qsimplecodec.o .obj/qtextcodec.o .obj/qisciicodec.o .obj/qtsciicodec.o .obj/qgb18030codec.o .obj/qjpunicode.o .obj/qeucjpcodec.o .obj/qjiscodec.o .obj/qsjiscodec.o .obj/qeuckrcodec.o .obj/qbig5codec.o .obj/qiconvcodec.o .obj/qcborstream.o .obj/qcbordiagnostic.o .obj/qcborvalue.o .obj/qdatastream.o .obj/qjson.o .obj/qjsoncbor.o .obj/qjsondocument.o .obj/qjsonobject.o .obj/qjsonarray.o .obj/qjsonvalue.o .obj/qjsonwriter.o .obj/qjsonparser.o .obj/qtextstream.o .obj/qxmlstream.o .obj/qxmlutils.o .obj/qstatemachine.o .obj/qabstractstate.o .obj/qstate.o .obj/qfinalstate.o .obj/qhistorystate.o .obj/qabstracttransition.o .obj/qsignaltransition.o .obj/qeventtransition.o .obj/qmimedatabase.o .obj/qmimetype.o .obj/qmimemagicrulematcher.o .obj/qmimetypeparser.o .obj/qmimemagicrule.o .obj/qmimeglobpattern.o .obj/qmimeprovider.o .obj/qfloat16tables.o .obj/qrc_mimetypes.o .obj/moc_qmimetype.o -lpthread -lm /home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libz.a /home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libpcre2-16.so /home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libdouble-conversion.so /home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libgthread-2.0.so /home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libglib-2.0.so /home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libpthread.a(pthread_create.o): In function `__pthread_create_2_1': /build/glibc-FUvrFr/glibc-2.28/nptl/pthread_create.c:697: undefined reference to `_dl_stack_flags' /home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libpthread.a(unwind.o): In function `unwind_stop': /build/glibc-FUvrFr/glibc-2.28/nptl/unwind.c:72: undefined reference to `__pointer_chk_guard_local' /home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libpthread.a(nptl-init.o): In function `__pthread_initialize_minimal_internal': /build/glibc-FUvrFr/glibc-2.28/nptl/nptl-init.c:434: undefined reference to `_dl_pagesize' /build/glibc-FUvrFr/glibc-2.28/nptl/nptl-init.c:434: undefined reference to `_dl_init_static_tls' /build/glibc-FUvrFr/glibc-2.28/nptl/nptl-init.c:434: undefined reference to `_dl_wait_lookup_done' /home/edu/raspi/sysroot/usr/lib/arm-linux-gnueabihf/libpthread.a(nptl-init.o): In function `__pthread_get_minstack': /build/glibc-FUvrFr/glibc-2.28/nptl/nptl-init.c:443: undefined reference to `_dl_pagesize' collect2: error: ld returned 1 exit status Makefile:1158: recipe for target '../../lib/libQt5Core.so.5.12.3' failed make[3]: *** [../../lib/libQt5Core.so.5.12.3] Error 1 make[3]: Leaving directory '/home/edu/raspi/qt-everywhere-src-5.12.3/qtbase/src/corelib' Makefile:198: recipe for target 'sub-corelib-make_first' failed make[2]: *** [sub-corelib-make_first] Error 2 make[2]: Leaving directory '/home/edu/raspi/qt-everywhere-src-5.12.3/qtbase/src' Makefile:50: recipe for target 'sub-src-make_first' failed make[1]: *** [sub-src-make_first] Error 2 make[1]: Leaving directory '/home/edu/raspi/qt-everywhere-src-5.12.3/qtbase' Makefile:82: recipe for target 'module-qtbase-make_first' failed make: *** [module-qtbase-make_first] Error 2
All output can be found here
-
Check the symlink for libpthread.so in the sysroot under <sysroot>/usr/lib/arm-linux-gnueabihf.
If it is a broken symlink, libpthread.a is picked instead which is not what you want. libpthread.so should point to <sysroot>/lib/arm-linux-gnueabihf/libpthread.so.0
-
I managed to build the environment some days after I posted this error following another tutorial. So I deleated the virtual machine that was getting this error.
But after @agocs response, I set another clean VM and tried to reproduced the error. I used the same img of raspbian stretch that I had success (that means that I ran different commands for raspberry pi part). I could make and install with no errors.
I'll try to reproduce the error this weekend and give it a go to @agocs solution and give some feedback.
-
I experienced the same issue. I solved it by re-running "./sysroot-relativelinks.py sysroot". I caused it by changing some of my paths after calling "./sysroot-relativelinks.py sysroot".
Hope this helps.
-
Had the same issue. Restart "./sysroot-relativelinks.py sysroot". It helped to move a little. But then new error ocured:
... rm -f libQt5DBus.so.5.12.5 libQt5DBus.so libQt5DBus.so.5 libQt5DBus.so.5.12 /home/vladimir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/vladimir/raspi/sysroot -Wl,--no-undefined -Wl,--version-script,QtDBus.version -Wl,-O1 -Wl,--enable-new-dtags -Wl,-z,origin -Wl,-rpath,\$ORIGIN -Wl,-rpath-link,/home/vladimir/raspi/sysroot/opt/vc/lib -Wl,-rpath-link,/home/vladimir/raspi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/home/vladimir/raspi/sysroot/lib/arm-linux-gnueabihf -shared -Wl,-soname,libQt5DBus.so.5 -o libQt5DBus.so.5.12.5 .obj/qdbusconnection.o .obj/qdbusconnectioninterface.o .obj/qdbuserror.o .obj/qdbusintegrator.o .obj/qdbusmessage.o .obj/qdbusserver.o .obj/qdbusabstractinterface.o .obj/qdbusinterface.o .obj/qdbusxmlparser.o .obj/qdbusutil.o .obj/qdbusintrospection.o .obj/qdbusabstractadaptor.o .obj/qdbusinternalfilters.o .obj/qdbusmetaobject.o .obj/qdbusxmlgenerator.o .obj/qdbusmisc.o .obj/qdbusargument.o .obj/qdbusreply.o .obj/qdbusmetatype.o .obj/qdbusextratypes.o .obj/qdbuscontext.o .obj/qdbuspendingcall.o .obj/qdbuspendingreply.o .obj/qdbus_symbols.o .obj/qdbusservicewatcher.o .obj/qdbusunixfiledescriptor.o .obj/qdbusvirtualobject.o .obj/moc_qdbusconnectioninterface.o .obj/moc_qdbusconnection.o .obj/moc_qdbusabstractadaptor.o .obj/moc_qdbusvirtualobject.o .obj/moc_qdbusconnection_p.o .obj/moc_qdbusconnectionmanager_p.o .obj/moc_qdbuspendingcall_p.o /home/vladimir/raspi/qt-everywhere-src-5.12.5/qtbase/lib/libQt5Core.so -lpthread ln -s libQt5DBus.so.5.12.5 libQt5DBus.so ln -s libQt5DBus.so.5.12.5 libQt5DBus.so.5 ln -s libQt5DBus.so.5.12.5 libQt5DBus.so.5.12 rm -f ../../lib/libQt5DBus.so.5.12.5 mv -f libQt5DBus.so.5.12.5 ../../lib/libQt5DBus.so.5.12.5 rm -f ../../lib/libQt5DBus.so rm -f ../../lib/libQt5DBus.so.5 rm -f ../../lib/libQt5DBus.so.5.12 mv -f libQt5DBus.so ../../lib/libQt5DBus.so mv -f libQt5DBus.so.5 ../../lib/libQt5DBus.so.5 mv -f libQt5DBus.so.5.12 ../../lib/libQt5DBus.so.5.12 make[3]: Leaving directory '/home/vladimir/raspi/qt-everywhere-src-5.12.5/qtbase/src/dbus' make[2]: Leaving directory '/home/vladimir/raspi/qt-everywhere-src-5.12.5/qtbase/src' make[1]: *** [Makefile:51: sub-src-make_first] Error 2 make[1]: Leaving directory '/home/vladimir/raspi/qt-everywhere-src-5.12.5/qtbase' make: *** [Makefile:83: module-qtbase-make_first] Error 2
restarted py script again. Moved a liitle:
/home/vladimir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/vladimir/raspi/sysroot -Wl,--no-undefined -Wl,--version-script,QtConcurrent.version -Wl,-O1 -Wl,--enable-new-dtags -Wl,-z,origin -Wl,-rpath,\$ORIGIN -Wl,-rpath-link,/home/vladimir/raspi/sysroot/opt/vc/lib -Wl,-rpath-link,/home/vladimir/raspi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/home/vladimir/raspi/sysroot/lib/arm-linux-gnueabihf -shared -Wl,-soname,libQt5Concurrent.so.5 -o libQt5Concurrent.so.5.12.5 .obj/qtconcurrentfilter.o .obj/qtconcurrentmap.o .obj/qtconcurrentrun.o .obj/qtconcurrentthreadengine.o .obj/qtconcurrentiteratekernel.o /home/vladimir/raspi/qt-everywhere-src-5.12.5/qtbase/lib/libQt5Core.so -lpthread ln -s libQt5Concurrent.so.5.12.5 libQt5Concurrent.so ln -s libQt5Concurrent.so.5.12.5 libQt5Concurrent.so.5 ln -s libQt5Concurrent.so.5.12.5 libQt5Concurrent.so.5.12 rm -f ../../lib/libQt5Concurrent.so.5.12.5 mv -f libQt5Concurrent.so.5.12.5 ../../lib/libQt5Concurrent.so.5.12.5 rm -f ../../lib/libQt5Concurrent.so rm -f ../../lib/libQt5Concurrent.so.5 rm -f ../../lib/libQt5Concurrent.so.5.12 mv -f libQt5Concurrent.so ../../lib/libQt5Concurrent.so mv -f libQt5Concurrent.so.5 ../../lib/libQt5Concurrent.so.5 mv -f libQt5Concurrent.so.5.12 ../../lib/libQt5Concurrent.so.5.12 make[3]: Leaving directory '/home/vladimir/raspi/qt-everywhere-src-5.12.5/qtbase/src/concurrent' cd openglextensions/ && ( test -e Makefile || /home/vladimir/raspi/qt-everywhere-src-5.12.5/qtbase/bin/qmake -o Makefile /home/vladimir/raspi/qt-everywhere-src-5.12.5/qtbase/src/openglextensions/openglextensions.pro ) && make -f Makefile In file included from ../../include/QtCore/qglobal.h:1:0, from ../corelib/global/qt_pch.h:56: ../../include/QtCore/../../src/corelib/global/qglobal.h:121:49: error: static assertion failed: Required feature library for file ../../include/QtCore/../../src/corelib/plugin/qlibrary.h not available. # define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message) ^ ../../include/QtCore/../../src/corelib/global/qglobal.h:87:36: note: in expansion of macro ‘Q_STATIC_ASSERT_X’ #define QT_REQUIRE_CONFIG(feature) Q_STATIC_ASSERT_X(QT_FEATURE_##feature == 1, "Required feature " #feature " for file " __FILE__ " not available.") ^ ../../include/QtCore/../../src/corelib/plugin/qlibrary.h:45:1: note: in expansion of macro ‘QT_REQUIRE_CONFIG’ QT_REQUIRE_CONFIG(library); ^ make[3]: Entering directory '/home/vladimir/raspi/qt-everywhere-src-5.12.5/qtbase/src/openglextensions' /home/vladimir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/home/vladimir/raspi/sysroot -O2 -fPIC -std=c++11 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wno-missing-field-initializers -D_REENTRANT -DQT_NO_CAST_FROM_ASCII -DQT_NO_FOREACH -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_OPENGLEXTENSIONS_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I. -I../../include -I../../include/QtOpenGLExtensions -I/home/vladimir/raspi/qt-everywhere-src-5.12.5/qtbase/include/QtOpenGLExtensions/5.12.5 -I/home/vladimir/raspi/qt-everywhere-src-5.12.5/qtbase/include/QtOpenGLExtensions/5.12.5/QtOpenGLExtensions -I/home/vladimir/raspi/sysroot/opt/vc/include -I/home/vladimir/raspi/sysroot/opt/vc/include/interface/vcos/pthreads -I/home/vladimir/raspi/sysroot/opt/vc/include/interface/vmcs_host/linux -I../../include/QtGui -I../../include/QtCore -I.moc -I../../mkspecs/devices/linux-rasp-pi-g++ -o .obj/qopenglextensions.o qopenglextensions.cpp make[3]: *** [Makefile:28661: .obj/qsslsocket_openssl11.o] Error 1 make[3]: Leaving directory '/home/vladimir/raspi/qt-everywhere-src-5.12.5/qtbase/src/network' make[2]: *** [Makefile:249: sub-network-make_first] Error 2 make[2]: *** Waiting for unfinished jobs.... rm -f ../../lib/libQt5OpenGLExtensions.a /home/vladimir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-ar cqs ../../lib/libQt5OpenGLExtensions.a .obj/qopenglextensions.o make[3]: Leaving directory '/home/vladimir/raspi/qt-everywhere-src-5.12.5/qtbase/src/openglextensions' make[2]: Leaving directory '/home/vladimir/raspi/qt-everywhere-src-5.12.5/qtbase/src' make[1]: *** [Makefile:51: sub-src-make_first] Error 2 make[1]: Leaving directory '/home/vladimir/raspi/qt-everywhere-src-5.12.5/qtbase' make: *** [Makefile:83: module-qtbase-make_first] Error 2
-
You can also use:
rsync -avLTo copy symbolic links when rsync for cross compiling. The -L will copy the links. I found this is useful for windows.