SQLite plugin rebuild and modification with Qt6 and CMake. How?
-
wrote on 16 Feb 2025, 08:48 last edited by bogong
Hello all!
Need to make some modification in SQLite driver and rebuild it with making another one and put in near original SQLite driver for being able to use it like any other sqldriver. Questions:
- How to add modified driver near others in Qt distribution? For example make copy of original, make some modification and put it back with another name.
- How to rebuild sqlite plugin separately (just only defined sqldriver) on MacOS? Is there option to build it from command shell? Is there option to build it in Qt Creator? Manuals with examples for Windows building process mostly only small part for MacOS.
- Is there anything special when building it for Android and iOS on MacOS? All of manual examples with Ninja, is it OK to use it when building for iOS? Or it need to be changed on Xcode?
-
wrote on 16 Feb 2025, 09:19 last edited by bogong
Tried to build plugins with Qt Creator when open project /Qt/6.8.2/Src/qtbase/src/plugins/sqldrivers/CMakeLists.txt
It's Ok when building it for MacOS, but for iOS and Android a lot of errors.
For iOS:[cmake] CMake Warning at /Users/alexandr/Tools/QtCommercial/6.8.2/ios/lib/cmake/Qt6/QtBuildHelpers.cmake:12 (message): [cmake] The officially supported CMake generator for building Qt is Ninja / Ninja [cmake] Multi-Config. You are using: 'Xcode' instead. Thus, you might encounter [cmake] issues. Use at your own risk. [cmake] Call Stack (most recent call first): [cmake] /Users/alexandr/Tools/QtCommercial/6.8.2/ios/lib/cmake/Qt6/QtBuildHelpers.cmake:406 (qt_internal_validate_cmake_generator) [cmake] /Users/alexandr/Tools/QtCommercial/6.8.2/ios/lib/cmake/Qt6/QtBuild.cmake:4 (qt_internal_setup_build_and_global_variables) [cmake] /Users/alexandr/Tools/QtCommercial/6.8.2/ios/lib/cmake/Qt6/QtSetup.cmake:6 (include) [cmake] /Users/alexandr/Tools/QtCommercial/6.8.2/ios/lib/cmake/Qt6/QtBuildRepoHelpers.cmake:21 (include) [cmake] /Users/alexandr/Tools/QtCommercial/6.8.2/ios/lib/cmake/Qt6/QtBuildRepoHelpers.cmake:232 (qt_build_internals_set_up_private_api) [cmake] CMakeLists.txt:28 (qt_build_repo_begin) [cmake] [cmake] [cmake] -- Building for multiple configurations: Release;Debug. [cmake] -- Main configuration is: Release. [cmake] CMake Error at /Users/alexandr/Tools/QtCommercial/6.8.2/ios/lib/cmake/Qt6/QtInstallHelpers.cmake:21 (install): [cmake] install TARGETS given OBJECT library "QSQLiteDriverPlugin_init" whose [cmake] objects may not be installed under Xcode with multiple architectures. [cmake] Call Stack (most recent call first): [cmake] /Users/alexandr/Tools/QtCommercial/6.8.2/ios/lib/cmake/Qt6/QtPluginHelpers.cmake:389 (qt_install) [cmake] sqlite/CMakeLists.txt:8 (qt_internal_add_plugin)
For Android:
[cmake] CMake Error at /Users/alexandr/Tools/QtCommercial/6.8.2/android_x86_64/lib/cmake/Qt6/QtFeature.cmake:376 (message): [cmake] Attempting to evaluate feature largefile but its definition is missing. [cmake] Either the feature does not exist or a dependency to the module that [cmake] defines it is missing [cmake] Call Stack (most recent call first): [cmake] /Users/alexandr/Tools/QtCommercial/6.8.2/android_x86_64/lib/cmake/Qt6/QtFeature.cmake:141 (qt_evaluate_feature) [cmake] /Users/alexandr/Tools/QtCommercial/6.8.2/android_x86_64/lib/cmake/Qt6/QtFeature.cmake:180 (qt_internal_evaluate_config_expression) [cmake] /Users/alexandr/Tools/QtCommercial/6.8.2/android_x86_64/lib/cmake/Qt6/QtTargetHelpers.cmake:73 (qt_evaluate_config_expression) [cmake] sqlite/CMakeLists.txt:72 (qt_internal_extend_target) [cmake] [cmake] [cmake] -- Configuring incomplete, errors occurred!
Is it Qt bug or something missing by me?
-
Tried to build plugins with Qt Creator when open project /Qt/6.8.2/Src/qtbase/src/plugins/sqldrivers/CMakeLists.txt
It's Ok when building it for MacOS, but for iOS and Android a lot of errors.
For iOS:[cmake] CMake Warning at /Users/alexandr/Tools/QtCommercial/6.8.2/ios/lib/cmake/Qt6/QtBuildHelpers.cmake:12 (message): [cmake] The officially supported CMake generator for building Qt is Ninja / Ninja [cmake] Multi-Config. You are using: 'Xcode' instead. Thus, you might encounter [cmake] issues. Use at your own risk. [cmake] Call Stack (most recent call first): [cmake] /Users/alexandr/Tools/QtCommercial/6.8.2/ios/lib/cmake/Qt6/QtBuildHelpers.cmake:406 (qt_internal_validate_cmake_generator) [cmake] /Users/alexandr/Tools/QtCommercial/6.8.2/ios/lib/cmake/Qt6/QtBuild.cmake:4 (qt_internal_setup_build_and_global_variables) [cmake] /Users/alexandr/Tools/QtCommercial/6.8.2/ios/lib/cmake/Qt6/QtSetup.cmake:6 (include) [cmake] /Users/alexandr/Tools/QtCommercial/6.8.2/ios/lib/cmake/Qt6/QtBuildRepoHelpers.cmake:21 (include) [cmake] /Users/alexandr/Tools/QtCommercial/6.8.2/ios/lib/cmake/Qt6/QtBuildRepoHelpers.cmake:232 (qt_build_internals_set_up_private_api) [cmake] CMakeLists.txt:28 (qt_build_repo_begin) [cmake] [cmake] [cmake] -- Building for multiple configurations: Release;Debug. [cmake] -- Main configuration is: Release. [cmake] CMake Error at /Users/alexandr/Tools/QtCommercial/6.8.2/ios/lib/cmake/Qt6/QtInstallHelpers.cmake:21 (install): [cmake] install TARGETS given OBJECT library "QSQLiteDriverPlugin_init" whose [cmake] objects may not be installed under Xcode with multiple architectures. [cmake] Call Stack (most recent call first): [cmake] /Users/alexandr/Tools/QtCommercial/6.8.2/ios/lib/cmake/Qt6/QtPluginHelpers.cmake:389 (qt_install) [cmake] sqlite/CMakeLists.txt:8 (qt_internal_add_plugin)
For Android:
[cmake] CMake Error at /Users/alexandr/Tools/QtCommercial/6.8.2/android_x86_64/lib/cmake/Qt6/QtFeature.cmake:376 (message): [cmake] Attempting to evaluate feature largefile but its definition is missing. [cmake] Either the feature does not exist or a dependency to the module that [cmake] defines it is missing [cmake] Call Stack (most recent call first): [cmake] /Users/alexandr/Tools/QtCommercial/6.8.2/android_x86_64/lib/cmake/Qt6/QtFeature.cmake:141 (qt_evaluate_feature) [cmake] /Users/alexandr/Tools/QtCommercial/6.8.2/android_x86_64/lib/cmake/Qt6/QtFeature.cmake:180 (qt_internal_evaluate_config_expression) [cmake] /Users/alexandr/Tools/QtCommercial/6.8.2/android_x86_64/lib/cmake/Qt6/QtTargetHelpers.cmake:73 (qt_evaluate_config_expression) [cmake] sqlite/CMakeLists.txt:72 (qt_internal_extend_target) [cmake] [cmake] [cmake] -- Configuring incomplete, errors occurred!
Is it Qt bug or something missing by me?
@bogong said in SQLite plugin rebuild and modification with Qt6 and CMake. How?:
QtCommercial
You should ask the Qt support.
Manuals with examples for Windows building process mostly only small part for MacOS.
There are examples for unix so use them. There is not much difference between unix and macos wrt this.
1/3