Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 313765 - app-admin/eselect-postgresql: libpq-fe.h symlink causes false detection of postgresql include paths
Summary: app-admin/eselect-postgresql: libpq-fe.h symlink causes false detection of po...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-08 00:49 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2010-06-02 17:22 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2010-04-08 00:49:19 UTC
I'm not sure how the code flows, but libpq-fe.h is currently symlinked from /usr/include/postgresql-$SLOT to /usr/include, causing tests for libpq-fe.h to succeed… but then pg_config_manual.h is *not* symlinked, causing build failures if the package searches for the former and gets hit by the latter.

While this is a symptom of a bug in the build system, it would be nice if you could make it, well, consistent.
Comment 1 Aaron W. Swenson gentoo-dev 2010-04-08 10:42:18 UTC
libpq-fe.h in /usr/include is satisfactory for most builds. If a program needs more than that, they should be looking in /usr/include/postgresql/ or /usr/include/libpq/.
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-04-08 10:45:44 UTC
“causing build failures if the package searches for the former and gets hit by the latter.”

#if HAVE_LIBPQ_FE_H
# include <libpq-fe.h>
# include <pg_config_manual.h>
#elif HAVE_POSTGRESQL_LIBPQ_FE_H
# include <postgresql/libpq-fe.h>
# include <postgresql/pg_config_manual.h>
#endif

I hope you can tell what I'm saying here.
Comment 3 Aaron W. Swenson gentoo-dev 2010-04-08 12:53:46 UTC
Oh, I see. When the package finds libpq-fe.h in /usr/include/ it expects pg_config_manual.h to be there as well and never looks any deeper down in the directory.

I'll see what I can do.
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-04-08 13:05:27 UTC
Bingo.

FWIW I would consider that a bug in the buildsystem, but the same is true for packages looking for libpq-fe.h without using pg_config…

I've submitted a fix for the package with this problem, but still, it might not be too bad to get this “fixed” in eselect-postgresql.
Comment 5 Aaron W. Swenson gentoo-dev 2010-04-08 13:43:01 UTC
(In reply to comment #4)
> Bingo.
> 
> FWIW I would consider that a bug in the buildsystem, but the same is true for
> packages looking for libpq-fe.h without using pg_config…
> 
> I've submitted a fix for the package with this problem, but still, it might not
> be not too bad to get this “fixed” in eselect-postgresql.
> 
Fixed that for you.

See, I'm trying to figure that out now. But I don't know where the files are coming from. Have any hints as to where I might find some documentation?
Comment 6 Aaron W. Swenson gentoo-dev 2010-04-08 22:02:47 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > Bingo.
> > 
> > FWIW I would consider that a bug in the buildsystem, but the same is true for
> > packages looking for libpq-fe.h without using pg_config…
> > 
> > I've submitted a fix for the package with this problem, but still, it might not
> > be not too bad to get this “fixed” in eselect-postgresql.
> > 
> Fixed that for you.
> 
> See, I'm trying to figure that out now. But I don't know where the files are
> coming from. Have any hints as to where I might find some documentation?
> 

Never mind. I figured it out. It's in the -base ebuild. (^_^)
Comment 7 Patrick Lauer gentoo-dev 2010-06-02 17:22:01 UTC
+  02 Jun 2010; Patrick Lauer <patrick@gentoo.org>
+  +postgresql-base-7.4.29-r1.ebuild, +postgresql-base-8.0.25-r1.ebuild,
+  +postgresql-base-8.1.21-r1.ebuild, +postgresql-base-8.2.17-r1.ebuild,
+  +postgresql-base-8.3.11-r1.ebuild,
+  +files/postgresql-base-8.4-9.0-heimdal_strlcpy.patch,
+  +postgresql-base-8.4.4-r1.ebuild, +postgresql-base-9.0_beta1-r1.ebuild:
+  Fixes for #313765, #251046, #294462, #300793, #274836, #296714, #238817,
+  #278228, #263096, #246397, #285953. Thanks to Aaron Swenson for collecting
+  the fixes and testing.