bincrafters / community

Central repository for issues and recipes
http://bincrafters.readthedocs.io/en/latest/
MIT License
218 stars 36 forks source link

qt/5.15.1: build iOS + xcode 12 #1273

Closed cajus closed 3 years ago

cajus commented 4 years ago

Did anyone manage to compile Qt for iOS/xcode 12 yet? While building the dependencies for iOS and macOS seems to work fine, qt only compiles for macOS. iOS runs directly into:

qt/5.15.1@foo/stable: Calling build()
+ cd qtbase
+ /Users/cajus/.conan/data/qt/5.15.1/foo/stable/source/qt5/qtbase/configure -top-level -static -confirm-license -silent -nomake examples -nomake tests -optimized-tools -prefix /Users/cajus/.conan/data/qt/5.15.1/foo/stable/package/81804c7ae15edb09ba80ecf5c2fbfbd61ee756c5 -extprefix /Users/cajus/.conan/data/qt/5.15.1/foo/stable/package/81804c7ae15edb09ba80ecf5c2fbfbd61ee756c5 -commercial -release -sdk iphoneos -skip qtactiveqt -skip qtscript -skip qtmultimedia -skip qtxmlpatterns -skip qtdoc -skip qtwayland -skip qt3d -skip qtimageformats -skip qtserialbus -skip qtserialport -skip qtx11extras -skip qtwinextras -skip qtandroidextras -skip qtwebchannel -skip qtwebengine -skip qtwebview -skip qtpurchasing -skip qtcharts -skip qtdatavis3d -skip qtvirtualkeyboard -skip qtgamepad -skip qtscxml -skip qtspeech -skip qtnetworkauth -skip qtremoteobjects -skip qtwebglplugin -skip qtlottie --zlib=system -opengl es2 -securetransport -no-openssl --glib=no --pcre=system --fontconfig=no --icu=no --sql-mysql=no --sql-psql=no --sql-odbc=no -system-doubleconversion -system-freetype -no-harfbuzz -system-libjpeg -system-libpng -no-sqlite -I /Users/cajus/.conan/data/zlib/1.2.11/foo/stable/package/4edaaa6016e1459684111771a1e707f8cd22eb0f/include ZLIB_LIBS=-lz -I /Users/cajus/.conan/data/pcre2/10.35/foo/stable/package/faf426559e185cb257cff899b39c093c31bff79f/include -D PCRE2_STATIC PCRE2_LIBS=-lpcre2-posix -lpcre2-8 -lpcre2-16 -lpcre2-32 -lz -lbz2 -I /Users/cajus/.conan/data/double-conversion/3.1.5/foo/stable/package/19273ca94f3cf3055128db0301ca03f6e0d43fb8/include DOUBLECONVERSION_LIBS=-ldouble-conversion FREETYPE_INCDIR=/Users/cajus/.conan/data/freetype/2.10.2/bjefoostable/package/763a019bb51c6a2da883804a2da963f688d497cf/include/freetype2 FREETYPE_LIBS=-lfreetype -lpng16 -lz -lbz2 -I /Users/cajus/.conan/data/libjpeg/9d/foo/stable/package/4edaaa6016e1459684111771a1e707f8cd22eb0f/include LIBJPEG_LIBS=-ljpeg -I /Users/cajus/.conan/data/libpng/1.6.37/foo/stable/package/0fc27b1c5e77a9db9662f36af99d98824f3e54a4/include LIBPNG_LIBS=-lpng16 -lz -L /Users/cajus/.conan/data/zlib/1.2.11/foo/stable/package/4edaaa6016e1459684111771a1e707f8cd22eb0f/lib -L /Users/cajus/.conan/data/pcre2/10.35/foo/stable/package/faf426559e185cb257cff899b39c093c31bff79f/lib -L /Users/cajus/.conan/data/bzip2/1.0.8/foo/stable/package/6212733bf96cfe7fa530a5aa48933deb10a9d521/lib -L /Users/cajus/.conan/data/double-conversion/3.1.5/foo/stable/package/19273ca94f3cf3055128db0301ca03f6e0d43fb8/lib -L /Users/cajus/.conan/data/freetype/2.10.2/foo/stable/package/763a019bb51c6a2da883804a2da963f688d497cf/lib -L /Users/cajus/.conan/data/libpng/1.6.37/foo/stable/package/0fc27b1c5e77a9db9662f36af99d98824f3e54a4/lib -L /Users/cajus/.conan/data/libjpeg/9d/foo/stable/package/4edaaa6016e1459684111771a1e707f8cd22eb0f/lib -xplatform macx-ios-clang QMAKE_CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang QMAKE_LINK_C=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang QMAKE_LINK_C_SHLIB=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang QMAKE_CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ QMAKE_LINK=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ QMAKE_LINK_SHLIB=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
Preparing build tree...
Creating qmake...
Done.
Info: creating super cache file /Users/cajus/.conan/data/qt/5.15.1/foo/stable/build/81804c7ae15edb09ba80ecf5c2fbfbd61ee756c5/.qmake.super
Info: creating cache file /Users/cajus/.conan/data/qt/5.15.1/foo/stable/build/81804c7ae15edb09ba80ecf5c2fbfbd61ee756c5/.qmake.cache
Info: creating stash file /Users/cajus/.conan/data/qt/5.15.1/foo/stable/build/81804c7ae15edb09ba80ecf5c2fbfbd61ee756c5/.qmake.stash
Project ERROR: Cannot run target compiler '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++'. Output:
===================
Apple clang version 12.0.0 (clang-1200.0.32.2)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/usr/include/c++/v1"
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-ios14.0.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name - -mrelocation-model pic -pic-level 2 -mthread-model posix -mframe-pointer=all -fno-strict-return -masm-verbose -munwind-tables -target-sdk-version=14.0 -target-cpu core2 -dwarf-column-info -debugger-tuning=lldb -target-linker-version 609 -v -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk -I/usr/local/include -stdlib=libc++ -internal-isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1 -internal-isystem /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/usr/local/include -internal-isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include -internal-externc-isystem /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/usr/include -internal-externc-isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-indentation -Wno-quoted-include-in-framework-header -Wno-implicit-fallthrough -Wno-enum-enum-conversion -Wno-enum-float-conversion -fdeprecated-macro -fdebug-compilation-dir /Users/cajus/.conan/data/qt/5.15.1/foo/stable/source/qt5/qtbase/mkspecs/features -ferror-limit 19 -fmessage-length 0 -stack-protector 1 -fstack-check -mdarwin-stkchk-strong-link -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fobjc-runtime=ios-14.0.0 -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -o /var/folders/w5/85r6p8rn48v081x49x3_4r_w0000gr/T/--82ce70.o -x c++ -
clang -cc1 version 12.0.0 (clang-1200.0.32.2) default target x86_64-apple-darwin19.6.0
ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/usr/local/include"
ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include
 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/usr/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks (framework directory)
