Details
-
Bug
-
Resolution: Won't Do
-
P2: Important
-
None
-
5.9
-
None
-
Xcode 8.3.3 on Sierra.
Description
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 (from July 26, 2017) 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 related to this problem.