Solved Latest release of Qt does not work with XCode 8.2.1 on macOS Sierra
-
What is the procedure to get this to work properly?
Is there a specific order that one must install? Xcode, CLT, Qt..OR..CLT, Xcode..OR Qt, CLT, XCode? AND…what about the Android shit..do I need the latest Android and Java SDKs NDKs et al???
Is there a certain way projects from an older version of Creator must be imported?
Certainly, I'm not the only developer to run into this issue. What has everyone else done? Tips? Hints?
History..
I had a working IDE..XCode, Qt, iOS and Android ALL worked. I was able to test iOS apps on both an actual device..iPhone4 and the iOS simulator. I was able to test and release an Android apps to the Google Play store. I tried to release the same app to the Apple Store. Nope..sorry. You have to upgrade to Sierra to do that. OH, BTW you need to get the latest version of Xcode. OH, BTW, you need the latest version of Qt. Now NOTHING WORKS!!!!!
I installed the MacOS Sierra first. This was an Upgrade from 10.8.5 Mt Lion to 10.12.2 Sierra. Everything seemed to work OK MacOS/Sierra-wise.
I next installed Xcode 8.2.1. I then installed Qt 4.0.3. I then Installed the CLTs. I Imported an old Qt .pro file that had previously work on my old IDE.
ERROR after ERROR after ERROR. This was when trying to just get the Desktop 5.7.0 clang 64bit version to work. Finally got Desktop running.
Tried the Android kit.. Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_0 and it doesn't work.
ERRORs!!!!!Tried the iOS kit..iphoneos_clang_Qt_5_7_0_for_iOS.. and surprise it does not work…Neither does the iOS Simulator.
ERRORs!!!!!Please don't ask me to list the errors..I wouldn't begin to know where to start..too many.
-
Hi
Ok, there is nothing like
"Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild without arguments."
or anything like that?https://forum.qt.io/topic/71119/project-error-xcode-not-set-up-properly/8
-
Hi,
To add to @mrjj, Apple broke several things with their latest Xcode update. Some of which have already been fixed but you should update Qt to a more recent version like 5.7.1 or even 5.8RC (5.8.0 should be released next week if everything goes to plan)
-
Thx. Tried that. But I may have done it incorrectly? I went into the Xcode bundle at /Contents/Developer/usr/bin and double clicked to run it.
Thx for the link..I ran into most of the errors being discussed..but did not find the answers in a single thread like that.
-
Qt 5.7.0 (Clang 7.0 (Apple), 64 bit) with Creator 4.0.3.
I'm going to try version 8.0 of Xcode with the version of Qt/Creator listed above. If that doesn't go anywhere. 8.1, then 8.2. then Try updating to a newer Qt/Creator version.
Thx for the replies..
-
@PSI_lbc Why not first update Qt to 5.7.1 ?
-
It's pointless to try with the 8.0 version of Xcode, that's the version that introduced these breakage. Just use the latest and a more recent version of Qt.
-
Update qt and Xcode to latest versions. Everything works without any issue.
-
That's what I did right after the OS update to Sierra.
I used the Maintenance Tool to get the latest Qt version. Prior I was using 5.7.0.
-
-
Then go with 5.8RC
-
OK. Rolled back and started over.
Re-downloaded the Xcode and CLT installer from the Apple Dev site. Ran the CLT install. Ran the Xcode install. Ran the Sudo xcodebuild -install. Agreed to the license. Use the Qt MaintainanceTool to update. Ran it to get a new MT, then ran the MT again to get the updates. Ran Creator to check version/build. OK. 5.7.1. Run Creator. Open an existing project. Android and Desktop kit available. No iOS. Quit Creator. Run Xcode. Do nothing. Exit Xcode. Run Creator. Now iOS kit are available. ?? Build a desktop version.
--results--
Desktop build..General Messages after Build>qmake
Checking for license updates ...
/bin/sh: /Developer/Android-NDK/android-ndk-r10b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++: No such file or directory
Checking for updated license succeeded (3 licenses fetched)Desktop build worked.
Android build (debug) 1st pass..
The API level set for the APK is less than the minimum required by the kit.
The minimum API level required by the kit is 16.
Error while building/deploying project qSpine (kit: Android for armeabi-v7a (GCC 4.8, Qt 5.7.1))
When executing step "Build Android APK"Changed the API levels in the manifest from min API 9 to API 16 and target API 14 to API 16
QtMobile-5.7/5.7/android_armv7/mkspecs/android-g++ -o main.o ../main.cpp
arm-linux-androideabi-g++: error: unrecognized command line option '-fstack-protector-strong'
make: *** [main.o] Error 1The '-fstack-protector-strong' option flag is in the makefile..
CFLAGS = -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove --sysroot=/Developer/Android-NDK/android-ndk-r10b/platforms/android-16/arch-arm/ -g -marm -O0 -Wall -W -D_REENTRANT -fPIC $(DEFINES)
CXXFLAGS = -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove --sysroot=/Developer/Android-NDK/android-ndk-r10b/But I don’t know why it’s failing. What is “-fstack-protector-strong”? Why is it needed and can it be disabled. Or commented out?
Looking…
-
@PSI_lbc From the error message:
"The API level set for the APK is less than the minimum required by the kit.
The minimum API level required by the kit is 16."
You should set higher API level version. Your Qt Kit requires at least 16.
After this change run qmake and do a complete rebuild. -
Yep. Thx. Set it in the AndroidManifest.xml
-
In file -> ../android_armv7/mkspecs/commonandroid-base-tail.conf
commented out -fstack-protector-strong from next line LBC re: arm-linux-androideabi-g++: error: unrecognized command line option '-fstack-protector-strong'
#QMAKE_CFLAGS += -fstack-protector-strong -DANDROID
QMAKE_CFLAGS += -DANDROID -
Next problem...
21:48:22: Starting: "/Developer/SDKs/QtMobile-5.7/5.7/android_armv7/bin/androiddeployqt" --input /Users/PSI/Projects/Qt-Mobile/OT2Go/qSpine/build-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Debug/android-libqSpine.so-deployment-settings.json --output /Users/PSI/Projects/Qt-Mobile/OT2Go/qSpine/build-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Debug/android-build --deployment bundled --android-platform android-21 --jdk /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home --ant /usr/bin/ant
Warning: QML import could not be resolved in any of the import paths: Qt.test.qtestroot
Warning: QML import could not be resolved in any of the import paths: QtQuick.Extras.Private.CppUtils
Warning: QML import could not be resolved in any of the import paths: QtQuick.Extras.Private.CppUtils
sh: /usr/bin/ant: No such file or directory
Building the android package failed!
-- For more information, run this command with --verbose.
Generating Android Package
Input file: /Users/PSI/Projects/Qt-Mobile/OT2Go/qSpine/build-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Debug/android-libqSpine.so-deployment-settings.json
Output directory: /Users/PSI/Projects/Qt-Mobile/OT2Go/qSpine/build-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Debug/android-build/
Application binary: /Users/PSI/Projects/Qt-Mobile/OT2Go/qSpine/build-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Debug/libqSpine.so
Android build platform: android-21
Install to device: No
21:48:29: The process "/Developer/SDKs/QtMobile-5.7/5.7/android_armv7/bin/androiddeployqt" exited with code 14.
Error while building/deploying project qSpine (kit: Android for armeabi-v7a (GCC 4.8, Qt 5.7.1))
When executing step "Build Android APK"
21:48:29: Elapsed time: 00:54. -
@PSI_lbc you need to install Ant on your host PC
-
Or use Gradle, in any case updating the NDK to r10e would be a good idea.
-
@jsulm
Thx. I'll locate and try Ant first -
@SGaist
By NDK, do you mean just the NDK or SDK, NDK, Apache, and ADK?Thx.