Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build with Qt 6.2.13 in Qt Creator for iOS and iOS Simulator #2

Open
alexandrkirilov opened this issue Jan 15, 2025 · 4 comments

Comments

@alexandrkirilov
Copy link

alexandrkirilov commented Jan 15, 2025

When trying to build it for iOS with Qt Creator have this kind of errors.

When simulator:
`
warning: ONLY_ACTIVE_ARCH=YES requested with multiple ARCHS and no active architecture could be computed; building for all applicable architectures (in target 'ALL_BUILD' from project 'QSQLite3MultipleCiphers')
note: Run script build phase 'Generate CMakeFiles/ALL_BUILD' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'ALL_BUILD' from project 'QSQLite3MultipleCiphers')
warning: ONLY_ACTIVE_ARCH=YES requested with multiple ARCHS and no active architecture could be computed; building for all applicable architectures (in target 'sqlite3mc_static' from project 'QSQLite3MultipleCiphers')
warning: ONLY_ACTIVE_ARCH=YES requested with multiple ARCHS and no active architecture could be computed; building for all applicable architectures (in target 'ZERO_CHECK' from project 'QSQLite3MultipleCiphers')
note: Run script build phase 'Generate CMakeFiles/ZERO_CHECK' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'ZERO_CHECK' from project 'QSQLite3MultipleCiphers')
warning: ONLY_ACTIVE_ARCH=YES requested with multiple ARCHS and no active architecture could be computed; building for all applicable architectures (in target 'sqlite3mc_static_autogen' from project 'QSQLite3MultipleCiphers')
note: Run script build phase 'Generate SQLite3MultipleCiphers/CMakeFiles/sqlite3mc_static_autogen' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'sqlite3mc_static_autogen' from project 'QSQLite3MultipleCiphers')
** BUILD FAILED **

The following build commands failed:
Ld /Users/alexandr/Tools/QSQLite3MultipleCiphers/QSQLite3MultipleCiphers/build/Qt_6_2_13_for_iOS_Simulator/build/QSQLite3MultipleCiphers.build/Debug-iphonesimulator/Objects-normal/arm64/Binary/libQSQLite3MultipleCiphers.dylib normal arm64 (in target 'QSQLite3MultipleCiphers' from project 'QSQLite3MultipleCiphers')
(1 failure)
19:52:00: The process "/Users/alexandr/Tools/QtCommercial/Tools/CMake/CMake.app/Contents/bin/cmake" exited with code 65.
19:52:00: Error while building/deploying project QSQLite3MultipleCiphers (kit: Qt 6.2.13 for iOS Simulator)
19:52:00: When executing step "Build"
19:52:00: Elapsed time: 00:01
`

When iOS Device:

`
Build description signature: fe7d980eed1519cd904dcd31c1a32c10
Build description path: /Users/alexandr/Tools/QSQLite3MultipleCiphers/QSQLite3MultipleCiphers/build/Qt_6_2_13_for_iOS/build/XCBuildData/fe7d980eed1519cd904dcd31c1a32c10.xcbuilddata
note: Run script build phase 'Generate CMakeFiles/ZERO_CHECK' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'ZERO_CHECK' from project 'QSQLite3MultipleCiphers')
note: Run script build phase 'Generate CMakeFiles/ALL_BUILD' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'ALL_BUILD' from project 'QSQLite3MultipleCiphers')
note: Run script build phase 'Generate SQLite3MultipleCiphers/CMakeFiles/sqlite3mc_static_autogen' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'sqlite3mc_static_autogen' from project 'QSQLite3MultipleCiphers')
/Users/alexandr/Tools/QSQLite3MultipleCiphers/QSQLite3MultipleCiphers/build/Qt_6_2_13_for_iOS/QSQLite3MultipleCiphers.xcodeproj: error: Signing for "QSQLite3MultipleCiphers" requires a development team. Select a development team in the Signing & Capabilities editor. (in target 'QSQLite3MultipleCiphers' from project 'QSQLite3MultipleCiphers')
note: Run script build phase 'Generate CMakeFiles/QSQLite3MultipleCiphers_autogen' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'QSQLite3MultipleCiphers_autogen' from project 'QSQLite3MultipleCiphers')
** BUILD FAILED **

19:54:03: The process "/Users/alexandr/Tools/QtCommercial/Tools/CMake/CMake.app/Contents/bin/cmake" exited with code 65.
19:54:03: Error while building/deploying project QSQLite3MultipleCiphers (kit: Qt 6.2.13 for iOS)
19:54:03: The kit Qt 6.2.13 for iOS has configuration issues which might be the root cause for this problem.
19:54:03: When executing step "Build"
`

@alexandrkirilov
Copy link
Author

For Android and MacOS all is ok

@alexandrkirilov
Copy link
Author

Additional error when trying to build with Qt 6.8.1 for iOS Simulator

Undefined symbols for architecture x86_64: "_SecRandomCopyBytes", referenced from: _entropy in libsqlite3mc_static.a[x86_64][2](sqlite3mc.o) "_kSecRandomDefault", referenced from: _entropy in libsqlite3mc_static.a[x86_64][2](sqlite3mc.o) ld: symbol(s) not found for architecture x86_64 clang++: error: linker command failed with exit code 1 (use -v to see invocation)

@alexandrkirilov
Copy link
Author

The solution for this issue is to add "-framework Security" to target_link_libraries when building for iOS
target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::Core Qt6::CorePrivate Qt6::SqlPrivate "-framework Security" )

When building for iOS Simulator for now BUG with Qt 6.2.13 and Qt 6.8.1 there are wrong library in Qt Distribution:
ld: building for 'iOS-simulator', but linking in object file (/Users/alexandr/Tools/QtCommercial/6.8.1/ios/plugins/sqldrivers/objects-Debug/QSQLiteDriverPlugin_init/QSQLiteDriverPlugin_init.cpp.o) built for 'iOS'

@FalsinSoft
Copy link
Owner

Hi
do you know that is the effect of this option "framework Security"? I tried to do a quick search but I didn't find anything explaining the use of it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants