Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 640394 - dev-qt/qtsql-5.7.1-r1[postgres] fatal error: libpq-fe.h: No such file or directory
Summary: dev-qt/qtsql-5.7.1-r1[postgres] fatal error: libpq-fe.h: No such file or dire...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-09 15:56 UTC by Johannes Buchner
Modified: 2018-01-25 12:30 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,15.94 KB, text/plain)
2017-12-09 15:57 UTC, Johannes Buchner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Buchner 2017-12-09 15:56:50 UTC
Emerging dev-qt/qtsql with useflag postgresql fails because "libpq-fe.h" is not found. 
Looks like it needs dev-libs/libpqxx, so maybe that should be added as a dependency?
dev-libs/libpqxx manual install fails (PostgreSQL configuration script pg_config not found.)

Disabling postgresql solved this for me, but I just wanted to report it anyways.



$ emerge --info
Portage 2.3.13 (python 2.7.14-final-0, default/linux/amd64/17.0/desktop, gcc-6.4.0, glibc-2.25-r9, 4.12.12-gentoo x86_64)
=================================================================
System uname: Linux-4.12.12-gentoo-x86_64-AMD_A8-6410_APU_with_AMD_Radeon_R5_Graphics-with-gentoo-2.4.1
KiB Mem:     7110688 total,    140348 free
KiB Swap:    2047996 total,   1184252 free
Timestamp of repository gentoo: Sat, 09 Dec 2017 00:45:01 +0000
Head commit of repository gentoo: b0b8163936e4b564ba5e6922d89d879947f7fb9e
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.28.1 p1.0) 2.28.1
ccache version 3.2.4 [disabled]
app-shells/bash:          4.3_p48-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.3::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.4.5-r1::gentoo, 3.5.4-r1::gentoo
dev-util/ccache:          3.2.4::gentoo
dev-util/cmake:           3.8.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.15.1-r1::gentoo
sys-devel/binutils:       2.28.1::gentoo, 2.29.1-r1::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo, 6.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r9::gentoo
Repositories:

gentoo
    location: /mnt/portage
    sync-type: rsync
    sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 50

tlp
    location: /var/lib/layman/tlp
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-Os -pipe -march=native -fstack-check -fstack-protector-all"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/chromium/policies/managed/chrome-gnome-shell.json /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/opt/chrome/policies/managed/chrome-gnome-shell.json /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-Os -pipe -march=native -fstack-check -fstack-protector-all"
DISTDIR="/mnt/data/tmp/portage/distfiles/"
FCFLAGS="-Os -pipe -march=native -fstack-check -fstack-protector-all"
FEATURES="assume-digests binpkg-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news nodoc parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-Os -pipe -march=native -fstack-check -fstack-protector-all"
GENTOO_MIRRORS="http://ftp.swin.edu.au/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/mnt/data/tmp/portage/packages/"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/mnt/data/tmp/"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 apng avahi berkdb bitmap-fonts branding bzip2 cairo cdda cdr cli cracklib crypt cryptsetup cups cxx dbus djvu dri dts dvd dvdr eds emboss encode evo exif fam ffmpeg firefox flac fontconfig fortran gdbm gif glamor gnome gpm gstreamer gtk iconv icu ipv6 jpeg kde lcms ldap libass libnotify mad matroska mmx mmxext mng modules mp3 mp4 mpeg multilib nautilus ncurses networkmanager nls nptl ogg ogv opengl openmp opus pam pango pcre pdf png policykit ppds projectm pulseaudio qt3support qt5 readline samba sdl seccomp semantic-desktop session slp spell sse sse2 sse4_1 sse4_2 ssl ssse3 startup-notification svg systemd tcpd theora threads tiff truetype truetype-fonts type1-fonts udev udisks unicode upnp upower usb vorbis vpx webkit webm widescreen wifi win32codecs wma wxwidgets x264 xattr xcb xfce xinerama xml xscreensaver xulrunner xv xvid xz zeroconf zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" L10N="de en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_4 python3_5" RUBY_TARGETS="ruby22" SANE_BACKENDS="hp" USERLAND="GNU" VIDEO_CARDS="radeon radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Johannes Buchner 2017-12-09 15:57:38 UTC
Created attachment 509100 [details]
build.log
Comment 2 Michael Palimaka (kensington) gentoo-dev 2017-12-23 01:24:38 UTC
On a stable system:
> x86_64-pc-linux-gnu-g++ -c -O2 -pipe -frecord-gcc-switches -O2 -Wall -W -fPIC  -I. -isystem /usr/include/mysql -isystem /usr/include/postgresql/pgsql -I/var/tmp/portage/dev-qt/qtsql-5.7.1-r1/work/qtbase-opensource-src-5.7.1/mkspecs/linux-g++ -o psql.o psql.cpp
> psql.cpp:40:22: fatal error: libpq-fe.h: No such file or directory
> #include "libpq-fe.h"
>                      ^
> compilation terminated.

I have the header at /usr/include/postgresql-9.6/libpq-fe.h, so it looks like the include path is wrong.
Comment 3 Michael Palimaka (kensington) gentoo-dev 2017-12-23 01:45:00 UTC
eselect-postgres should prepare appropriate symlinks, though.

