Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 433734 - app-admin/eselect-postgresql fails to set /usr/bin/pg_config symlink?
Summary: app-admin/eselect-postgresql fails to set /usr/bin/pg_config symlink?
Status: RESOLVED NEEDINFO
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: 2012-09-03 01:58 UTC by Yan-Fa Li
Modified: 2012-09-03 21:32 UTC (History)
0 users

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


Attachments
emerge.log grep (l,24.01 KB, text/plain)
2012-09-03 21:31 UTC, Yan-Fa Li
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yan-Fa Li 2012-09-03 01:58:37 UTC
Psycopg looks for the pg_config binary when building. With postgres 91 this binary is created in the /usr/bin/path as /usr/bin/pg_config91, causing psycopg to fail to build. Adding a softlink back to pg_config allows the build to proceed. There is a pg_config binary in /usr/lib64/postgresql-9.1/bin/pg_config, but as this is not on the default path, the build can't find it. Not sure who is responsible for fixing this so I'm filing it under general for now.

Reproducible: Always

Steps to Reproduce:
1. try to build psycopg-2.4.5 with postgres-9.1.5 installed
2. I think I had an old postgres-9.0.5 installed too
3.
Actual Results:  
Build fails

Expected Results:  
Build should succeed

adding a softlink to pg_config91 fixed it for me, but this is a hack
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2012-09-03 18:23:24 UTC
You should have something like this already:
/usr/bin/pg_config -> /usr/lib/postgresql-9.0/bin/pg_config

unless somehow eselect-postgresql failed.
Comment 2 Aaron W. Swenson gentoo-dev 2012-09-03 20:52:07 UTC
eselect-postgresql creates a link for all executable files it finds in /usr/lib(64)?/postgresql-${SLOT}/bin.

It's also written to default to a slot unless you've set one, which results in /usr/bin/pg_config linking to the proper slot.

Just run:
   eselect postgresql set 9.1

That should fix the problem. As to why this was a problem in the first place, I don't know. Several times over I've started with a fresh system and it has always set something for me.

If you have something to show why it failed, please share.
Comment 3 Yan-Fa Li 2012-09-03 21:31:33 UTC
Created attachment 322862 [details]
emerge.log grep
Comment 4 Yan-Fa Li 2012-09-03 21:32:17 UTC
I can't find any evidence as to why it was symlinked. When I run

seshat ~ # eselect postgresql list
Available PostgreSQL Slots
  9.1 *                      server-9.1.5 base-9.1.5

It shows as being the correct version. I looked inside the emerge.log, and it shows a progression of upgrades as far back as 9.1.3. I did have to manually remove 9.0.5 which somehow remained on the system. I'm not too worried about what happened here, I just wanted to make sure someone at gentoo heard about it just in case there's a latent bug that may have been reported before. Thanks for the response.  BTW, I only noticed this, because I was forced to re-install all my python dependencies in order to fix KDE printing.