Important: Please read the Qt Code of Conduct -

[SOLVED] Trouble Building Qtbase 5.2.1-ish on Mac. Problem with xcb.

  • Hello...

    I have the Qtbase git clone "2b3f293 Android: Refactor the InputType mapping code."

    I'm trying to build it on Mac OS 10.8.5, Xcode 5.0.2

    If I use
    @./configure -debug -prefix /Projects/Qt5.2.1RC1 -debug-and-release -sdk macosx10.8@

    I end up with:
    @Running configuration tests...
    The test for linking against libxcb and support libraries failed!
    You might need to install dependency packages, or pass -qt-xcb.
    See src/plugins/platforms/xcb/README.@

    The README doesn't mention the Mac, but I installed <code>xcb</code> via macports, which landed in <code>/opt/local/{bin,lib,include}/xcb</code>. <code>configure</code> still isn't seeing it.

    If I add the <code>-qt-xcb</code> to <code>configure</code>, then <code>configure</code> finishes. But then I have a problem with the make:

    @/Applications/ -c -pipe -g -gdwarf-2 -fPIC -w -isysroot /Applications/ -mmacosx-version-min=10.6 -fno-exceptions -Wall -W -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_GUI_LIB -DQT_CORE_LIB -I../../../../../mkspecs/macx-clang -I. -I../../../../3rdparty/xcb/include -I../../../../3rdparty/xcb/include/xcb -I../../../../3rdparty/xcb/sysinclude -I../../../../../lib/QtGui.framework/Versions/5/Headers -I../../../../../lib/QtCore.framework/Versions/5/Headers -I.moc -I/Applications/ -I/Applications/ -F/Volumes/Projects/Qt5.2.1.RC1/qtbase/lib -o .obj/xfixes.o ../../../../3rdparty/xcb/libxcb/xfixes.c
    In file included from ../../../../3rdparty/xcb/libxcb/xfixes.c:8:
    ../../../../3rdparty/xcb/sysinclude/xcbext.h:1:10: fatal error: 'xcb/xcbext.h' file not found
    #include <xcb/xcbext.h>
    1 error generated.@
    Is this something I should/can ignore? I believe xcb is an X11-ism, which I'm not using at all, as far as I know.

    Thanks for any/all help!


  • Moderators

    XCB is not needed on Mac. Something is definitely wrong. Try updating your repository. Before that, maybe try also passing the mkspecs: -platform macx-clang

    And make sure you have a clean repository before running configure:
    git reset --hard
    git clean -dxf

  • Lifetime Qt Champion


    You can just pass -no-xcb when configuring and you should be fine

  • Yeah, I thought that was weird. I already cleaned the local repository by deleting it and cloning another. I'll try updating the mkspecs.


  • [quote author="SGaist" date="1389212287"]Hi,

    You can just pass -no-xcb when configuring and you should be fine[/quote]

    And that's different from -qt-xcb ? Ah, I see that it is... I'll try that. Thanks!

  • Lifetime Qt Champion

    Yes, it disables xcb entirely.

    IIRC there's a glitch in the configure script when pkg-config can be found on OS X, that's why it tries to build the xcb platform plugin

  • Thanks , SGaist! That did the trick!

    I love these forums... :)

  • Moderators

    [quote author="EricRFMA" date="1389235589"]I love these forums... :)

    You can make them even better by marking your thread as solved ;) I've already tagged it for you.

Log in to reply