Qt source build with -qtlibinfix, and -framework

  • I'm building Qt from source on MacOS using Sierra and High Sierra and I'm running to a problem where projects built with my build of Qt fail to compile.

    The configure command that I'm using contains the -qtlibinfix ABC and -framework options:

    ./configure -prefix /home/Qt/abc -opensource -qtlibinfix ABC -framework ...

    The Qt source project builds and installs correctly (via make and make install), but subsequent projects built with the installed qmake binary fail to compile.

    Executing /home/Qt/abc/bin/qmake on a project file is successful, but there is a mismatch between the installed location of the Qt frameworks and the include paths sent to clang.

    The installation paths of the Qt frameworks contain the qtlibinfix (ABC):


    but the directories that are included with the qmake-generated builds do not:

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ ... -I/home/Qt/abc/lib/QtWidgets.framework/Headers ...

    Is this a bug or am I missing a step between running "make install" and "qmake"?

    This is reproducible on numerous versions of Qt (5.7.0, 5.8.0, 5.10.0).


    Here is a partial listing of the installed qt core lib project include file (mkspecs/modules/qt_lib_core.pri):

    QT.core.VERSION = 5.10.0
    QT.core.name = QtCore
    QT.core.module = QtCoreWRI
    QT.core.libs = $$QT_MODULE_LIB_BASE
    QT.core.includes = $$QT_MODULE_LIB_BASE/QtCore.framework/Headers
    QT.core.frameworks = $$QT_MODULE_LIB_BASE
    QT.core.bins = $$QT_MODULE_BIN_BASE
    QT.core.depends =
    QT.core.uses = libatomic
    QT.core.module_config = v2 lib_bundle
    QT.core.CONFIG = moc resources

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Looks like it might be related to QTBUG-35604.

  • Thanks! It looks like the behaviour that I'm seeing is due to the bug that you've linked.

    I'll build without frameworks.

Log in to reply

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