[Interest] Compiling a 32-bit application on Macintosh with Qt 5.9 fails

Adam Light aclight at gmail.com
Thu Jul 27 18:00:38 CEST 2017


I'm not able to successfully compile a project (even an essentially empty
project created with the Qt Creator wizard) for 32-bit on Macintosh using
Qt 5.9.2.

It looks like the problem is due to the "-arch x86_64" flag being
improperly inserted into the compiler command. Here's the full command for
one of the files:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
-c -pipe -stdlib=libc++ -g -std=gnu++11 -arch x86_64 -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
-mmacosx-version-min=10.10 -Wall -W -fPIC -DQT_DEPRECATED_WARNINGS
-DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
-I../exceptionsTest -I.
-I/qtbuild59/install/mac32/lib/QtWidgets.framework/Headers
-I/qtbuild59/install/mac32/lib/QtGui.framework/Headers
-I/qtbuild59/install/mac32/lib/QtCore.framework/Headers -I.
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/OpenGL.framework/Headers
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/AGL.framework/Headers
-I. -I/qtbuild59/install/mac32/mkspecs/macx-clang
-F/qtbuild59/install/mac32/lib -o main.o ../exceptionsTest/main.cpp


Here is the "Effective qmake call" from the qmake build step in Creator.
This is the default command--I haven't specified any additional arguments.

qmake
/Users/aclight/Documents/qtbugreports/exceptionsTest/exceptionsTest/exceptionsTest.pro
-spec macx-clang CONFIG+=x86 CONFIG+=qml_debug && /usr/bin/make qmake_all


I'm using my own build of Qt from a git checkout of the 5.9 branch (checked
out yesterday afternoon) with the following configure command:

MAKEFLAGS=-j8 ../../qt/configure -confirm-license -debug-and-release
-force-debug-info -opensource -gui -widgets -qpa cocoa -no-qml-debug
-nomake examples -nomake tests -silent -no-sql-mysql -platform macx-clang
QMAKE_APPLE_DEVICE_ARCHS=i386  -skip declarative -prefix
/qtbuild59/install/mac32

I wonder whether https://codereview.qt-project.org/#/c/171757/ is the cause
of this problem.

I'm not sure if this is a bug or just a change in how things work for which
I need to make adjustments to my build configuration. I'm happy to file a
bug report if that's appropriate.

I'm using Xcode 8.3.3 on Sierra.

Thanks
Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170727/b4a7eb33/attachment.html>


More information about the Interest mailing list