What's the output of 'ls -las /usr/include/libpq-fe.h'? Does it work if you run 'eselect postgresql update' ?
Comment 4 Johannes Buchner 2018-01-14 06:17:28 UTC
It is a dead symlink:
/usr/include/libpq-fe.h -> postgresql-9.5/libpq-fe.h
I do not have postgresql nor eselect-postgresql installed anymore now.
Comment 5 Michael Palimaka (kensington) gentoo-dev 2018-01-14 06:20:31 UTC
What's the output of qlop -l | grep postgres?
Comment 6 Johannes Buchner 2018-01-14 06:28:26 UTC
Tue Dec 27 15:11:59 2011 >>> app-admin/eselect-postgresql-1.0.10
Tue Dec 27 15:51:45 2011 >>> dev-db/postgresql-base-9.1.1
Sun Mar 11 14:40:33 2012 >>> dev-db/postgresql-base-9.1.3
Sun Mar 11 21:11:46 2012 >>> dev-db/postgresql-base-9.1.3
Thu Jun  7 16:00:29 2012 >>> dev-db/postgresql-base-9.1.4
Thu Aug 23 11:24:29 2012 >>> dev-db/postgresql-base-9.1.5
Tue Nov 13 12:46:06 2012 >>> dev-db/postgresql-base-9.2.1
Tue Feb 12 15:17:21 2013 >>> dev-db/postgresql-base-9.2.3-r1
Mon Apr  8 19:32:51 2013 >>> dev-db/postgresql-base-9.2.4
Tue Sep 10 04:35:21 2013 >>> app-admin/eselect-postgresql-1.2.0
Sun Nov 17 13:25:13 2013 >>> dev-db/postgresql-base-9.2.4-r1
Fri Dec 20 07:54:27 2013 >>> dev-db/postgresql-base-9.3.2
Mon Jan 20 19:41:27 2014 >>> app-admin/eselect-postgresql-1.2.1
Tue Feb 25 11:26:51 2014 >>> dev-db/postgresql-base-9.3.3
Mon Sep 15 22:27:24 2014 >>> dev-db/postgresql-base-9.3.5
Sat Nov  8 08:59:09 2014 >>> virtual/postgresql-9.3
Wed Nov 26 11:34:04 2014 >>> dev-db/postgresql-base-9.3.5
Sat Dec 20 10:56:43 2014 >>> dev-db/postgresql-server-9.3.5
Sat Dec 20 10:56:53 2014 >>> virtual/postgresql-9.3
Wed Dec 31 18:11:13 2014 >>> dev-db/postgresql-9.3.5-r2
Sat Feb  7 17:51:49 2015 >>> dev-db/postgresql-9.4.1
Sat Feb 28 12:27:17 2015 >>> dev-db/postgresql-9.4.1
Sun May 31 12:17:58 2015 >>> dev-db/postgresql-9.4.2
Sat Jun  6 22:10:25 2015 >>> dev-db/postgresql-9.4.3
Sun Jul 19 11:42:30 2015 >>> dev-db/postgresql-9.4.4
Tue Jul 28 18:02:31 2015 >>> dev-db/postgresql-9.4.4
Sun Oct 11 18:15:24 2015 >>> dev-db/postgresql-9.4.5
Tue Oct 27 12:42:16 2015 >>> dev-db/postgresql-9.4.5-r1
Mon Jan 25 12:18:24 2016 >>> dev-db/postgresql-9.4.5-r2
Mon Feb 15 12:11:15 2016 >>> dev-db/postgresql-9.5.1
Sat Apr  2 01:17:02 2016 >>> dev-db/postgresql-9.5.2
Sun Aug 21 21:12:04 2016 >>> dev-db/postgresql-9.5.4
Sat Dec 24 15:18:58 2016 >>> dev-db/postgresql-9.5.5
Tue Mar 28 00:44:39 2017 >>> app-eselect/eselect-postgresql-1.2.1
Tue Mar 28 06:58:23 2017 >>> app-eselect/eselect-postgresql-1.2.1
Mon Apr 24 11:45:30 2017 >>> dev-db/postgresql-9.5.5
Tue May 23 17:14:12 2017 >>> app-eselect/eselect-postgresql-2.1
Tue May 23 17:27:09 2017 >>> dev-db/postgresql-9.5.7
Sun Jul 16 09:21:15 2017 >>> dev-db/postgresql-9.6.3-r1
Fri Sep  1 06:30:37 2017 >>> app-eselect/eselect-postgresql-2.2
Sat Oct 14 21:26:49 2017 >>> dev-db/postgresql-9.6.4
Tue Nov 14 19:06:49 2017 >>> dev-db/postgresql-9.6.6
Tue Dec  5 18:40:01 2017 >>> app-eselect/eselect-postgresql-2.2
Thu Dec  7 19:26:35 2017 >>> dev-db/postgresql-9.6.6
Comment 7 Michael Palimaka (kensington) gentoo-dev 2018-01-14 06:52:49 UTC
Based on that output, I suspect that the symlink was dangling when attempting to build qtsql hence the failure.

@psql, how does the merge/unmerge process handle these symlinks?
Comment 8 Aaron W. Swenson gentoo-dev 2018-01-14 15:03:28 UTC
(In reply to Michael Palimaka (kensington) from comment #7)
> Based on that output, I suspect that the symlink was dangling when
> attempting to build qtsql hence the failure.
> 
> @psql, how does the merge/unmerge process handle these symlinks?

The eselect module handles the links, and should remove all links when the last dev-db/postgresql slot is removed. Or, it'll automatically set the slot to the highest remaining slot.

eselect-postgresql-2.1 did have trouble that 2.2 does not have but does not fix.

If 2.2 can successfully manage the slots now (just change, or reset the slot to test), then there shouldn't be any further issues.

My guess is that 2.2 has been reporting an issue that's been missed, as it'll die when it can't set a link properly.
Comment 9 Larry the Git Cow gentoo-dev 2018-01-14 18:25:45 UTC
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(+)}