conan-io / conan-center-index

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

[package] libpq/15.5: missing catalog headers #24663

Closed gim closed 3 months ago

gim commented 4 months ago

Description

When building libpq/15.5 (and presumably other versions) the package does not include the catalog headers (eg, catalog/pg_type_d.h).

I suspect this is a result of a copy-paste error in the package method. Specifically, this statement:

copy(self, "*.h", src=os.path.join(self.build_folder, "src", "backend", "catalog"),
                  dst=os.path.join(self.package_folder, "include", "catalog"))

Other references to the src subdir above this statement are all referring to self.source_folder rather than self.build_folder as the src argument.

Running conan install with -vtrace shows 0 files copied.

But, as a workaround, if I manually change build_folder to source_folder locally the headers are available.

Package and Environment Details

Conan profile

[settings] os=Linux arch=x86_64

compiler=clang compiler.version=18 compiler.libcxx=libc++

build_type=Debug

[options]

[buildenv] CC=clang-18 CXX=clang++-18

[conf] tools.build:compiler_executables={"c": "clang-18","cpp": "clang++-18"} tools.build:cxxflags=[]

Steps to reproduce

conan install /home/danny/src/cruft/root -pr:h /home/danny/src/cruft/root/build/conan/profile/x86_64-clang-linux-debug -pr:b /home/danny/src/cruft/root/build/conan/profile/x86_64-clang-linux-debug --build=missing --output-folder=.

Logs

======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Debug
compiler=clang
compiler.libcxx=libc++
compiler.version=18
os=Linux
[conf]
tools.build:compiler_executables={'c': 'clang-18', 'cpp': 'clang++-18'}
tools.build:cxxflags=[]
[buildenv]
CC=clang-18
CXX=clang++-18

Profile build:
[settings]
arch=x86_64
build_type=Debug
compiler=clang
compiler.libcxx=libc++
compiler.version=18
os=Linux
[conf]
tools.build:compiler_executables={'c': 'clang-18', 'cpp': 'clang++-18'}
tools.build:cxxflags=[]
[buildenv]
CC=clang-18
CXX=clang++-18

/home/danny/src/cruft/root

======== Computing dependency graph ========
Graph root
    conanfile.py (cruft-root/0.1): /home/danny/src/cruft/root/conanfile.py
Requirements
    brotli/1.1.0#d56d7bb9ca722942aba17369cb5c0519 - Cache
    bzip2/1.0.8#457c272f7da34cb9c67456dd217d36c4 - Cache
    fmt/10.1.1#0561f4fdf8146b5d82b926d7e0d9c66b - Cache
    freetype/2.12.1#5369bfc983e81129783c32a9b09f6191 - Cache
    glfw/3.3.2#fab613b2de2e156f7c16c3d5d3026046 - Cache
    libalsa/1.2.10#8b568d62190ef588cd5dcdd81171c289 - Cache
    libcurl/8.6.0#752cd9c3df0e9487b72301862f15a965 - Cache
    libpng/1.6.43#c219d8f01983bac10c404fc613605eef - Cache
    libpq/15.5#ba683364f5083b6d80930be78b1c5af9 - Cache
    mbedtls/3.6.0#a7f96731f29d1074f7694c578c69b200 - Cache
    ogg/1.3.5#062626875f5c8c59f069f76f148098ef - Cache
    openal-soft/1.23.1#e7024bb790b58439f3da3a3098594b92 - Cache
    opengl/system#4df6fecde4084386beded3ed0e56e4ea - Cache
    openssl/3.2.1#c7b554068caae5eda12b735ea6f23d70 - Cache
    opus/1.4#54631f551fc450783fb2df8cd63f80a2 - Cache
    opusfile/0.12#59eab7d8f23c476edf92c33e7d407b99 - Cache
    pcre/8.45#64cdfd792761c32817cd31d7967c3709 - Cache
    range-v3/0.11.0#9b1665a8dda77054cda133f8ce384bfd - Cache
    re2c/3.1#d458d28cfc608b5464bd3dcfd2ec8f52 - Cache
    xorg/system#f626cbdd0ba57d9c53bce2d8b9362fad - Cache
    zlib/1.2.13#4e74ebf1361fe6fb60326f473f276eb5 - Cache
    zstd/1.5.6#afefe79a309bc2a7b9f56c2093504c8b - Cache
