-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[package] libpq/15.4: broken symlinks in include/catalog/ #24895
Comments
I have downloaded the The various In the source tree, in In the build tree, in In PR 24755, line 247-248 have been fixed to copy the catalog from the source tree: copy(self, "*.h", src=os.path.join(self.source_folder, "src", "include", "catalog"),
dst=os.path.join(self.package_folder, "include", "catalog")) Because we do in source build, I think that In the def build(self):
...
autotools = Autotools(self)
with chdir(self, os.path.join(self.build_folder)):
autotools.configure()
with chdir(self, os.path.join(self.build_folder, "src", "backend")):
autotools.make(target="generated-headers")
... The same should be done for the def package(self):
...
autotools = Autotools(self)
with chdir(self, os.path.join(self.build_folder, "src", "common")):
autotools.install()
... Now, the package will not have the broken symlinks anymore. This is because they are not in the build tree in In line 254-255, the catalog should also be copied from the source tree: copy(self, "*.h", src=os.path.join(self.source_folder, "src", "backend", "catalog"),
dst=os.path.join(self.package_folder, "include", "catalog")) I did try to update the recipe locally, and it works (builds, no symlinks and catalog files present, test package works). |
To avoid broken symlinks, do out of source build. Change `build()` and `package()` method to do out of source build. Copy the backend catalog from the source tree. Note: the `MSVC` part is ignored in this commit.
… libpq-conan-ioGH-24895-broken-symlinks-conan-ioGH-25282-mingw-undef-refs
… libpq-conan-ioGH-24895-broken-symlinks-conan-ioGH-25282-mingw-undef-refs
… libpq-conan-ioGH-24895-broken-symlinks-conan-ioGH-25282-mingw-undef-refs
… libpq-conan-ioGH-24895-broken-symlinks-conan-ioGH-25282-mingw-undef-refs
* (#24895) Avoid broken symlinks in include/catalog To avoid broken symlinks, do out of source build. Change `build()` and `package()` method to do out of source build. Copy the backend catalog from the source tree. Note: the `MSVC` part is ignored in this commit. * remove old versions * remove unreachable code --------- Co-authored-by: Ernesto de Gracia Herranz <[email protected]>
Thanks for reporting this and for the details! |
* (conan-io#24895) Avoid broken symlinks in include/catalog To avoid broken symlinks, do out of source build. Change `build()` and `package()` method to do out of source build. Copy the backend catalog from the source tree. Note: the `MSVC` part is ignored in this commit. * remove old versions * remove unreachable code --------- Co-authored-by: Ernesto de Gracia Herranz <[email protected]>
Description
Problem
Uploading
libpq/15.4
to a conan remote fails, because the package contains broken symlinks in theinclude/catalog/
subfolder.Expected
There are no broken symlinks in the package and upload works.
Workaround
Set the
CONAN_SKIP_BROKEN_SYMLINKS_CHECK
environment variable toTrue
fixes the upload.I think that those headers are not used for my particular use case (building
Qt5
), but it could be a problem for other cases, meaning the check has sense.Also, as far as I understand, this will not work anymore with Conan 2.
Some details
In the generated package, under
include/catalog/
, there are symlinks, likepg_conversion_d.h
,pg_foreign_data_wrapper_d.h
and others.For the particular case of my build,
pg_foreign_data_wrapper_d.h
points to/root/.conan/data/libpq/15.4/_/_/build/f35a0224260f0d753acb9d90beb1f1c501d0d02b/src/src/backend/catalog/pg_foreign_data_wrapper_d.h
.If the package is just downloaded, the
build
folder does not exist, or could be located in another place.I also did look into a
libpq/14.5
I installed last year on my machine, and those symlinks do not exist, they are files.Package and Environment Details
Conan profile
Note: also reproducible with the default profile on Ubuntu 22.04.
In the CI, 2 profiles are used.
The host profile is named
linux_ubuntu-24.04_gcc13_x86_64_qt_and_more
The build profile is named
linux_gcc13_x86_64
Configuration (profile_host):
[settings]
arch=x86_64
build_type=Debug
compiler=gcc
compiler.cppstd=17
compiler.libcxx=libstdc++11
compiler.version=13
os=Linux
os.distribution=ubuntu-24.04
[options]
boost:header_only=True
icu:shared=False
libalsa:shared=True
qt:gui=True
qt:qtserialport=True
qt:shared=True
qt:widgets=True
qt:with_glib=False
qt:with_mysql=False
qt:with_odbc=True
qt:with_pq=True
qt:with_sqlite3=True
qt:with_vulkan=False
zlib:shared=False
[build_requires]
[env]
[buildenv]
CC=gcc-13
CXX=g++-13
Configuration (profile_build):
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=17
compiler.libcxx=libstdc++11
compiler.version=13
os=Linux
[options]
[build_requires]
[env]
[buildenv]
CC=gcc-13
CXX=g++-13
Steps to reproduce
To see the broken symlinks, on an Ubuntu 22.04:
Here are the commands in the CI:
Logs
Click to expand log
The text was updated successfully, but these errors were encountered: