Summary: | dev-libs/libpqxx-4.0.1 fails to build with dev-db/postgresql-9.6.6 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Andrew Petelin <adrianopol> |
Component: | Current packages | Assignee: | PgSQL Bugs <pgsql-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
/var/tmp/portage/dev-libs/libpqxx-4.0.1/work/libpqxx-4.0.1/config.log
verbose output of `eselect postgresql set 9.6` |
Created attachment 508640 [details]
/var/tmp/portage/dev-libs/libpqxx-4.0.1/work/libpqxx-4.0.1/config.log
What is the output of: eselect postgresql version # eselect postgresql version postgresql.eselect 2.2 eselect 1.4.8 Also, there are lots of dangling symlinks in root filesystem, most of them were created by postgresql: # find / -xdev -xtype l | wc -l find: ‘/usr/include/postgresql-9.6/postgresql-9.6’: Too many levels of symbolic links 323 > most of them were created by postgresql
# find / -xdev -xtype l -exec ls -l '{}' \; | grep -v postgresql
find: ‘/usr/include/postgresql-9.6/postgresql-9.6’: Too many levels of symbolic links
lrwxrwxrwx 1 root root 8 May 16 2017 /usr/bin/testrb -> testrb22
lrwxrwxrwx 1 root root 20 May 17 2017 /usr/lib32/dri/i915_dri.so -> ../mesa/i915g_dri.so
lrwxrwxrwx 1 root root 20 May 17 2017 /usr/lib64/dri/i915_dri.so -> ../mesa/i915g_dri.so
lrwxrwxrwx 1 root root 13 Dec 2 00:53 /usr/lib64/libcblas.a -> libgslcblas.a
Removed all dangling symlinks: # find / -xdev -xtype l /usr/lib32/dri/i915_dri.so /usr/lib64/dri/i915_dri.so /usr/lib64/libcblas.a But `eselect postgresql set ...` still doesn't work: # eselect postgresql list Available PostgreSQL Slots 9.6 9.6.6 # eselect postgresql set 9.6 Setting 9.6 as the default...ln: failed to create symbolic link '/usr/include/postgresql/postgresql-9.6': File exists !!! Error: Unable to create link! postgresql-9.6 -> /usr/include/postgresql exiting # ll /usr/include/postgresql/postgresql-9.6 1845487 lrwxrwxrwx 1 root root 14 Dec 8 14:47 /usr/include/postgresql/postgresql-9.6 -> postgresql-9.6 (Invalid symlink.) Yes, this is an artifact of a previous version of eselect. I don't know how it got there, but the 2.2 doesn't have this issue. I'd like to have eselect fix it, but have lacked the time to deal with a broken system to find what needs to be fixed. Is it just /usr/include that has /usr/include/postgresql-9.6/postgresql-9.6? What about /usr/lib and /usr/share? Created attachment 508796 [details] verbose output of `eselect postgresql set 9.6` > I'd like to have eselect fix it OK, I will try to figure it out myself. > Is it just /usr/include that has /usr/include/postgresql-9.6/postgresql-9.6? > What about /usr/lib and /usr/share? Yes, it is just /usr/include: # find /usr/lib /usr/share -iname '*postgresql*' /usr/share/postgresql-9.6 /usr/share/postgresql-9.6/postgresql.conf.sample /usr/share/cmake/Modules/FindPostgreSQL.cmake /usr/share/cmake/Help/module/FindPostgreSQL.rst /usr/share/nano/postgresql.nanorc /usr/share/eselect/modules/postgresql.eselect /usr/share/aclocal/ax_lib_postgresql.m4 /usr/share/doc/postgresql-9.6.6 /usr/share/doc/cmake-3.8.2/html/module/FindPostgreSQL.html /usr/share/doc/cmake-3.8.2/html/_sources/module/FindPostgreSQL.rst.txt /usr/share/doc/redland-1.0.16/html/redland/redland-storage-module-postgresql.html (In reply to Andrew Petelin from comment #7) > Created attachment 508796 [details] > verbose output of `eselect postgresql set 9.6` > > > I'd like to have eselect fix it > > OK, I will try to figure it out myself. > > > Is it just /usr/include that has /usr/include/postgresql-9.6/postgresql-9.6? > > What about /usr/lib and /usr/share? > > Yes, it is just /usr/include: > > # find /usr/lib /usr/share -iname '*postgresql*' > /usr/share/postgresql-9.6 > /usr/share/postgresql-9.6/postgresql.conf.sample > /usr/share/cmake/Modules/FindPostgreSQL.cmake > /usr/share/cmake/Help/module/FindPostgreSQL.rst > /usr/share/nano/postgresql.nanorc > /usr/share/eselect/modules/postgresql.eselect > /usr/share/aclocal/ax_lib_postgresql.m4 > /usr/share/doc/postgresql-9.6.6 > /usr/share/doc/cmake-3.8.2/html/module/FindPostgreSQL.html > /usr/share/doc/cmake-3.8.2/html/_sources/module/FindPostgreSQL.rst.txt > /usr/share/doc/redland-1.0.16/html/redland/redland-storage-module-postgresql. > html Great, thanks! One more thing: # ls -ashl /usr/include/postgresql-9.6 # ls -ashlF /usr/include/postgresql-9.6 total 204K 4.0K drwxr-xr-x 6 root root 4.0K Dec 8 15:00 ./ 40K drwxr-xr-x 454 root root 36K Dec 8 14:44 ../ 4.0K -rw-r--r-- 1 root root 714 Dec 8 14:47 ecpg_config.h 4.0K -rw-r--r-- 1 root root 2.5K Dec 8 14:47 ecpgerrno.h 4.0K -rw-r--r-- 1 root root 2.7K Dec 8 14:47 ecpg_informix.h 4.0K -rw-r--r-- 1 root root 2.6K Dec 8 14:47 ecpglib.h 4.0K -rw-r--r-- 1 root root 2.6K Dec 8 14:47 ecpgtype.h 4.0K drwxr-xr-x 3 root root 4.0K Jul 17 16:18 informix/ 4.0K drwxr-xr-x 3 root root 4.0K Dec 8 14:47 internal/ 4.0K drwxr-xr-x 2 root root 4.0K Dec 8 14:47 libpq/ 4.0K -rw-r--r-- 1 root root 2.2K Dec 8 14:47 libpq-events.h 24K -rw-r--r-- 1 root root 22K Dec 8 14:47 libpq-fe.h 4.0K -rw-r--r-- 1 root root 323 Dec 8 14:47 pg_config_ext.h 32K -rw-r--r-- 1 root root 29K Dec 8 14:47 pg_config.h 12K -rw-r--r-- 1 root root 12K Dec 8 14:47 pg_config_manual.h 4.0K -rw-r--r-- 1 root root 1.1K Dec 8 14:47 pg_config_os.h 4.0K -rw-r--r-- 1 root root 766 Dec 8 14:47 pgtypes_date.h 4.0K -rw-r--r-- 1 root root 530 Dec 8 14:47 pgtypes_error.h 4.0K -rw-r--r-- 1 root root 1.2K Dec 8 14:47 pgtypes_interval.h 4.0K -rw-r--r-- 1 root root 2.2K Dec 8 14:47 pgtypes_numeric.h 4.0K -rw-r--r-- 1 root root 1010 Dec 8 14:47 pgtypes_timestamp.h 4.0K -rw-r--r-- 1 root root 2.2K Dec 8 14:47 postgres_ext.h 4.0K drwxr-xr-x 28 root root 4.0K Dec 8 14:47 server/ 4.0K -rw-r--r-- 1 root root 834 Dec 8 14:47 sql3types.h 4.0K -rw-r--r-- 1 root root 1.3K Dec 8 14:47 sqlca.h 4.0K -rw-r--r-- 1 root root 1.6K Dec 8 14:47 sqlda-compat.h 4.0K -rw-r--r-- 1 root root 317 Dec 8 14:47 sqlda.h 4.0K -rw-r--r-- 1 root root 820 Dec 8 14:47 sqlda-native.h (In reply to Andrew Petelin from comment #9) > # ls -ashlF /usr/include/postgresql-9.6 > total 204K > ... Huh. That is not what I expected. # for l in $(find /usr/include/ -maxdepth 1 -type l -name 'postgresql*') ; do echo "$l -> $(realpath $l)"; done # for l in $(find /usr/include/postgresql/ -maxdepth 1 -type l) ; do echo "$l -> $(realpath $l)"; done # for l in $(find /usr/include/ -maxdepth 1 -type l -name 'postgresql*') ; do echo "$l -> $(realpath $l)"; done /usr/include/postgresql -> /usr/include/postgresql-9.6 # for l in $(find /usr/include/postgresql/ -maxdepth 1 -type l) ; do echo "$l -> $(realpath $l)"; done # Okay, you should only need to remove the offending symlink: # rm /usr/include/postgresql/postgresql-9.6 Then recreate a link (the eselect module looks to see if this is set): # ln -s postgresql-9.5 /usr/share/postgresql Then you can let eselect do its thing: # eselect postgresql set 9.6 The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9fb5707e09234326c4fd71ddc0b6b34d66775968 commit 9fb5707e09234326c4fd71ddc0b6b34d66775968 Author: Aaron W. Swenson <titanofold@gentoo.org> AuthorDate: 2018-01-14 18:25:05 +0000 Commit: Aaron W. Swenson <titanofold@gentoo.org> CommitDate: 2018-01-14 18:25:33 +0000 app-eselect/eselect-postgresql: Bump to 2.3 ln now tries to force the link (Thanks Matthew Thode [prometheanfire]) Cleans up nonsensical links in /usr/include/postgresql-* that were made by some previous versions of this module. Bug: https://bugs.gentoo.org/627476 Bug: https://bugs.gentoo.org/631936 Bug: https://bugs.gentoo.org/640154 Bug: https://bugs.gentoo.org/640394 Package-Manager: Portage-2.3.13, Repoman-2.3.3 app-eselect/eselect-postgresql/Manifest | 1 + .../eselect-postgresql-2.3.ebuild | 34 ++++++++++++++++++++++ 2 files changed, 35 insertions(+)} The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=847228fc6fdbde73141282081e5eca15a025ad90 commit 847228fc6fdbde73141282081e5eca15a025ad90 Author: Aaron W. Swenson <titanofold@gentoo.org> AuthorDate: 2018-05-15 20:01:00 +0000 Commit: Aaron W. Swenson <titanofold@gentoo.org> CommitDate: 2018-05-15 20:01:00 +0000 dev-libs/libpqxx: Cleanup Closes: https://bugs.gentoo.org/642434 Closes: https://bugs.gentoo.org/640154 Package-Manager: Portage-2.3.24, Repoman-2.3.6 dev-libs/libpqxx/Manifest | 3 -- dev-libs/libpqxx/libpqxx-4.0.1.ebuild | 84 ---------------------------------- dev-libs/libpqxx/libpqxx-5.1.0.ebuild | 86 ----------------------------------- dev-libs/libpqxx/libpqxx-5.1.1.ebuild | 86 ----------------------------------- 4 files changed, 259 deletions(-) |
Error: > checking for pg_config... no > configure: error: > PostgreSQL configuration script pg_config not found. Make sure this is in your > command path before configuring. Without it, the configure script has no way to > find the right location for the libpq library and its headers. Previously there was a symlink in /usr/bin: $ ls -l /usr/bin/pg_config lrwxrwxrwx 1 root root 37 Jul 17 16:18 /usr/bin/pg_config -> ../lib64/postgresql-9.5/bin/pg_config But now there is no one: $ equery files postgresql | grep -P '\bpg_config$' /usr/lib64/postgresql-9.6/bin/pg_config