Summary: | emerge --config =dev-db/postgresql-server-8.4.1 fails in initdb | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Dirk Olmes <dirk.olmes> |
Component: | New packages | Assignee: | PgSQL Bugs <pgsql-bugs> |
Status: | RESOLVED TEST-REQUEST | ||
Severity: | major | CC: | che, chris, holger, mark+gentoobugs, nbkolchin, tom.gl |
Priority: | High | ||
Version: | 2008.0 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 285475 | ||
Attachments: | configure --with-libraries |
Description
Dirk Olmes
2009-09-10 08:55:12 UTC
initdb fails even if you run it from the command line. You have to add -L /usr/share/postgresql-8.4 As mentioned in bug#276125 comments #14, #15 you need to eselect the new installation before emerging the server, since the ebuild uses eselect for figuring out certain paths which are built into the binaries. Doing so automatically would probably be wrong, so it is probably easier to simply abort building -server unless the right version has been eselected. Maybe there is another way to build -server without relying on the setting of eselect. I got it working now: - eselect postgresql 8.4 - emerge postgresql-base and postgresql-server-8.4.1 - emerge --config Now that I understand how the eselect stuff works I would have expected the build to abort if the right postgres version wasn't selected. Building a package that doesn't work is not my preferred way of doing it. I have to admit that this does not sound like a solution to me. I would expect to eselect a package only when you want to switch to it, not to emerge it in a new slot. Or at least, as said by Dirk Olmes, a warning at the beginning of the emerge. (In reply to comment #3) > I got it working now: > - eselect postgresql 8.4 > - emerge postgresql-base and postgresql-server-8.4.1 > - emerge --config > > Now that I understand how the eselect stuff works I would have expected the > build to abort if the right postgres version wasn't selected. Building a > package that doesn't work is not my preferred way of doing it. > Can you please post the exact commands that you used? I still can not get this to work. (In reply to comment #5) > Can you please post the exact commands that you used? I still can not get this > to work. I assume you have postgresql-8.3.x installed ... (s)boromir# eselect postgresql list Available postgresql installations 8.3 <-S<-* base-8.3.8 server-8.3.8 Now emerge =dev-db/postgresql-base-8.4.1 This will give you (s)boromir# eselect postgresql list Available postgresql installations 8.3 <-S<-* base-8.3.8 server-8.3.8 8.4 base-8.4.1 Then eselect postgresql 8.4 and emerge =dev-db/postgresql-server-8.4.1 After that, emerge --config =dev-db/postgresql-server-8.4.1 should work properly (In reply to comment #6) > After that, emerge --config =dev-db/postgresql-server-8.4.1 should work > properly Unfortunately, it doesn't work for me... I have eselected 8.4.1 before --config, and emerge --config tried to access /usr/share/postgresql-8.3/postgres.bki which didn't exist anymore (due to a --depclean). After ln -s postgresql-8.4/ postgresql-8.3 it finally worked for me (well, that's a kind of un-solution, IMHO) :-/ (In reply to comment #7) > (In reply to comment #6) > > > After that, emerge --config =dev-db/postgresql-server-8.4.1 should work > > properly > > Unfortunately, it doesn't work for me... I have eselected 8.4.1 before > --config, and emerge --config tried to access > /usr/share/postgresql-8.3/postgres.bki which didn't exist anymore (due to a > --depclean). just running emerge --config is not enough, you have to emerge postgresql-base and postgresql-server again. Created attachment 204169 [details, diff]
configure --with-libraries
configure needs to be told about the correct library path.
The patch solves the problem for me.
This should probably applied to other versions as well.
Anyone care to fix this bug? Or is something wrong with my patch? (In reply to comment #10) > Anyone care to fix this bug? Or is something wrong with my patch? > I haven't been able to reproduce the error yet, so I don't want to blindly apply a patch which doesn't do anything for me. Steps to reproduce: (If you have 8.3 already installed you can skip step 1. It does not matter whether 8.4 is already installed or not) 1. emerge dev-db/postgresql-server:8.3 2. eselect postgresql set-all 8.3 3. emerge dev-db/postgresql-server:8.4 4. strings /usr/lib/postgresql-8.4/bin/*|grep 'postgresql-8\.3' The last command lists the references to directories from 8.3. This list should be empty, otherwise, e.g. as in this bug report, /usr/lib/postgresql-8.4/bin/init uses /usr/share/postgresql-8.3/postgres.bki. If postgres were not split in base and server packages the build script would find everything in its build directory. But now the files which are built in base can only be found in the live filesystem. Without my patch (or the ugly eselect-postgresql-hack) the server build finds (and uses!) the files of 8.3. (In reply to comment #12) > Steps to reproduce: > > (If you have 8.3 already installed you can skip step 1. It does not matter > whether 8.4 is already installed or not) > > 1. emerge dev-db/postgresql-server:8.3 > 2. eselect postgresql set-all 8.3 > 3. emerge dev-db/postgresql-server:8.4 > 4. strings /usr/lib/postgresql-8.4/bin/*|grep 'postgresql-8\.3' > > The last command lists the references to directories from 8.3. This list should > be empty, otherwise, e.g. as in this bug report, > /usr/lib/postgresql-8.4/bin/init uses /usr/share/postgresql-8.3/postgres.bki. > > If postgres were not split in base and server packages the build script would > find everything in its build directory. But now the files which are built in > base can only be found in the live filesystem. Without my patch (or the ugly > eselect-postgresql-hack) the server build finds (and uses!) the files of 8.3. > I've also had this. Experienced it myself a while ago, and can confirm that above steps indeed gives you the 'wrong' paths which present themselves in pkg_config() for 8.4.1. ...and the patch fixes these errors for me :-) Good job, Stephan! At last, it should be fixed in -r1. Please reopen if it still causes issues. Works for me. Thanks |