Qt + Intel C++ compiler (XE Composer)



  • Here's the story. First of all, I've tried to build Qt on Windows 7 and the build succeeded. What I stuck upon next was how to add a toolchain/kit for it, since the compiler wasn't automatically detected by Qt Creator the same way GCC and MSVC were. I cannot find the Qt article that states that Intel C++ compiler is better supported on Linux and Mac.

    Next I switched to Mac OS X 10.8.2. I tried to build Qt 4.8.3 using Intel XE Composer 2013.0.088. What I've done is:

    1. Use the configure tool:
      @configure -platform macx-icc@

    The configure step passed with several types of warninigs:

    • lost of: icpc: command line warning #10006: ignoring unknown option '-fconstant-cfstrings'
    • WARNING: DESTDIR: Cannot access directory '/include/WebCore'
    • lots of: WARNING: Failure to find: generated/...
    • several: Project WARNING: DEPLOYMENT support required. This project only works on Symbian and WinCE.
    • Project WARNING: Qt Mobility Messaging disabled!
      ...

    The first one is for sure because of the fact that the makespec for ICC on Mac OS is outdated. The /mkspecs/macx-icc/qmake.conf states:

    Written for Intel C++ Compiler versions 8.x and 9.x for Mac OS X

    So, I don't mean that this specification should be updated, but a new one called macx-icc2013 should be created and populated with the most recent and recommended values. Such mkspec separation has already been done for MSVC:
    mkspecs/win32-mscv2003
    mkspecs/win32-mscv2005
    mkspecs/win32-mscv2008
    mkspecs/win32-mscv2010

    The current make specification for ICC on Mac OS should be renamed to macx-icc2009 for example since it supports compilers up to 9.x version.

    This should be applied to the make specifications for ICC on Windows and Linux as well.

    qmake.conf specifies different versions of the Intel C++ compiler for Windows, Linux and Mac OS:
    Windows: not specified
    Linux: 10.x
    Mac OS: 8.x and 9.x

    An Intel intern has posted some make specifications "here":http://software.intel.com/en-us/articles/changing-intel-c-compiler-options-in-qt-creator#comment-1655658, but they mention an option called SSE3_ATOM which is meant to be used for Intel Atom processors' family.

    1. Run make:
      There are multiple warnings of the following compiler warnings:
    • icpc: command line warning #10159: invalid argument for option '-X'
    • warning #187: use of "=" where "==" may have been intended:
      moc.cpp(361): warning #187: use of "=" where "==" may have been intended
      while (test(INLINE) || (test(STATIC) && (def->isStatic = true)) ||
      ^
      moc.cpp(362): warning #187: use of "=" where "==" may have been intended
      (test(VIRTUAL) && (def->isVirtual = true)) //mark as virtual
      ^
      moc.cpp(453): warning #187: use of "=" where "==" may have been intended
      while (test(EXPLICIT) || test(INLINE) || (test(STATIC) && (def->isStatic = true)) ||
      ^
      moc.cpp(454): warning #187: use of "=" where "==" may have been intended
      (test(VIRTUAL) && (def->isVirtual = true)) //mark as virtual
      ^
    • deprecated:
      ../../../3rdparty/phonon/qt7/audionode.mm: In member function ‘virtual void Phonon::QT7::AudioNode::createAndConnectAUNodes()’:
      ../../../3rdparty/phonon/qt7/audionode.mm:79: warning: ‘AUGraphNewNode’ is deprecated (declared at /System/Library/Frameworks/AudioToolbox.framework/Headers/AUGraph.h:673)
      ../../../3rdparty/phonon/qt7/audionode.mm:79: warning: ‘AUGraphNewNode’ is deprecated (declared at /System/Library/Frameworks/AudioToolbox.framework/Headers/AUGraph.h:673)
      ../../../3rdparty/phonon/qt7/audionode.mm: In member function ‘virtual void Phonon::QT7::AudioNode::createAudioUnits()’:
      ../../../3rdparty/phonon/qt7/audionode.mm:101: warning: ‘AUGraphGetNodeInfo’ is deprecated (declared at /System/Library/Frameworks/AudioToolbox.framework/Headers/AUGraph.h:687)
      ../../../3rdparty/phonon/qt7/audionode.mm:101: warning: ‘AUGraphGetNodeInfo’ is deprecated (declared at /System/Library/Frameworks/AudioToolbox.framework/Headers/AUGraph.h:687)
      ...

    But the greatest problem was:
    icpc ... -Xarch_i386 -framework -Xarch_i386 QuickTime -Xarch_ppc -framework -Xarch_ppc QuickTime

    icpc: command line warning #10159: invalid argument for option '-X'
    icpc: command line warning #10159: invalid argument for option '-X'
    icpc: error #10236: File not found: 'QuickTime'
    icpc: command line warning #10159: invalid argument for option '-X'
    icpc: error #10236: File not found: 'QuickTime'
    make[4]: *** [../../../../plugins/phonon_backend/libphonon_qt7_debug.dylib] Error 1
    make[3]: *** [debug-all] Error 2
    make[2]: *** [sub-qt7-make_default] Error 2
    make[1]: *** [sub-phonon-make_default] Error 2
    make: *** [sub-plugins-make_default-ordered] Error 2

    1. Despite the build errors I ran "make install" and I get exactly the same errors as the ones mentioned at the end of step 2).

    Despite all of these errors the ICC runs correctly. If using Qt Creator 2.6 beta the debugger path: "/opt/intel/bin/idb" should be specified manually, since gdb is the automatically detected debugger. Also, the mkspec path should be manually specified: ".../<source-directory-from-which-you-have-build-qt>/mkspecs/macx-icc" (for Mac OS).

    Please, update the icc specifications for Windows, Linux and MacOS.



  • Also, the precompiled header feature is broken - I have checked the Makefile generated by the qmake executable that is built using Intel's compiler and the qmake executable built using gcc. The gcc's one has its:
    "###### Prefix headers"

    ... section full with code for generating C/C++/Objective-C precompiled headers.

    Also there is an additional line in the "clean:compiler_clean" section that cleans the generated *.gch precompiled header files' binaries.

    I am now adding them manually.



  • mkspecs/common/g++-macx/qmake.conf contains:
    QMAKE_OBJCFLAGS_PRECOMPILE = -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
    QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
    QMAKE_OBJCXXFLAGS_PRECOMPILE = -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
    QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE

    That make the following qmake code work for gcc:
    CONFIG *= precompile_header
    PRECOMPILED_HEADER = ...


  • Moderators

    Hi, feature requests and bug reports are more likely to be noticed at https://bugreports.qt-project.org

    Note however, that according to http://qt-project.org/doc/qt-4.8/supported-platforms.html , the Intel Compiler is only supported on Ubuntu 10.04, and only at Tier 2. That means errors will be addressed subject to resource availability.

    Given that most efforts are going into polishing Qt 5 for Tier 1 platforms at the moment, bear in mind that it might be a while before someone acts on your request.

    If you know how to write a working mkspec, you can submit a patch to Gerrit (see http://wiki.qt-project.org/Main_Page )



  • Yes, I have updated the macx-icc/qmake.conf to support the Intel C++ Composer XE 2013.0.088. I will submit a patch. Thanks.



  • Where is this patch? It does not seem to be in the 4.8.4 release.

    Where can I find it?



  • I never really managed to build Qt4 with the intel compiler on windows, the previous version, not the one in XE2013



  • I am trying to build Qt 4.8.4 on a Mac (10.8.2). The mkspec settings for macx-icc do not work, as pointed out by the OP here. If anyone has succeeded in building this package, please post your fixes. Thanks.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.