Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 490604 - =dev-db/tora-2.1.3-r3[postgresql] fails compilation with "/usr/include/postgres_ext.h:26:27: fatal error: pg_config_ext.h: No such file or directory"
Summary: =dev-db/tora-2.1.3-r3[postgresql] fails compilation with "/usr/include/postgr...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michael Haubenwallner (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-06 20:36 UTC by Dan Goodliffe
Modified: 2015-02-20 09:53 UTC (History)
2 users (show)

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


Attachments
complete build.log (build.log,529.13 KB, text/plain)
2013-11-09 13:47 UTC, Dan Goodliffe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Goodliffe 2013-11-06 20:36:32 UTC
Compilation fails with
/usr/include/postgres_ext.h:26:27: fatal error: pg_config_ext.h: No such file or directory


emerge --info

Portage 2.2.7 (default/linux/amd64/13.0/desktop/kde, gcc-4.8.1, glibc-2.17, 3.8.13-tuxonice x86_64)
=================================================================
System uname: Linux-3.8.13-tuxonice-x86_64-Intel-R-_Core-TM-_i7-3820_CPU_@_3.60GHz-with-gentoo-2.2
KiB Mem:     8161508 total,   2679224 free
KiB Swap:    6291452 total,   6291424 free
Timestamp of tree: Wed, 06 Nov 2013 14:30:02 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.5-r4, 3.2.5-r3, 3.3.2-r2
dev-util/cmake:           2.8.12
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.14
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.8.1-r1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.11 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo RandomLAN
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA PUEL AdobeFlash-10.1 Oracle-BCLA-JavaSE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -fno-stack-protector"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe -fno-stack-protector"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://defiant.random.lan/portage http://firebrand.random.lan/portage http://sys.randomdan.homeip.net/"
LANG="en_GB.utf8"
LC_ALL="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="-e 'ssh -x'"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/RandomLAN"
SYNC="rsync://portage@portage/gentoo-portage"
USE="64bit X a52 aac accessibility acl acpi additions aim alsa amd64 apm apng audiofile automount autoshutdown autoupdate bash-completion berkdb bluetooth branding browserplugin bzip2 c++0x cairo caps cdb cdda cddb cdparanoia cdr clang cli consolekit cracklib cscope css ctype curl curlwrappers custom-cflags custom-march custom-optimization cxx dbus declarative device-mapper dhcpcd dio disable-sound disable-torrent disk-partition divx dlloader docbook dpms dri drm dts dv dvb dvd dvdr dvdread dynagraph ebook effects emerald encode exif extensions extrafilters extras fam fame fastcgi ffmpeg firefox firmware flac fontconfig frei0r frontendonly ftp fts3 fuse g3dvl gallium gbm gdbm gif gimp git glamor gles gles1 gles2 glib glitz glut glx gmail gmailtimestamps gmedia gnutls gtk gtk3 h323 hardenedphp hpn iconv icq icu id3 id3tag imagemagick imap imlib imlib2 innodb inotify ipv6 ithreads javascript jpeg jpeg2k kde kdeenablefinal kipi kqemu lame lcms ldap libkms libnotify lightning lm_sensors logrotate lto lvm lvmboot lvmroot lzma lzo mad maildir melt messenger minizip mmx mmxext modules mozcalendar mp3 mp4 mp4live mpeg mpeg2 mpeg4 mpm-prefork msn mudflap multilib multithreaded mysql mysqli mythtv ncurses network network-cron networkmanager nls no-old-linux nocardbus nocd nohardenedkernel nptl nptlonly nscd nsplugin ntp nuv nvidia offensive ogg openexr opengl openvg optimize opus oscar osmesa pam pango pch pcre pdf plasma png policykit portage postgres ppds pvr python python3 qt3support qt4 r600-llvm-compiler rdesktop rdp readline real realmedia redland remote resolvconf rtmp sblive screen secure-delete session shared-dricore sharedext shorten silc smp sndfile soap sockets spell sql sqlite sse sse-filters sse2 sse3 sse4_1 sse4_2 ssl ssse3 startup-notification stats stencil-buffer stream subversion svg sw-suspend symlink sysfs syslog system-cairo system-jpeg system-sqlite system-v8 tcpd themes theora threads thumbnail tidy tiff transcode truetype udev udisks underscores unicode unity-lobby unlock-notify upnp upower usb uuid v4l v4l2 vaapi vdpau vhosts vim vim-pager vim-syntax vim-with-x vlc vorbis vpnc win32codecs wmf wmp wxwidgets x264 xa xattr xcb xcomposite xinerama xml xmms xmp xrandr xscreensaver xsl xslt xv xvfb xvid xvmc yahoo yvl2 zip 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="filter authz_host cgid mime_magic mime autoindex vhost_alias dav dir deflate log_config env rewrite cache mem_cache unixd socache authz_core authn_core socache_shmcb" CALLIGRA_FEATURES="braindump flow karbon stage tables words" CAMERAS="sony_dscf1 sony_dscf55" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="syslog lvm plymouth" DVB_CARDS="none" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="none" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby20" USERLAND="GNU" VIDEO_CARDS="radeon r600" 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON


Reproducible: Always

Steps to Reproduce:
1. emerge tora
Actual Results:  
[0mcd /var/tmp/portage/dev-db/tora-2.1.3-r3/work/tora-2.1.3_build/src && /usr/bin/x86_64-pc-linux-gnu-g++  -DCMAKE_BUILD -DHAVE_CONFIG_H -DHAVE_DLFCN_H -DHAVE_POSTGRESQL_LIBPQ_FE_H -DHAVE_UNISTD_H -DLIBPQ_DECL_CANCEL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_THREAD_LIB -DQT_XML_LIB -DTOMONOLITHIC -DTO_NO_ORACLE  -DNDEBUG -O2 -march=native -pipe -fno-stack-protector  -I/var/tmp/portage/dev-db/tora-2.1.3-r3/work/tora-2.1.3_build/src -I/var/tmp/portage/dev-db/tora-2.1.3-r3/work/tora-2.1.3/src -isystem /usr/include/qt4 -isystem /usr/include/qt4/QtGui -isystem /usr/include/qt4/QtXml -isystem /usr/include/qt4/QtSql -isystem /usr/include/qt4/QtNetwork -isystem /usr/include/qt4/QtCore -I/var/tmp/portage/dev-db/tora-2.1.3-r3/work/tora-2.1.3 -I/var/tmp/portage/dev-db/tora-2.1.3-r3/work/tora-2.1.3_build -I/usr/include/qt4/QtDesigner -I/usr/include/qt4/QtDeclarative -I/usr/include/qt4/QtScriptTools -I/usr/include/qt4/QtDBus -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtMultimedia -I/usr/include/qt4/QtXmlPatterns -I/usr/include/qt4/QtWebKit -I/usr/include/qt4/QtUiTools -I/usr/include/qt4/QtTest -I/usr/include/qt4/QtScript -I/usr/include/qt4/QtSvg -I/usr/include/qt4/Qt3Support -I/usr/share/qt4/mkspecs/default -I/usr/include/FerrisLoki -I/usr/include/FerrisLoki/loki -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include -I/var/tmp/portage/dev-db/tora-2.1.3-r3/work/tora-2.1.3/src/otl -I/usr/include/qt4/Qsci    -DTOVERSION=\"2.1.3\" -DDEFAULT_PLUGIN_DIR=\"/usr/share/tora/\" -DQT -DSCI_LEXER  -include /var/tmp/portage/dev-db/tora-2.1.3-r3/work/tora-2.1.3_build/src/precompiled.h -Winvalid-pch  -o CMakeFiles/tora.dir/toqsqlconnection.o -c /var/tmp/portage/dev-db/tora-2.1.3-r3/work/tora-2.1.3/src/toqsqlconnection.cpp
In file included from <command-line>:0:0:
/usr/include/stdc-predef.h:40:1: warning: /var/tmp/portage/dev-db/tora-2.1.3-r3/work/tora-2.1.3_build/src/precompiled.h.gch/tora_Gentoo.h++: not used because `NDEBUG' is defined [-Winvalid-pch]
 #endif
 ^
In file included from /usr/include/libpq-fe.h:29:0,
                 from /var/tmp/portage/dev-db/tora-2.1.3-r3/work/tora-2.1.3/src/toqsqlconnection.cpp:75:
/usr/include/postgres_ext.h:26:27: fatal error: pg_config_ext.h: No such file or directory
 #include "pg_config_ext.h"
                           ^
compilation terminated.


Expected Results:  
Successful compile/install.

Haven't yet tried other versions of tora (currently attempting to upgrade from r2 to r3) and/or postgresql-base.
The postgresql USE flag being set is also an assumption, based on the error.
Comment 1 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-11-09 09:30:37 UTC
Can you please attach the complete build log and comment with the output of `emerge --info`? Thank you in advance.
Comment 2 Dan Goodliffe 2013-11-09 13:47:41 UTC
Created attachment 362878 [details]
complete build.log
Comment 3 Dan Goodliffe 2013-11-09 13:48:44 UTC
build.log attached, emerge --info as per original post.
Comment 4 Dan Goodliffe 2013-11-11 19:21:23 UTC
All =tora-2.1.3* ebuilds fail with the same error (2.1.1 fails with an entirely different error before getting as far)
I'll test later to see if it might be related the the recent(ish) upgrades to postgresql-base-9.3 from 9.2
Comment 5 Michael Haubenwallner (RETIRED) gentoo-dev 2013-11-18 16:22:28 UTC
(In reply to Dan Goodliffe from comment #4)
> I'll test later to see if it might be related the the recent(ish) upgrades
> to postgresql-base-9.3 from 9.2

YesPlease, because this doesn't happen with 9.2.
Comment 6 Dan Goodliffe 2013-11-18 23:29:09 UTC
On the face of it... it's wrong in both cases (9.2 and 9.3) as it doesn't add the /usr/include/postgresql-9.anything folder to the search path for g++.

To test this, I tried:
riogrande ~ # CXXFLAGS="-I/usr/include/postgresql-9.3" emerge -1 tora
And that works a treat.

Then I get out of my comfort zone, looks like cmake is finding PostgreSQL in the wrong place:
riogrande ~ # ebuild /usr/portage/dev-db/tora/tora-2.1.3-r3.ebuild configure
....
-- Found Qt4: /usr/bin/qmake (found suitable version "4.8.5", minimum required is "4.3.0") 
Qt4 Found OK
-- checking for module 'ferrisloki'
--   found ferrisloki, version 3.0.13
-- Found QScintilla2: /usr/lib64/qt4/libqscintilla2.so
--          includes: /usr/include/qt4/Qsci
QScintilla2 Found OK
-- Oracle support is disabled by user choice
-- Found PostgreSQL: /usr/include  
-- PostgreSQL environment found: /usr/include /usr/lib64/libpq.so
-- DB2 not found.
....

However:
riogrande ~ # pg_config --includedir
/usr/include/postgresql-9.3

riogrande ~ # pg_config92 --includedir
/usr/include/postgresql-9.2

So I'm guessing that in the time of 9.2, it all worked by chance.
Comment 7 Aaron W. Swenson gentoo-dev 2013-11-21 11:53:07 UTC
Please try with app-admin/eselect-postgresql-1.2.1. This is most likely bug 486674.
Comment 8 Dan Goodliffe 2013-11-21 20:07:48 UTC
Yes, the dirtiness in eselect-postgresql-1.2.1 does allow compilation to succeed. I guess tora is one of the (probably many) packages that have historically guessed as per comment 4 in bug 486674.
Comment 9 Michael Haubenwallner (RETIRED) gentoo-dev 2013-11-22 08:38:46 UTC
Question is if pg_config is a Postgres upstream thing or distro specific:

In the former case I'd willing to submit a patch (proposals welcome!) upstream,
in the latter case this is a dupe of #486674.
Comment 10 Dan Goodliffe 2013-11-22 19:28:38 UTC
http://www.postgresql.org/docs/9.3/static/app-pgconfig.html
General PostgreSQL thing.
Comment 11 Aaron W. Swenson gentoo-dev 2014-01-12 21:03:29 UTC
Yes, the build system is handling discovery of the header files incorrectly. pg_config should be utilized rather than guessing.
Comment 12 Sergey S. Starikoff 2014-09-29 13:32:33 UTC
(In reply to Dan Goodliffe from comment #6)
> -- Oracle support is disabled by user choice

First one: don't use 2.1.3.
It's outdated and unsupported, its interface is broken (see bug #522180 for details, following link to upstream's ticket).

Second one: checking on yesterday's snapshot (see bug #523262 for detailt, please, note that expected by that version of ebuild patch is already applied ti upstream code tree), I've find, that TOra as PostgreSQL client fails to build without Oracle support.
See bug in upstream tracker https://sourceforge.net/p/tora/bugs/886/ (btw: why I can't put this link into "See Also" field?), error differs, but I expect the same issue.

P.S. Could you make a check of building TOra as MySQL client (also, first time without and later with Oracle support)?
Comment 13 Sergey S. Starikoff 2014-09-30 07:10:51 UTC
BTW, =dev-db/tora-2.1.1 builds successfully with postgres-only support (for general build issues and patches see bug #522990).
Could you check this version as mysql-only (for now I don't use MySQL) client?
Comment 14 Sergey Popov gentoo-dev 2015-02-20 09:53:37 UTC
Broken version was dropped from tree