Build requirements
    autoconf/2.71#f9307992909d7fb3df459340f1932809 - Cache
    automake/1.16.5#058bda3e21c36c9aa8425daf3c1faf50 - Cache
    cmake/3.29.3#292a699b66d006bf4c6648608fa7c9e4 - Cache
    gnu-config/cci.20210814#dc430d754f465e8c74463019672fb97b - Cache
    libtool/2.4.7#08316dad5c72c541ed21e039e4cf217b - Cache
    m4/1.4.19#b38ced39a01e31fef5435bc634461fd2 - Cache
    meson/1.2.2#04bdfb85d665c82b08a3510aee3ffd19 - Cache
    ninja/1.11.1#77587f8c8318662ac8e5a7867eb4be21 - Cache
    pkgconf/2.0.3#f996677e96e61e6552d85e83756c328b - Cache
    pkgconf/2.1.0#27f44583701117b571307cf5b5fe5605 - Cache
Resolved version ranges
    cmake/[>=3.23]: cmake/3.29.3
    freetype/[~2.12]: freetype/2.12.1
    libcurl/[~8]: libcurl/8.6.0
    libpng/[>=1.6 <2]: libpng/1.6.43
    libpq/[15.5]: libpq/15.5
    openssl/[>=1.1 <4]: openssl/3.2.1
    re2c/[~3.1]: re2c/3.1

======== Computing necessary packages ========
Requirements
    brotli/1.1.0#d56d7bb9ca722942aba17369cb5c0519:a68d3b4c15e0f250a133de7162e9dff35d9df3f9#a1ab4ea1f25be2c63bf808746a3a24c4 - Cache
    bzip2/1.0.8#457c272f7da34cb9c67456dd217d36c4:426cd0ef2d7390010d1555fef0a67fe7a075b4a4#e815fba6f8b7ca976420be17366c7bf0 - Cache
    fmt/10.1.1#0561f4fdf8146b5d82b926d7e0d9c66b:340a992f2fbe091f93319290ff02ffa73ea6616a#6580380206f7c649a8873b39e0d42cd3 - Cache
    freetype/2.12.1#5369bfc983e81129783c32a9b09f6191:8ff9e6fe234d5464a5e68f1612d4403e7021e352#75490f975624c7c4cfeccdb2de0465dc - Cache
    glfw/3.3.2#fab613b2de2e156f7c16c3d5d3026046:b878504e94db64e70024102f610ef286c7948949#14b278ec0d0ad4f66a0f9a7905b717fc - Cache
    libalsa/1.2.10#8b568d62190ef588cd5dcdd81171c289:e30c3e370e48cd60e782e39eccb741edace002ef#94ad35d655df56a44ad6be56a7b3dbbb - Cache
    libcurl/8.6.0#752cd9c3df0e9487b72301862f15a965:1b17b76964a57cb9243cb5c66119e74389b2b6b1#6527e7b1e4a7343de755491f38f7a201 - Cache
    libpng/1.6.43#c219d8f01983bac10c404fc613605eef:d2be070e23da09ec611ced7b0f7b8aeab65592fb#9f79af8daaee0aeee9cfd7c5688a72c9 - Cache
    libpq/15.5#ba683364f5083b6d80930be78b1c5af9:fba6a58ea9b289f0f6c408f906610d45447906f6#db7d97252ebee60933760d6905b041a2 - Cache
    mbedtls/3.6.0#a7f96731f29d1074f7694c578c69b200:981fa16187f74d767a2f69407a2ba2e2d7d0a9a5#44d4bc6b364e7be0490e18e22b2b6dca - Cache
    ogg/1.3.5#062626875f5c8c59f069f76f148098ef:a61ceb414deed26ff697a4a0b5cdf2639b0f0674#56355404ec9a187e78b06a5aa4c5db46 - Cache
    openal-soft/1.23.1#e7024bb790b58439f3da3a3098594b92:cae1bff9fc60c04af799b73e9638ca78d6ae37c9#7783bde533504b16060164930a8a210e - Cache
    opengl/system#4df6fecde4084386beded3ed0e56e4ea:da39a3ee5e6b4b0d3255bfef95601890afd80709#0ba8627bd47edc3a501e8f0eb9a79e5e - Cache
    openssl/3.2.1#c7b554068caae5eda12b735ea6f23d70:7415782b4f92e85404a69b529ce209f00975807b#15297712ea45d0d681bfea0e3b086b8a - Cache
    opus/1.4#54631f551fc450783fb2df8cd63f80a2:a911a17cd5d300a0226d76cf7ecf69574dd9881c#04cb0079518f8958bdea5ddd4912a19e - Cache
    opusfile/0.12#59eab7d8f23c476edf92c33e7d407b99:261ab53d4d0a8666d8b3d90b717b8fa3e2914959#2f3c1406b5d3cbd1de8dcaf559542d63 - Cache
    pcre/8.45#64cdfd792761c32817cd31d7967c3709:8c965c41dd0b8c9a1157b62a23bb8abd64983f4a#0b606437dcf18698afa58c59722db115 - Cache
    range-v3/0.11.0#9b1665a8dda77054cda133f8ce384bfd:da39a3ee5e6b4b0d3255bfef95601890afd80709#fbbed9c6164a8083b262461b5619ce84 - Cache
    re2c/3.1#d458d28cfc608b5464bd3dcfd2ec8f52:6c3784688ce1ae7a69d803259982d21dd8171d61#2ce4c816f4afe5171d62b9988d2c74a7 - Cache
    xorg/system#f626cbdd0ba57d9c53bce2d8b9362fad:da39a3ee5e6b4b0d3255bfef95601890afd80709#0ba8627bd47edc3a501e8f0eb9a79e5e - Cache
    zlib/1.2.13#4e74ebf1361fe6fb60326f473f276eb5:a61ceb414deed26ff697a4a0b5cdf2639b0f0674#13ccff83477a1cb3b69ee8218bc83f6d - Cache
    zstd/1.5.6#afefe79a309bc2a7b9f56c2093504c8b:2b05ee895dd4c4895ca7db6dbc6a37939f2e9361#716a2c0424e86be9af5dd20498cc2ba5 - Cache
