conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
965 stars 1.77k forks source link

[bug] quickfix/1.15.1: with_postgres=True fails to compile #24964

Open erkankayaabex opened 3 months ago

erkankayaabex commented 3 months ago

Description

The package fails to compile if I set this option. In comparison setting the with_ssl works as expected.

[ 50%] Building CXX object src/C++/CMakeFiles/quickfix.dir/PostgreSQLStore.cpp.o
In file included from /local/erkan/.conan2/p/b/quickb5cca654be59e/b/src/src/C++/PostgreSQLLog.h:36,
                 from /local/erkan/.conan2/p/b/quickb5cca654be59e/b/src/src/C++/PostgreSQLLog.cpp:28:
/local/erkan/.conan2/p/b/quickb5cca654be59e/b/src/src/C++/PostgreSQLConnection.h:35:10: fatal error: libpq-fe.h: No such file or directory
   35 | #include <libpq-fe.h>
      |          ^~~~~~~~~~~~
compilation terminated.
gmake[4]: *** [src/C++/CMakeFiles/quickfix.dir/build.make:426: src/C++/CMakeFiles/quickfix.dir/PostgreSQLLog.cpp.o] Error 1
gmake[4]: *** Waiting for unfinished jobs....

I can see that the package correctly adds the dependency to the libpq in the conanfile, and the XX_tools.cmake is correctly generatd. However this isn't referred to anywhere in the CMakeLists.txt and as such it fails to include the package in the build.

Package and Environment Details

Conan profile

[settings]
os=Linux
arch=x86_64
build_type=Release
&:build_type=RelWithDebInfo
compiler=gcc
compiler.cppstd=23
compiler.libcxx=libstdc++11
compiler.version=13

Steps to reproduce

conan install --require quickfix/1.15.1 -pr:a=conan_profile -o:a with_postgres=True -c=tools.build:compiler_executables='{"c":"/usr/bin/gcc-13", "cpp":"/usr/bin/g++-13"}' --build=missing

Or by adding this to conanfile.py

    def config_options(self):
        self.options["quickfix"].with_ssl = True # => works
        self.options["quickfix"].with_postgres = True # => doesn't work
...
    def requirements(self):
        self.requires("quickfix/1.15.1")

Logs

Click to expand log ``` [ 50%] Building CXX object src/C++/CMakeFiles/quickfix.dir/PostgreSQLStore.cpp.o In file included from /local/erkan/.conan2/p/b/quickb5cca654be59e/b/src/src/C++/PostgreSQLLog.h:36, from /local/erkan/.conan2/p/b/quickb5cca654be59e/b/src/src/C++/PostgreSQLLog.cpp:28: /local/erkan/.conan2/p/b/quickb5cca654be59e/b/src/src/C++/PostgreSQLConnection.h:35:10: fatal error: libpq-fe.h: No such file or directory 35 | #include | ^~~~~~~~~~~~ compilation terminated. gmake[4]: *** [src/C++/CMakeFiles/quickfix.dir/build.make:426: src/C++/CMakeFiles/quickfix.dir/PostgreSQLLog.cpp.o] Error 1 gmake[4]: *** Waiting for unfinished jobs.... ```
erkankayaabex commented 2 months ago

@abedra @hannahwhy @avsej @isidore A little bit of love for this ticket would be greatly appreciated. We're stuck without it.