Source build of 32 bit Qt 5.5 on Mac os 10.7 causes error: use of unknown builtin '__builtin_bswap16' in endian_inl.h

  • I'm trying to build Qt 5.5 commercial from source because I need to use some 32 bit frameworks. So I compiled on 10.7 with XCode 4.6.3 and the OS 10.8 SDK using the following command line:

    make -platform macx-clang-32

    However I get an error as follows:

    ../../../3rdparty/libwebp/src/utils/./endian_inl.h:51:10: error: use of unknown builtin '__builtin_bswap16' [-Wimplicit-function-declaration]
    return __builtin_bswap16(x);

    Here is the full output:

    /Applications/ -c -pipe -arch i386 -g -isysroot /Applications/ -mmacosx-version-min=10.7 -fvisibility=hidden -fno-exceptions -Wall -W -fPIC -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -I. -I../../../3rdparty/libwebp -I../../../3rdparty/libwebp/src -I../../../3rdparty/libwebp/src/dec -I../../../3rdparty/libwebp/src/enc -I../../../3rdparty/libwebp/src/dsp -I../../../3rdparty/libwebp/src/mux -I../../../3rdparty/libwebp/src/utils -I../../../3rdparty/libwebp/src/webp -I/Users/will/Qt/5.5/Src/qtbase/lib/QtGui.framework/Headers -I/Users/will/Qt/5.5/Src/qtbase/lib/QtCore.framework/Headers -I.moc/debug -I/Applications/ -I/Applications/ -I/Users/will/Qt/5.5/Src/qtbase/mkspecs/macx-clang-32 -F/Users/will/Qt/5.5/Src/qtbase/lib -o .obj/debug/Users/will/Qt/5.5/Src/qtimageformats/src/3rdparty/libwebp/src/dec/tree.o ../../../3rdparty/libwebp/src/dec/tree.c
    In file included from ../../../3rdparty/libwebp/src/dec/tree.c:15:
    In file included from ../../../3rdparty/libwebp/src/dec/../utils/bit_reader_inl.h:29:
    ../../../3rdparty/libwebp/src/utils/./endian_inl.h:51:10: error: use of unknown builtin '__builtin_bswap16' [-Wimplicit-function-declaration]
    return __builtin_bswap16(x);
    1 error generated.
    make[6]: *** [.obj/debug/Users/will/Qt/5.5/Src/qtimageformats/src/3rdparty/libwebp/src/dec/tree.o] Error 1
    make[5]: *** [debug-all] Error 2
    make[4]: *** [sub-webp-make_first] Error 2
    make[3]: *** [sub-imageformats-make_first] Error 2
    make[2]: *** [sub-plugins-make_first] Error 2
    make[1]: *** [sub-src-make_first] Error 2
    make: *** [module-qtimageformats-make_first] Error 2

  • Lifetime Qt Champion


    Looks like chromium hit something similar with webp. You should go to the bug report system and check wether it's something know, if not please consider opening a new report

Log in to reply

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