Build requirements
    cmake/3.29.3#292a699b66d006bf4c6648608fa7c9e4:63fead0844576fc02943e16909f08fcdddd6f44b#7c81235de323f38e49af5a5f97519aba - Cache
Skipped binaries
    autoconf/2.71, automake/1.16.5, gnu-config/cci.20210814, libtool/2.4.7, m4/1.4.19, meson/1.2.2, ninja/1.11.1, pkgconf/2.0.3, pkgconf/2.1.0
opengl/system: A default system package manager couldn't be found for gentoo, system packages will not be installed.
opengl/system: A default system package manager couldn't be found for gentoo, system packages will not be installed.
opengl/system: A default system package manager couldn't be found for gentoo, system packages will not be installed.
opengl/system: A default system package manager couldn't be found for gentoo, system packages will not be installed.
opengl/system: A default system package manager couldn't be found for gentoo, system packages will not be installed.
opengl/system: A default system package manager couldn't be found for gentoo, system packages will not be installed.
xorg/system: A default system package manager couldn't be found for gentoo, system packages will not be installed.
xorg/system: A default system package manager couldn't be found for gentoo, system packages will not be installed.
xorg/system: A default system package manager couldn't be found for gentoo, system packages will not be installed.
xorg/system: A default system package manager couldn't be found for gentoo, system packages will not be installed.
xorg/system: A default system package manager couldn't be found for gentoo, system packages will not be installed.
xorg/system: A default system package manager couldn't be found for gentoo, system packages will not be installed.

