Qt 6.9.3/6.10.0: Compile source for iOS-Simulator failes
-
Hi,
because the plugin
QDarwinCameraPermissionPlugin_init.cpp.ois build for iOS only, my app fails linking if it was compiled for iOS-Simulator. The only solution I found so far is to recompile the source for iOS-Simulator. When I try this I get at least the following error which I can't solve:ERROR: detected a std::atomic implementation that fails for function pointers. CMake Error at qtbase/cmake/QtBuildInformation.cmake:240 (message): Check the configuration messages for an error that has occurred. Call Stack (most recent call first): qtbase/cmake/QtBuildInformation.cmake:59 (qt_configure_print_summary) qtbase/cmake/QtBaseTopLevelHelpers.cmake:97 (qt_print_feature_summary) qtbase/cmake/QtBaseTopLevelHelpers.cmake:76 (qt_internal_print_top_level_info) CMakeLists.txt:124 (qt_internal_top_level_end) -- Configuring incomplete, errors occurred! CMake Error at qtbase/cmake/QtProcessConfigureArgs.cmake:1171 (message): CMake exited with code 1. CMake Error at cmake/QtIRProcessHelpers.cmake:173 (message): /opt/Qt/6.9.3/Src/qtbase/configure -top-level LLVM_INSTALL_DIR=/opt/homebrew/opt/llvm FEATURE_clang=ON FEATURE_clangcpp=ON -no-opengl -platform macx-ios-clang -debug -qt-host-path /opt/Qt/6.9.3/macos -sdk iphonesimulator -- -DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm/bin/clang -DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++ -DCMAKE_APPLE_ARCH_SYSROOTS=iphonesimulator -DQT_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_ARCHITECTURES=arm64 -DQt6OpcUaTools_DIR=/opt/Qt/6.9.3/Src/qtbase/lib/cmake/Qt6OpcUaTools -DCMAKE_THREAD_LIBS_INIT=-lpthread -DCMAKE_HAVE_THREADS_LIBRARY=1 -DCMAKE_USE_WIN32_THREADS_INIT=0 -DCMAKE_USE_PTHREADS_INIT=1 -DTHREADS_PREFER_PTHREAD_FLAG=ON exited with status: 1 Call Stack (most recent call first): cmake/QtTopLevelHelpers.cmake:35 (qt_ir_execute_process_and_log_and_handle_error) cmake/QtTopLevelHelpers.cmake:57 (qt_tl_run_toplevel_configure) cmake/QtTopLevelConfigureScript.cmake:16 (qt_tl_run_main_script)I tried already with the native CLang compiler from Apple, but got the same error. Then I tried with the one in homebrew and the problem is the same. Does anybody know a way to fix this? Is there a way around it?
I'm on a Mac Mini with Apple silicon (M1). The OS version is 26.
Alternatively, if someone has the file
QDarwinCameraPermissionPlugin_init.cpp.oalready compiled for architecturearm64andiOS-SimulatorI would be glad if you can share this file.A.T.
-
Hi,
because the plugin
QDarwinCameraPermissionPlugin_init.cpp.ois build for iOS only, my app fails linking if it was compiled for iOS-Simulator. The only solution I found so far is to recompile the source for iOS-Simulator. When I try this I get at least the following error which I can't solve:ERROR: detected a std::atomic implementation that fails for function pointers. CMake Error at qtbase/cmake/QtBuildInformation.cmake:240 (message): Check the configuration messages for an error that has occurred. Call Stack (most recent call first): qtbase/cmake/QtBuildInformation.cmake:59 (qt_configure_print_summary) qtbase/cmake/QtBaseTopLevelHelpers.cmake:97 (qt_print_feature_summary) qtbase/cmake/QtBaseTopLevelHelpers.cmake:76 (qt_internal_print_top_level_info) CMakeLists.txt:124 (qt_internal_top_level_end) -- Configuring incomplete, errors occurred! CMake Error at qtbase/cmake/QtProcessConfigureArgs.cmake:1171 (message): CMake exited with code 1. CMake Error at cmake/QtIRProcessHelpers.cmake:173 (message): /opt/Qt/6.9.3/Src/qtbase/configure -top-level LLVM_INSTALL_DIR=/opt/homebrew/opt/llvm FEATURE_clang=ON FEATURE_clangcpp=ON -no-opengl -platform macx-ios-clang -debug -qt-host-path /opt/Qt/6.9.3/macos -sdk iphonesimulator -- -DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm/bin/clang -DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++ -DCMAKE_APPLE_ARCH_SYSROOTS=iphonesimulator -DQT_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_ARCHITECTURES=arm64 -DQt6OpcUaTools_DIR=/opt/Qt/6.9.3/Src/qtbase/lib/cmake/Qt6OpcUaTools -DCMAKE_THREAD_LIBS_INIT=-lpthread -DCMAKE_HAVE_THREADS_LIBRARY=1 -DCMAKE_USE_WIN32_THREADS_INIT=0 -DCMAKE_USE_PTHREADS_INIT=1 -DTHREADS_PREFER_PTHREAD_FLAG=ON exited with status: 1 Call Stack (most recent call first): cmake/QtTopLevelHelpers.cmake:35 (qt_ir_execute_process_and_log_and_handle_error) cmake/QtTopLevelHelpers.cmake:57 (qt_tl_run_toplevel_configure) cmake/QtTopLevelConfigureScript.cmake:16 (qt_tl_run_main_script)I tried already with the native CLang compiler from Apple, but got the same error. Then I tried with the one in homebrew and the problem is the same. Does anybody know a way to fix this? Is there a way around it?
I'm on a Mac Mini with Apple silicon (M1). The OS version is 26.
Alternatively, if someone has the file
QDarwinCameraPermissionPlugin_init.cpp.oalready compiled for architecturearm64andiOS-SimulatorI would be glad if you can share this file.A.T.
I must reply to my own question. In the mean time I found the problem. I defined the parameter:
-DCMAKE_APPLE_ARCH_SYSROOTS=iphonesimulatorThis is wrong because it must be a path to the SDK root. After removing this parameter
configuresucceeded and it compiled as expected.A.T.
-
T TheoSys has marked this topic as solved on