Important: Please read the Qt Code of Conduct -

QtWebEngine not building on OSX using x86 flags

  • I have been trying to compile QtWebEngine using Qt5.2.0. I used on both compilation the x86 flag. On Qt5.2.0 with no issue, but when trying to compile QtWebEngine everything looks good until it tries to link it:

    These are the flags I use for the qmake on QtWebEngine
    @ qmake -r -spec macx-clang-32 CONFIG+=debug x86@

    The thing is that during this phase:
    @SOLINK libQt5WebEngineCore.dylib, POSTBUILDS@

    It displays this command:
    @if [ ! -e libQt5WebEngineCore.dylib -o ! -e libQt5WebEngineCore.dylib.TOC ] || otool -l libQt5WebEngineCore.dylib | grep -q LC_REEXPORT_DYLIB ; then clang++ -shared -Wl,-search_paths_first -stdlib=libc++ -mmacosx-version-min=10.7 -isysroot /Applications/ -arch x86_64 -L. -install_name /Users/bertus/Projects/xxxxx/lib/vendor/qtwebengine/5.2.0/out/Debug/libQt5WebEngineCore.dylib -F/Users/bertus/Projects/xxxxx/lib/vendor/qt/5.2.0/qtbase/lib -o libQt5WebEngineCore.dylib obj/src/core/Qt5WebEngineCore.backing_store_qt.o obj/src/core/Qt5WebEngineCore.chromium_overrides.o obj/src/core/common/Qt5WebEngineCore.qt_messages.o ......@

    And it fails displaying some warnings and:
    ld: warning: ignoring file /Users/bertus/Projects/xxxx/lib/vendor/qt/5.2.0/qtbase/lib/QtCore.framework/QtCore, file was built for unsupported file format ( 0xce 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 0 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (x86_64): /Users/bertus/Projects/xxxx/lib/vendor/qt/5.2.0/qtbase/lib/QtCore.framework/QtCore
    Undefined symbols for architecture x86_64:
    Undefined symbols for architecture x86_64:
    "qt_assert_x(char const*, char const*, char const*, int)", referenced from:
    content::RenderWidgetHostView::CreateViewForWidget(content::RenderWidgetHost*) in Qt5WebEngineCore.chromium_overrides.o
    (anonymous namespace)::MessagePumpForUIQt::Quit() in Qt5WebEngineCore.content_browser_client_qt.o
    QtShareGLContext::QtShareGLContext(QOpenGLContext*) in Qt5WebEngineCore.content_browser_client_qt.o
    QtShareGLContext::Initialize(gfx::GLSurface*, gfx::GpuPreference) in Qt5WebEngineCore.content_browser_client_qt.o
    QtShareGLContext::Destroy() in Qt5WebEngineCore.content_browser_client_qt.o
    QtShareGLContext::MakeCurrent(gfx::GLSurface*) in Qt5WebEngineCore.content_browser_client_qt.o
    QtShareGLContext::ReleaseCurrent(gfx::GLSurface*) in Qt5WebEngineCore.content_browser_client_qt.o

    The reason why I think is wrong is cause it is trying to use -arch x86_64 while on the qmake I have explicity set a x86 architecture. Also noticed that the -mmacosx-version-min=10.7 is forced to 10.7 while on the Makefile's for the QtWebEngine projects is set to 10.6 and x86 architecture correctly.

    Is there any place where I can ensure to use the x86 architecture?

  • I tried also with the standard configuration to build it on x86_64 but it also displays a linker error:

    Undefined symbols for architecture x86_64:
    "ui::GetFlingData(NSEvent* const&, float*, float*, float*, float*, bool*)", referenced from:
    ui::ScrollEvent::ScrollEvent(NSEvent* const&) in libui.a(ui.event.o)
    "ui::GetScrollOffsets(NSEvent* const&, float*, float*, float*, float*, int*)", referenced from:
    ui::ScrollEvent::ScrollEvent(NSEvent* const&) in libui.a(ui.event.o)
    "ui::GetChangedMouseButtonFlagsFromNative(NSEvent* const&)", referenced from:
    ui::MouseEvent::MouseEvent(NSEvent* const&) in libui.a(ui.event.o)
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    I've created also a bug report:

Log in to reply