======== Installing packages ========
brotli/1.1.0: Already installed! (1 of 23)
bzip2/1.0.8: Already installed! (2 of 23)
cmake/3.29.3: Already installed! (3 of 23)
cmake/3.29.3: Appending PATH environment variable: /home/danny/.conan2/p/b/cmakeff6d3444b3c0d/p/bin
fmt/10.1.1: Already installed! (4 of 23)
libpq/15.5: Already installed! (5 of 23)
mbedtls/3.6.0: Already installed! (6 of 23)
ogg/1.3.5: Already installed! (7 of 23)
opengl/system: Already installed! (8 of 23)
opus/1.4: Already installed! (9 of 23)
range-v3/0.11.0: Already installed! (10 of 23)
re2c/3.1: Already installed! (11 of 23)
xorg/system: Already installed! (12 of 23)
zlib/1.2.13: Already installed! (13 of 23)
zstd/1.5.6: Already installed! (14 of 23)
libalsa/1.2.10: Already installed! (15 of 23)
glfw/3.3.2: Already installed! (16 of 23)
libpng/1.6.43: Already installed! (17 of 23)
openssl/3.2.1: Already installed! (18 of 23)
pcre/8.45: Already installed! (19 of 23)
openal-soft/1.23.1: Already installed! (20 of 23)
freetype/2.12.1: Already installed! (21 of 23)
libcurl/8.6.0: Already installed! (22 of 23)
opusfile/0.12: Already installed! (23 of 23)
WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X:
WARN: deprecated:     'cpp_info.names' used in: bzip2/1.0.8, ogg/1.3.5, zlib/1.2.13, libpng/1.6.43, range-v3/0.11.0, libpq/15.5, mbedtls/3.6.0, opus/1.4, libcurl/8.6.0, glfw/3.3.2, freetype/2.12.1, openal-soft/1.23.1, zstd/1.5.6, libalsa/1.2.10, brotli/1.1.0, fmt/10.1.1, openssl/3.2.1, pcre/8.45
WARN: deprecated:     'cpp_info.build_modules' used in: bzip2/1.0.8, glfw/3.3.2, openal-soft/1.23.1, freetype/2.12.1, openssl/3.2.1
WARN: deprecated:     'env_info' used in: bzip2/1.0.8, cmake/3.29.3, libpq/15.5, zstd/1.5.6, freetype/2.12.1, libalsa/1.2.10, re2c/3.1, openssl/3.2.1, pcre/8.45
WARN: deprecated:     'cpp_info.filenames' used in: opengl/system, glfw/3.3.2, freetype/2.12.1
WARN: deprecated:     'user_info' used in: freetype/2.12.1

======== Finalizing install (deploy, generators) ========
conanfile.py (cruft-root/0.1): Writing generators to /home/danny/src/cruft/root/build/debug/clang
conanfile.py (cruft-root/0.1): Generator 'CMakeDeps' calling 'generate()'
conanfile.py (cruft-root/0.1): CMakeDeps necessary find_package() and targets for your CMakeLists.txt
    find_package(CURL)
    find_package(PostgreSQL)
    find_package(zstd)
    find_package(fmt)
    find_package(range-v3)
    find_package(pcre)
    find_package(re2c)
    find_package(glfw3)
    find_package(OpenAL)
    find_package(opusfile)
    find_package(Opus)
    find_package(MbedTLS)
    find_package(freetype)
    find_package(ZLIB)
    find_package(brotli)
    target_link_libraries(... CURL::libcurl PostgreSQL::PostgreSQL zstd::libzstd_shared fmt::fmt range-v3::range-v3 pcre::pcre re2c::re2c glfw OpenAL::OpenAL opusfile::opusfile Opus::opus MbedTLS::mbedtls Freetype::Freetype ZLIB::ZLIB brotli::brotli)
conanfile.py (cruft-root/0.1): Generator 'CMakeToolchain' calling 'generate()'
conanfile.py (cruft-root/0.1): CMakeToolchain generated: conan_toolchain.cmake
conanfile.py (cruft-root/0.1): CMakeToolchain: Preset 'conan-debug' added to CMakePresets.json.
    (cmake>=3.23) cmake --preset conan-debug
    (cmake<3.23) cmake <path> -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake  -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Debug
conanfile.py (cruft-root/0.1): CMakeToolchain generated: /home/danny/src/cruft/root/build/debug/clang/CMakePresets.json
conanfile.py (cruft-root/0.1): CMakeToolchain generated: /home/danny/src/cruft/root/CMakeUserPresets.json
conanfile.py (cruft-root/0.1): Calling generate()
conanfile.py (cruft-root/0.1): Generators folder: /home/danny/src/cruft/root/build/debug/clang
conanfile.py (cruft-root/0.1): Generating aggregated env files
conanfile.py (cruft-root/0.1): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
Install finished successfully
AbrilRBS commented 3 months ago

Hi @gim thanks a lot for taking the time to report this issue. Are you planning on opening a PR to address this issue? It seems to me that your fix is valid :) Else we can pick it up :)

gim commented 3 months ago

I'm still trying to wrap my head around a lot of Conan stuff; so, while it looks like a trivial fix, it might be more straightforward if someone else implemented it.

However, I'm happy to take a crack at it if people are short of time, or think it's a decent first issue to investigate.

AbrilRBS commented 3 months ago

Solved in #24755m thanks a lot for taking the time to report the issue :)

gim commented 3 months ago

Thanks for the fix. I can confirm it resolved the issues I was having locally. :)