End of search list.
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -no_deduplicate -dynamic -dylib -arch x86_64 -platform_version ios 14.0.0 14.0 -single_module -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk -o /dev/null -L/usr/local/lib -v /var/folders/w5/85r6p8rn48v081x49x3_4r_w0000gr/T/--82ce70.o -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/lib/darwin/libclang_rt.ios.a
@(#)PROGRAM:ld  PROJECT:ld64-609
BUILD 07:59:13 Aug 25 2020
configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em
Library search paths:
    /usr/local/lib
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/usr/lib
Framework search paths:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/usr/lib/libc++.tbd, missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/usr/lib/libc++.tbd (4 slices)
ld: building for iOS, but linking in object file built for iOS Simulator, file '/var/folders/w5/85r6p8rn48v081x49x3_4r_w0000gr/T/--82ce70.o' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
===================
Maybe you forgot to setup the environment?

This looks like some misconfiguration or simulator/device mixup. But I'm really not enough Apple guy to see what's going on there. Any ideas?

[settings]
arch=armv8
arch_build=x86_64
build_type=Release
compiler=apple-clang
compiler.libcxx=libc++
compiler.version=12.0
os=iOS
os.version=12.1
os_build=Macos
[options]
OpenSSL:no_asm=True
OpenSSL:no_engine=True
OpenSSL:no_ssl2=False
OpenSSL:no_ssl3=True
OpenSSL:no_weak_ssl_ciphers=True
OpenSSL:shared=False
bzip2:shared=False
freetype:shared=False
harfbuzz:shared=False
libcurl:shared=False
libjpeg:shared=False
libpng:shared=False
libsodium:shared=False
libxml2:fPIC=True
libxml2:reader=False
libxml2:shared=False
libxml2:writer=False
pcre2:shared=False
pcre2:support_jit=False
qt:commercial=True
qt:opengl=es2
qt:openssl=False
qt:qt3d=False
qt:qtactiveqt=False
qt:qtcharts=False
qt:qtconnectivity=True
qt:qtdatavis3d=False
qt:qtdeclarative=True
qt:qtdoc=False
qt:qtgamepad=False
qt:qtgraphicaleffects=True
qt:qtimageformats=False
qt:qtlocation=True
qt:qtlottie=False
qt:qtmacextras=True
qt:qtmultimedia=False
qt:qtnetworkauth=False
qt:qtpurchasing=False
qt:qtqa=False
qt:qtquickcontrols=True
qt:qtquickcontrols2=True
qt:qtremoteobjects=False
qt:qtrepotools=False
qt:qtscript=False
qt:qtscxml=False
qt:qtsensors=True
qt:qtserialbus=False
qt:qtserialport=False
qt:qtspeech=False
qt:qtsvg=True
qt:qttools=True
qt:qttranslations=True
qt:qtvirtualkeyboard=False
qt:qtwayland=False
qt:qtwebchannel=False
qt:qtwebengine=False
qt:qtwebglplugin=False
qt:qtwebsockets=True
qt:qtwebview=False
qt:qtwinextras=False
qt:qtx11extras=False
qt:qtxmlpatterns=False
qt:securetransport=True
qt:shared=False
qt:with_fontconfig=False
qt:with_glib=False
qt:with_harfbuzz=False
qt:with_icu=False
qt:with_libalsa=False
qt:with_libpng=True
qt:with_mysql=False
qt:with_odbc=False
qt:with_openal=False
qt:with_pq=False
qt:with_sdl2=False
qt:with_sqlite3=False
xkbcommon:shared=False
zxcvbn:shared=False
[build_requires]
*: darwin-toolchain/1.0.8@foo/stable
ericLemanissier commented 4 years ago

this looks like https://bugreports.qt.io/browse/QTBUG-86718

cajus commented 4 years ago

Ah. I did some search foo on the bugtracker there, but I didn't find that one. Thanks! Although the issue is about building a project instead of Qt itself, they may be related.

pawelgontarz commented 4 years ago

Hi, i have the same problem as You. Everything worked on xcode 11.7. Did you find a solution?

cajus commented 4 years ago

Yes. You can add this patch to your qt conan recipe for now: https://codereview.qt-project.org/c/qt/qtbase/+/314636

ericLemanissier commented 3 years ago

This recipe is now in the Conan Center Index.

Please migrate to the recipe version there. If this is still an issue, please create a new issue in the Conan Center Index issue tracker.

Thanks!

https://conan.io/center/qt