Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-30568

Qt 5.0.1 Cross-Compilation Fails on OS X Targeting Raspberry PI: Wrong Compiler Used

    XMLWordPrintable

Details

    • macOS

    Description

      I am compiling Qt5 on OS X targeting the Raspberry PI. I've built my own toolchain and am using a sysroot based on raspbian packages.

      `configure' is run as follows:

      ./configure \
      -prefix `pwd`/../prefix \
      -hostprefix `pwd`/../host-prefix \
      -device linux-rasp-pi-g++ \
      -device-option CROSS_COMPILE=/Users/phil/dev/p2/toolchain/armv6-rpi-linux-gnueabihf/bin/armv6-rpi-linux-gnueabihf- \
      -sysroot /Users/phil/dev/p2/research/lcd-cairo-scons/external/stage \
      -opensource -confirm-license \
      -make libs -make tools -nomake examples -nomake demos -nomake tests \
      -shared -release \
      -qt-pcre -qt-sql-sqlite -no-accessibility -c++11 -no-cups -no-dbus -no-directfb \
      -eglfs -no-gif -no-glib -gui -iconv -icu -no-kms -largefile -system-libjpeg \
      -system-libpng -no-nis -openssl -no-rpath -no-xcb -opengl es2 -widgets -system-zlib
      

      It correctly shows

      Building on:   macx-clang
      Building for:  devices//linux-rasp-pi-g++
      Architecture:  arm, features:
      Host architecture: x86_64, features: mmx sse sse2 sse3 ssse3
      ...
      Configuration ..........  cross_compile qpa largefile precompile_header neon pcre  minimal-config small-config medium-config large-config full-config evdev linuxfb c++11 egl eglfs opengl opengles2 shared qpa reduce_exports reduce_relocations clock-gettime clock-monotonic mremap getaddrinfo ipv6ifname getifaddrs inotify system-jpeg system-png png no-gif freetype system-zlib iconv openssl icu concurrent audio-backend v8 release qt_framework
      ...
      

      It correctly builds qmake using the clang++, etc.

      Now, when I run make, I get the following error:

      % make                                                                                                                                                          (...source-src-5.0.1)
      cd qtbase/ && ( test -f Makefile || /private/tmp/qt/qt-everywhere-opensource-src-5.0.1/qtbase/bin/qmake /private/tmp/qt/qt-everywhere-opensource-src-5.0.1/qtbase/qtbase.pro -o Makefile ) && make -f Makefile 
      cd src/ && ( test -f Makefile || /private/tmp/qt/qt-everywhere-opensource-src-5.0.1/qtbase/bin/qmake /private/tmp/qt/qt-everywhere-opensource-src-5.0.1/qtbase/src/src.pro -o Makefile ) && make -f Makefile 
      cd tools/ && ( test -f Makefile || /private/tmp/qt/qt-everywhere-opensource-src-5.0.1/qtbase/bin/qmake /private/tmp/qt/qt-everywhere-opensource-src-5.0.1/qtbase/src/tools/tools.pro -o Makefile ) && make -f Makefile 
      cd bootstrap/ && ( test -f Makefile || /private/tmp/qt/qt-everywhere-opensource-src-5.0.1/qtbase/bin/qmake /private/tmp/qt/qt-everywhere-opensource-src-5.0.1/qtbase/src/tools/bootstrap/bootstrap.pro -o Makefile ) && make -f Makefile 
      Project MESSAGE: /private/tmp/qt/qt-everywhere-opensource-src-5.0.1/qtbase/bin/syncqt -minimal -module QtCore -module QtDBus -module QtXml -mkspecsdir /private/tmp/qt/qt-everywhere-opensource-src-5.0.1/qtbase/mkspecs -outdir /private/tmp/qt/qt-everywhere-opensource-src-5.0.1/qtbase /private/tmp/qt/qt-everywhere-opensource-src-5.0.1/qtbase
      <srcbase> = /private/tmp/qt/qt-everywhere-opensource-src-5.0.1/qtbase 
      <outbase> = /private/tmp/qt/qt-everywhere-opensource-src-5.0.1/qtbase 
      QtDBus: created fwd-include header(s) for <srcbase>/src/dbus/ { qdbus_symbols_p.h (1), qdbusabstractadaptor.h (1), qdbusabstractadaptor_p.h (1), qdbusabstractinterface.h (1), qdbusabstractinterface_p.h (1), qdbusargument.h (1), qdbusargument_p.h (1), qdbusconnection.h (1), qdbusconnection_p.h (1), qdbusconnectioninterface.h (1), qdbusconnectionmanager_p.h (1), qdbuscontext.h (1), qdbuscontext_p.h (1), qdbuserror.h (1), qdbusextratypes.h (1), qdbusintegrator_p.h (1), qdbusinterface.h (1), qdbusinterface_p.h (1), qdbusintrospection_p.h (1), qdbusmacros.h (1), qdbusmessage.h (1), qdbusmessage_p.h (1), qdbusmetaobject_p.h (1), qdbusmetatype.h (1), qdbusmetatype_p.h (1), qdbuspendingcall.h (1), qdbuspendingcall_p.h (1), qdbuspendingreply.h (1), qdbusreply.h (1), qdbusserver.h (1), qdbusservicewatcher.h (1), qdbusthreaddebug_p.h (1), qdbusunixfiledescriptor.h (1), qdbusutil_p.h (1), qdbusvirtualobject.h (1), qdbusxmlparser_p.h (1) }
      QtXml: created fwd-include header(s) for <srcbase>/src/xml/ { qtxmlglobal.h (1) }
      QtXml: created fwd-include header(s) for <srcbase>/src/xml/dom/ { qdom.h (1) }
      QtXml: created fwd-include header(s) for <srcbase>/src/xml/sax/ { qxml.h (1) }
      clang++ -c -pipe -mmacosx-version-min=10.6 -O2 -std=c++11 -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -fno-exceptions -Wall -W -DQT_NO_LIBUDEV -DQT_NO_XCB -DQT_NO_CORESERVICES -DQT_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_NO_CAST_TO_ASCII -DQT_NO_CODECS -DQT_NO_DATASTREAM -DQT_NO_LIBRARY -DQT_NO_QOBJECT -DQT_NO_SYSTEMLOCALE -DQT_NO_THREAD -DQT_NO_UNICODETABLES -DQT_NO_USING_NAMESPACE -DQT_NO_DEPRECATED -DQT_NO_TRANSLATION -DQT_QMAKE_LOCATION=\"/private/tmp/qt/qt-everywhere-opensource-src-5.0.1/qtbase/bin/qmake\" -DQT_NO_CAST_FROM_ASCII -DQT_BUILD_BOOTSTRAP_LIB -DQT_BUILDING_QT -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 -I../../../mkspecs/macx-clang -I. -I../../../include -I../../../include/QtCore -I../../../include/QtCore/5.0.1 -I../../../include/QtCore/5.0.1/QtCore -I../../../include/QtXml -I/private/tmp/qt/qt-everywhere-opensource-src-5.0.1/qtbase/include/QtXml/5.0.1 -I/private/tmp/qt/qt-everywhere-opensource-src-5.0.1/qtbase/include/QtXml/5.0.1/QtXml -I../../corelib/global -I../../3rdparty/zlib -o .obj/release-shared/qlatincodec.o ../../corelib/codecs/qlatincodec.cpp
      In file included from ../../corelib/codecs/qlatincodec.cpp:42:
      In file included from ../../corelib/codecs/qlatincodec_p.h:56:
      In file included from ../../../include/QtCore/qtextcodec.h:1:
      In file included from ../../../include/QtCore/../../src/corelib/codecs/qtextcodec.h:46:
      In file included from ../../../include/QtCore/qlist.h:1:
      ../../../include/QtCore/../../src/corelib/tools/qlist.h:52:10: fatal error: 'initializer_list' file not found
      #include <initializer_list>
               ^
      1 error generated.
      make[4]: *** [.obj/release-shared/qlatincodec.o] Error 1
      make[3]: *** [sub-tools-bootstrap-make_first] Error 2
      make[2]: *** [sub-tools-make_first] Error 2
      make[1]: *** [sub-src-make_first] Error 2
      make: *** [module-qtbase-make_first] Error 2
      

      Note that this is a fresh tree, just unpacked.

      BTW, doing `make confclean' from the root of the source tree fails (no target confclean). Should I report this in a separate bug?

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vestbo Tor Arne Vestbø
            jirauser26722 user-db469 (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes