Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 251290 - >=x11-libs/qt-sql-4.4 >=dev-db/postgresql-8.3 - ../../../sql/drivers/psql/qsql_psql.cpp:60:23: error: pg_config.h: No such file or directory
Summary: >=x11-libs/qt-sql-4.4 >=dev-db/postgresql-8.3 - ../../../sql/drivers/psql/qsq...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Highest major (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-17 08:40 UTC by Steffen 'j0inty' Stollfuß
Modified: 2011-04-03 12:50 UTC (History)
4 users (show)

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


Attachments
failed compile (x11-libs/qt-sql-4.4.2:20081217-082546.log,13.83 KB, text/plain)
2008-12-17 08:41 UTC, Steffen 'j0inty' Stollfuß
Details
successfull compile (x11-libs/qt-sql-4.4.2:20081217-083724.log,36.58 KB, text/plain)
2008-12-17 08:41 UTC, Steffen 'j0inty' Stollfuß
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen 'j0inty' Stollfuß 2008-12-17 08:40:47 UTC
Hi,

If you try to compile >=qt-sql-4.4 with postgres support against the postgresql-8.3 package, it fails.

The same error I founded with php5, too. And today I found out that the qt-sql compile now with the same fix.

http://bugs.gentoo.org/show_bug.cgi?id=251046

You can fix this problem when you do this here.

cd /usr/include/postgesql
ln -s . libpq-4

regards
j0inty

Reproducible: Always

Steps to Reproduce:
1.emerge >=postgresql-8.3
2.emerge >=qt-sql-4.4
3.

Actual Results:  
compiling ../../../sql/drivers/psql/qsql_psql.cpp                                                                                          
../../../sql/drivers/psql/qsql_psql.cpp:60:23: error: pg_config.h: No such file or directory
Comment 1 Steffen 'j0inty' Stollfuß 2008-12-17 08:41:21 UTC
Created attachment 175579 [details]
failed compile
Comment 2 Steffen 'j0inty' Stollfuß 2008-12-17 08:41:54 UTC
Created attachment 175581 [details]
successfull compile
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2008-12-17 17:05:14 UTC
(In reply to comment #0)
> cd /usr/include/postgesql
> ln -s . libpq-4

That's a horrible hack. It's not a solution to the problem.
Comment 4 Steffen 'j0inty' Stollfuß 2008-12-17 18:55:25 UTC
(In reply to comment #3)
> (In reply to comment #0)
> > cd /usr/include/postgesql
> > ln -s . libpq-4
> 
> That's a horrible hack. It's not a solution to the problem.
> 

You are right. That this is a good hack, I never said.

But its the way that works. ;)

I think we have to patch the makefile or autoconf files.

j0inty
Comment 5 Markos Chandras (RETIRED) gentoo-dev 2008-12-18 12:27:05 UTC
Sorry , I cant reproduce it on my system ( amd64 if that matters ) 

This is what I have installed

[I] dev-db/postgresql-server (8.3.5(8.3)@18/12/2008): PostgreSQL server
[I] x11-libs/qt-sql (4.4.2(4)@18/12/2008): The SQL module for the Qt toolkit.

qt-sql is built-in with postgres, qt3support ,sqlite support
Comment 6 Ben de Groot (RETIRED) gentoo-dev 2008-12-18 13:22:47 UTC
CC'ing postgresql herd. Do you guys have any insight in this?
Comment 7 Patrick Lauer gentoo-dev 2009-01-10 22:35:35 UTC
Cannot reproduce in a clean chroot. Very strange.
Comment 8 Carlos Konstanski 2009-04-18 16:16:15 UTC
The problem is virtual/postgresql-base.  qt-sql depends on it.  I have 2 gentoo boxes, one of which does not have the postgresql problem, and one that does.  The box that does not have the problem is an x86 machine.  It looks like this:

[I--] [ ~] app-admin/eselect-postgresql-0.3 (0)
[I--] [ ~] dev-db/postgresql-base-8.3.7 (8.3)
[I--] [ ~] dev-db/postgresql-server-8.3.7 (8.3)
[I--] [ ~] virtual/postgresql-base-8.3 (8.3)

The one that does have the problem is an amd64 machine.  It will not install virtual/postgresql-base-8.3.  It wants virtual/postgresql-base-8.2, and it wants to install dev-db/postgresql-base-8.2.11.

I have all 4 of these packages keyworded on both systems, and all USE flags for these packages are identical between the two.

So this is really a postgresql bug.  Why won't virtual/postgresql-base-8.3 install?

emerge --info on the bad machine:

Portage 2.1.6.11 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.27.10 x86_64)
=================================================================
System uname: Linux-2.6.27.10-x86_64-AMD_Athlon-tm-_64_Processor_3000+-with-glibc2.2.5
Timestamp of tree: Sat, 18 Apr 2009 09:00:14 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.7
dev-lang/python:     2.5.2-r7
dev-python/pycrypto: 2.0.1-r8
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /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 /etc/udev/rules.d"
CXXFLAGS="-O2 -march=k8"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages metadata-transfer parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="de en en_US"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/lisp /usr/portage/local/layman/java-overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X acl acpi alsa amd64 apache2 berkdb bluetooth branding browserplugin bzip2 cairo cdr cli cracklib crypt cups curl dbus dri dvd dvdr dvdread eds emacs emboss encode evo fam ffmpeg firefox firefox3 fortran gd gdbm gif gnutls gpm gstreamer gtk gtkhtml guile hal iconv imagemagick imap ipv6 isdnlog jack jbig jpeg jpeg2k latex libnotify libwww lm_sensors mad maildir midi mikmod mmx mmxext mod motif mozilla mp3 mpeg mudflap multilib ncurses nls nptl nptlonly nsplugin odbc ogg opengl openmp oss pam pcre pdf perl pic png pni postgres ppds pppd python qt3 qt3support qt4 quicktime readline reflection ruby samba sasl sdl session source spell spl sse sse2 sse3 ssl startup-notification svg sysfs tcltk tcpd tetex threads tiff truetype unicode urandom usb vim vorbis xattr xft xinerama xml xorg xulrunner xv zlib" ALSA_CARDS="nvidia" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en en_US" USERLAND="GNU" VIDEO_CARDS="nvidia nv"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 9 Carlos Konstanski 2009-04-18 17:01:25 UTC
On my amd64 machine:

root@sphinktoo:~# emerge -av ">=virtual/postgresql-base-8.3"
!!! All ebuilds that could satisfy ">=virtual/postgresql-base-8.3" have been masked.
!!! One of the following masked packages is required to complete your request:
- virtual/postgresql-base-8.3 (masked by: package.mask)

Because I masked it!  I'm an idiot.  I am installing it now.
Comment 10 Davide Pesavento (RETIRED) gentoo-dev 2009-07-31 19:17:50 UTC
Well... any updates? Is it working now? Do we need to raise the dep on postgresql-base?
Comment 11 Arttu Valo 2009-12-12 19:12:32 UTC
I think I just ran into this, while re-emerging qt-sql 4.6.0. I have a recently upgraded, split pg 8.4 on this system, upgraded just some days ago from pg 8.1/8.2, and 'eselect postgresql set-all 8.4' ran to fix the symlinks.

I'm sure wiser minds than mine have already mulled over this, but maybe the postgresql-base 8.3 and 8.4 packages should (for now) make a symlink to fix the includes path directory level change/ambiguity between pg versions? That is to cover for the dumped last pgsql directory level.

Here would be a crude sample patch for postgresql-base-8.4.1 ebuild currently in tree:
$ diff  /usr/portage/dev-db/postgresql-base/postgresql-base-8.4.1.ebuild ./postgresql-base-8.4.1.ebuild
117a118
>       ln -s '.' "${D}/${IDIR}/pgsql"

That way things that assume and try to use the "old", unsplit (<postgresql-8.3) paths, like the current qt-sql 4.6.0 ebuild, will just get redirected -- just like with the symlink everyone and their aunt has in /boot (boot -> .).
Comment 12 Ben de Groot (RETIRED) gentoo-dev 2009-12-28 10:20:42 UTC
I can't reproduce this either, with Qt 4.6.0. If a reproducable testcase can be provided, feel free to reopen.
Comment 13 Ron OHara 2011-04-03 12:36:15 UTC
Just as a separate occurence of this issue. I found that I had installed 3 slotted versions of Postgresql ... but had failed to run 'eselect postgresql 8.4' to specify the version I was actually running.  After doing the eselect I ran the emerge -uDv world that had trigged this bug ... and it has now run past the qt-sql compile correctly   ...
Comment 14 Aaron W. Swenson gentoo-dev 2011-04-03 12:50:26 UTC
This issue is actually fixed with app-admin/eselect-postgresql-1.0.6.

The old postgresql.eselect didn't perform updates properly, didn't select a default on its own or recover from removal properly.