Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
2.6.0, 2.5.1, 2.6.1
-
None
-
macOS 15.4, XCode 16.2, Qt 6.8.3, qbs 2.6.1
Description
There seems to be a problem with linking Qt 6.8.3 on iOS (simulator) to a qbs application. I've attached a minimal example to reproduce this with dependency on Qt.xml for reproduction.
Building the attached project with qbs for Qt 6.8.3 and ios-simulator results in the following linker error:
ERROR: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -Wl,-arch,x86_64,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk -stdlib=libc++ -L/usr/local/Qt/6.8.3/ios/lib -L/usr/local/Qt/6.8.3/ios/plugins/platforms -target x86_64-apple-ios16-macho -iframework/usr/local/Qt/6.8.3/ios/lib -o /Users/fkuhn/workspace/build/test/LinkFailureTest/debug/LinkFailureTest.acf19c59/.tmp/LinkFailureTest /Users/fkuhn/workspace/build/test/LinkFailureTest/debug/LinkFailureTest.acf19c59/3a52ce780950d4d9/main.cpp.o -lz -lm /usr/local/Qt/6.8.3/ios/lib/libQt6BundledPcre2.a -framework IOKit -framework UniformTypeIdentifiers -framework MobileCoreServices -framework UIKit -framework QtCore -framework Foundation -framework CoreFoundation ERROR: Undefined symbols for architecture x86_64: "QDomElement::setAttribute(QString const&, QString const&)", referenced from: testDom() in main.cpp.o "QDomDocument::createElement(QString const&)", referenced from: testDom() in main.cpp.o "QDomDocument::QDomDocument(QString const&)", referenced from: testDom() in main.cpp.o "QDomDocument::~QDomDocument()", referenced from: testDom() in main.cpp.o testDom() in main.cpp.o "QDomNode::appendChild(QDomNode const&)", referenced from: testDom() in main.cpp.o "QDomNode::~QDomNode()", referenced from: testDom() in main.cpp.o "QDomNode::~QDomNode()", referenced from: QDomElement::~QDomElement() in main.cpp.o "QDomDocument::toString(int) const", referenced from: testDom() in main.cpp.o ld: symbol(s) not found for architecture x86_64 clang++: error: linker command failed with exit code 1 (use -v to see invocation) ERROR: Process failed with exit code 1.
Building the same project with the same qbs for Qt 6.6.3 works fine.
The used qbs profiles look like this:
profiles.ios-simulator-6-8-3-x64.baseProfile: "xcode-iphonesimulator-x86_64" profiles.ios-simulator-6-8-3-x64.moduleProviders.Qt.qmakeFilePaths: ["/usr/local/Qt/6.8.3/ios/bin/qmake"] profiles.macOS-6-8-3-x64.architecture: "arm64" profiles.macOS-6-8-3-x64.baseProfile: "xcode-macosx-x86_64" profiles.macOS-6-8-3-x64.moduleProviders.Qt.qmakeFilePaths: ["/usr/local/Qt/6.8.3/macos/bin/qmake"] profiles.xcode-iphonesimulator-x86_64.baseProfile: "xcode-iphonesimulator" profiles.xcode-iphonesimulator-x86_64.qbs.architecture: "x86_64" profiles.xcode-iphonesimulator.baseProfile: "xcode" profiles.xcode-iphonesimulator.qbs.targetPlatform: "ios-simulator" profiles.xcode-macosx-x86_64.baseProfile: "xcode-macosx" profiles.xcode-macosx-x86_64.qbs.architecture: "x86_64" profiles.xcode-macosx.baseProfile: "xcode" profiles.xcode-macosx.qbs.targetPlatform: "macos" profiles.xcode.qbs.toolchainType: "xcode"
I'm using the following command line to build.
qbs build config:debug profile:ios-simulator-6-8-3-x64 -f ~/workspace/src/test/LinkFailureTest/LinkFailureTest.qbs project.LinkFailureTest.hostProfile:macOS-6-8-3-x64 modules.codesign.enableCodeSigning:false
According to nm, the Qt 6.8.3 framework seems to contain the corresponding symbol (and the output looks the same as for the corresponding Qt 6.6.3 library)
nm -gU /usr/local/Qt/6.8.3/ios/lib/QtXml.framework/QtXml |grep setAttribute 000000000000a4d0 T __ZN11QDomElement12setAttributeERK7QStringS2_ 000000000000a6dc T __ZN11QDomElement12setAttributeERK7QStringd 000000000000a630 T __ZN11QDomElement12setAttributeERK7QStringf 000000000000a4e0 T __ZN11QDomElement12setAttributeERK7QStringx 000000000000a588 T __ZN11QDomElement12setAttributeERK7QStringy 000000000000aaa0 T __ZN11QDomElement14setAttributeNSERK7QStringS2_S2_ 000000000000ac20 T __ZN11QDomElement14setAttributeNSERK7QStringS2_d 000000000000aab0 T __ZN11QDomElement14setAttributeNSERK7QStringS2_x 000000000000ab68 T __ZN11QDomElement14setAttributeNSERK7QStringS2_y 000000000000a868 T __ZN11QDomElement16setAttributeNodeERK8QDomAttr 000000000000adfc T __ZN11QDomElement18setAttributeNodeNSERK8QDomAttr 0000000000008b84 T __ZN18QDomElementPrivate12setAttributeERK7QStringS2_ 0000000000008cf8 T __ZN18QDomElementPrivate14setAttributeNSERK7QStringS2_S2_ 0000000000008fb0 T __ZN18QDomElementPrivate16setAttributeNodeEP15QDomAttrPrivate 00000000000090b4 T __ZN18QDomElementPrivate18setAttributeNodeNSEP15QDomAttrPrivate