-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Describe the bug
CMake of Poco 1.15.0 fails on Ubuntu Linux 24.04 - SQLite support disabled but still required
Although the support of SQLite was disabled via CMake with
-DENABLE_DATA_SQLITE=OFF
and the CMake output shows
-- SQLite Support Disabled
it still fails with
CMake Error at Data/samples/Binding/CMakeLists.txt:2 (target_link_libraries):
Target "Binding" links to:
Poco::DataSQLite
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
To Reproduce
cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=OFF -DENABLE_DATA_MYSQL=ON -DENABLE_DATA_ODBC=OFF -DENABLE_DATA_POSTGRESQL=OFF -DENABLE_DATA_SQLITE=OFF -DENABLE_MONGODB=OFF -DENABLE_APACHECONNECTOR=OFF -DENABLE_TESTS=ON -DENABLE_SAMPLES=ON -DMYSQL_INCLUDE_DIR=/usr/local/mysql/include -DMYSQL_ROOT_INCLUDE_DIRS=/usr/local/mysql/include -DMYSQL_ROOT_LIBRARY_DIRS=/usr/local/mysql/lib -DAPR_LIBRARY=/usr/local/apr/ -DAPR_INCLUDE_DIR=/usr/local/apr/ -DAPRUTIL_INCLUDE_DIR=/usr/local/apr/ -DAPRUTIL_LIBRARY=/usr/local/apr/ -DAPACHE2_INCLUDE_DIR=/usr/local/apache2/ -DENABLE_JWT=OFF -DENABLE_MONGODB=OFF -DENABLE_REDIS=OFF -DENABLE_PDF=OFF -DENABLE_UTIL=OFF -DENABLE_PAGECOMPILER=OFF -DENABLE_PAGECOMPILER_FILE2PAGE=OFF -DENABLE_POCODOC=OFF -DENABLE_ACTIVERECORD=OFF -DENABLE_ACTIVERECORD_COMPILER=OFF -DENABLE_PROMETHEUS=OFF
Expected behavior
Successful CMake operation
Logs
-- Checking for C++20 compiler
-- Checking for C++20 compiler - available
-- Building Poco with C++20 standard
-- Could NOT find PostgreSQL (missing: PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR)
-- Could NOT find ODBC (missing: ODBC_LIBRARY ODBC_INCLUDE_DIR)
-- Building without unit tests
-- Building with samples
-- Using internal sqlite, zlib, pcre2, expat, libpng, ...
-- Could NOT find SQLite3 (missing: SQLite3_INCLUDE_DIR SQLite3_LIBRARY)
-- QUILL_NO_EXCEPTIONS: OFF
-- QUILL_NO_THREAD_NAME_SUPPORT: OFF
-- QUILL_X86ARCH: OFF
-- QUILL_DISABLE_NON_PREFIXED_MACROS: OFF
-- QUILL_DISABLE_FUNCTION_NAME: OFF
-- QUILL_DETAILED_FUNCTION_NAME: OFF
-- QUILL_DISABLE_FILE_INFO: OFF
-- QUILL_ENABLE_ASSERTIONS: OFF
-- QUILL_ENABLE_INSTALL: OFF
-- OS has native sendfile function
-- SQLite Support Disabled
-- MySQL Support Enabled
-- PostgreSQL Support Disabled
-- ODBC Support Disabled
-- CMake '3.28.3' successfully configured 'Poco'
-- Poco package version: '1.15.0'
-- Building static libraries
-- [cmake] Installation target path: /usr/local
-- [cmake] Build for OS type: Linux
-- [cmake] Build for OS version: 6.8.0-101-generic
-- [cmake] Build for CPU type: x86_64
-- [cmake] Generator: Unix Makefiles
-- [cmake] Generator platorm:
-- [cmake] Build type: Debug
-- [cmake] Build with C++ flags: -g
-- [cmake] Build with C flags: -g
-- [cmake] C++ symbol visibility:
-- Building: Foundation
-- Building: Encodings
-- Building: XML
-- Building: JSON
-- Building: Util
-- Building: Net
-- Building: NetSSL_OpenSSL
-- Building: Crypto
-- Building: Data
-- Building: Data/MySQL
-- Building: Zip
-- Configuring done (0.9s)
CMake Error at Data/samples/Binding/CMakeLists.txt:2 (target_link_libraries):
Target "Binding" links to:
Poco::DataSQLite
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
CMake Error at Data/samples/RecordSet/CMakeLists.txt:2 (target_link_libraries):
Target "RecordSet" links to:
Poco::DataSQLite
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
CMake Error at Data/samples/RowFormatter/CMakeLists.txt:2 (target_link_libraries):
Target "RowFormatter" links to:
Poco::DataSQLite
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
CMake Error at Data/samples/Tuple/CMakeLists.txt:2 (target_link_libraries):
Target "Tuple" links to:
Poco::DataSQLite
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
CMake Error at Data/samples/TypeHandler/CMakeLists.txt:2 (target_link_libraries):
Target "TypeHandler" links to:
Poco::DataSQLite
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
CMake Error at Data/samples/WebNotifier/CMakeLists.txt:2 (target_link_libraries):
Target "WebNotifier" links to:
Poco::DataSQLite
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
CMake Error at Data/samples/DBLogger/CMakeLists.txt:12 (target_link_libraries):
Target "DBLogger" links to:
Poco::DataSQLite
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
-- Generating done (0.2s)
CMake Generate step failed. Build files cannot be regenerated correctly.
Please add relevant environment information:
- Ubuntu 24.04
- Poco 1.15.0
- CMake 3.28.3
Additional context
Playing around with
-DPOCO_SQLITE_UNBUNDLED=ON
-DPOCO_SQLITE_UNBUNDLED=OFF
-DSQLITE3_LIBRARY=/usr/lib/x86_64-linux-gnu/libsqlite3.so.0
doesn't help.