Bug 2427605 - find_package() does not work properly
Summary: find_package() does not work properly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: soci
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Denis Arnaud
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-01-07 17:29 UTC by Tomi Lähteenmäki
Modified: 2026-01-18 01:41 UTC (History)
1 user (show)

Fixed In Version: soci-4.1.2-4.fc44 soci-4.1.2-4.fc43
Clone Of:
Environment:
Last Closed: 2026-01-09 18:08:23 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Tomi Lähteenmäki 2026-01-07 17:29:44 UTC
Currently there seems to be issue to use SOCI from a CMake project.

Reproducible: Always

Steps to Reproduce:
1. Run dnf install cmake gcc-c++ soci-devel soci-sqlite3-devel
2. Write simple CMakeLists.txt

> cmake_minimum_required(VERSION 3.10...3.31 FATAL_ERROR)
> project(SOCIExampleConnect)
> 
> find_package(SOCI 4.1 COMPONENTS SQLite3 REQUIRED)
> 
> add_executable(example example.cpp)
> 
> target_link_libraries(connect PRIVATE SOCI::SQLite3)

3. Write simple example.cpp file:

> #include <soci/soci.h>
> 
> int main(int argc, char *argv[]) { soci::session sql(argv[1]); return 0; }

3. Run: cmake -B build -S .
4. Run: cmake --build build
Actual Results:
CMake Error at CMakeLists.txt:4 (find_package):
  By not providing "FindSOCI.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "SOCI", but
  CMake did not find one.

  Could not find a package configuration file provided by "SOCI" (requested
  version 4.1) with any of the following names:

    SOCIConfig.cmake
    soci-config.cmake

  Add the installation prefix of "SOCI" to CMAKE_PREFIX_PATH or set
  "SOCI_DIR" to a directory containing one of the above files.  If "SOCI"
  provides a separate development package or SDK, be sure it has been
  installed.

Expected Results:
CMake project can be configured and built successfully.

Additional Information:
I'm preparing a Pull Request to fix this.

Comment 1 Denis Arnaud 2026-01-07 17:35:02 UTC
Thanks for the reporting of that issue!

If that is an issue upstream, you can also probably submit a pull request directly there: https://github.com/SOCI/soci

If you are interested by co-maintaining the SOCI package on Fedora, do not hesitate: just tell me and I'll add you. (by the way, thanks for your earlier pull request!)

Comment 2 Tomi Lähteenmäki 2026-01-07 18:12:58 UTC
> If that is an issue upstream, you can also probably submit a pull request directly there: https://github.com/SOCI/soci

For me this looked more like a packaging issue. I opened the PR by the way.

> If you are interested by co-maintaining the SOCI package on Fedora, do not hesitate: just tell me and I'll add you. (by the way, thanks for your earlier pull request!)

Thanks, I'll keep that in mind!

Comment 3 Tomi Lähteenmäki 2026-01-08 18:30:08 UTC
I see you merged the PR, could you merge this to `f43` and do build for both `rawhide` and `f43`?

> If you are interested by co-maintaining the SOCI package on Fedora, do not hesitate: just tell me and I'll add you.

The package seems that it does not require huge maintenance effort (upstream seems to make releases a bit "infrequently") so if you need a co-maintainer then you can add me.

Comment 4 Denis Arnaud 2026-01-09 10:10:34 UTC
(In reply to Tomi Lähteenmäki from comment #3)

> The package seems that it does not require huge maintenance effort (upstream
> seems to make releases a bit "infrequently") so if you need a co-maintainer
> then you can add me.

Thanks!

I've just added you as a co-maintainer of the package: https://src.fedoraproject.org/rpms/soci
So, feel free to trigger all the builds you/we need.

Comment 5 Tomi Lähteenmäki 2026-01-09 17:55:14 UTC
Alright, thanks!

Comment 6 Fedora Update System 2026-01-09 18:04:06 UTC
FEDORA-2026-906fc53ff6 (soci-4.1.2-4.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-906fc53ff6

Comment 7 Fedora Update System 2026-01-09 18:08:23 UTC
FEDORA-2026-906fc53ff6 (soci-4.1.2-4.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Fedora Update System 2026-01-09 20:08:12 UTC
FEDORA-2026-a9d98b8068 (soci-4.1.2-4.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-a9d98b8068

Comment 9 Fedora Update System 2026-01-10 02:24:50 UTC
FEDORA-2026-a9d98b8068 has been pushed to the Fedora 43 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-a9d98b8068`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-a9d98b8068

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2026-01-18 01:41:54 UTC
FEDORA-2026-a9d98b8068 (soci-4.1.2-4.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.