Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 366455

Summary: =dev-libs/libpqxx-3.1-r2 fails test phase of emerge, depends on postgresql
Product: Gentoo Linux Reporter: Ian Delaney (RETIRED) <idella4>
Component: [OLD] KDEAssignee: PgSQL Bugs <pgsql-bugs>
Status: RESOLVED INVALID    
Severity: normal    
Priority: Normal    
Version: 10.0   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=354365
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 354033    
Attachments: my emerge --info
the build log

Description Ian Delaney (RETIRED) gentoo-dev 2011-05-08 10:45:46 UTC
Testing pacakge flann-1.6.8, cannot invoke test phase.  Screen output explains all.

>>> Source compiled.
 * The tests need a running PostgreSQL server version 8.4.x or older
 * and an existing database.
 * Test requires PGDATABASE and PGUSER to be set at a minimum.
 * Optionally, set PGPORT and PGHOST.
 * Define them at the command line or in:
 *     /etc/libpqxx_test_env
 * Make sure 'standard_conforming_strings' is set to off in postgresql.conf.
Database (Default: portage):                               
Host (Default: Unix socket): 
Port (Default: 5432): 
User (Default: portage): 
 * Is the server running?
 * Check that the role and database exist, and authentication method is set to
 * trust for:
 *     Role: 
 *     Database: 
 * ERROR: dev-libs/libpqxx-3.1-r2 failed (test phase):
 *   Couldn't connect to server.
 * 
 * Call stack:
 *     ebuild.sh, line  56:  Called src_test
 *   environment, line 2207:  Called die
 * The specific snippet of code:
 *           die "Couldn't connect to server.";

What puzzles about this is how it hasn't been 'fixed' well before getting to this version.

It requires a version 8.4.x, current is 8.9.x
I not only depends upon the version to be emerged, but it requires an absent postgresql.conf file after emerging it and running recommended

emerge postgresql-server --config

to create databases.


Reproducible: Always

Steps to Reproduce:
1. set test
2. emerge package
3.
Actual Results:  
aborts emerge at test phase.

Unset test phase, package emerges.

Expected Results:  
Past test phase.

emerged the postgresql and followed recommended setup.  It still appears to be missing dependent databases.

Test requires PGDATABASE and PGUSER to be set at a minimum.
Optionally, set PGPORT and PGHOST.
 * Define them at the command line or in:
 *     /etc/libpqxx_test_env
 * Make sure 'standard_conforming_strings' is set to off in postgresql.conf.

On  first run, postgresql unspecified as a dependency, no running daemon server, no required databses.

How did it pass thru last 4.6.1??
Comment 1 Ian Delaney (RETIRED) gentoo-dev 2011-05-08 10:54:53 UTC
Created attachment 272471 [details]
my emerge --info
Comment 2 Ian Delaney (RETIRED) gentoo-dev 2011-05-08 10:55:26 UTC
Created attachment 272473 [details]
the build log
Comment 3 Ian Delaney (RETIRED) gentoo-dev 2011-05-08 10:57:34 UTC
Disregard line1. Testing package flann-1.6.8,
Intended dev-libs/libpqxx-3.1-r2
Comment 4 Agostino Sarubbo gentoo-dev 2011-05-08 11:18:24 UTC
Ian, please assign to correct maintainer(s) or to wranglers.

Anyway, i believe that needed: test? (dev-db/postgresql-server-8.4)

Btw please install the correct version of postgres, start the server and retry the test.
Comment 5 Ian Delaney (RETIRED) gentoo-dev 2011-05-08 15:12:18 UTC
The version had been emerged & the postgresql-server daemon had been started, but as described still more reqired
Comment 6 Aaron W. Swenson gentoo-dev 2011-05-09 17:13:56 UTC
(In reply to comment #0)
> Testing pacakge flann-1.6.8, cannot invoke test phase.  Screen output explains
> all.
> >>> Source compiled.
>  * The tests need a running PostgreSQL server version 8.4.x or older
>  * and an existing database.
>  * Test requires PGDATABASE and PGUSER to be set at a minimum.
>  * Optionally, set PGPORT and PGHOST.
>  * Define them at the command line or in:
>  *     /etc/libpqxx_test_env
>  * Make sure 'standard_conforming_strings' is set to off in postgresql.conf.
> What puzzles about this is how it hasn't been 'fixed' well before getting to
> this version.
It is fixed. It's failing because you have failed to do the prep work. The tests need a server to be running and prepared for it to do its job. This is something you must do and should not be done in the ebuild. (Really, that 'should' should be a cannot, but I am not administering everyone's PostgreSQL database cluster.)

> It requires a version 8.4.x, current is 8.9.x
What?

> I not only depends upon the version to be emerged, but it requires an absent
> postgresql.conf file after emerging it and running recommended
> emerge postgresql-server --config
> to create databases.
What?

> emerged the postgresql and followed recommended setup.  It still appears to be
> missing dependent databases.
Only because you haven't made them.

> Test requires PGDATABASE and PGUSER to be set at a minimum.
> Optionally, set PGPORT and PGHOST.
>  * Define them at the command line or in:
>  *     /etc/libpqxx_test_env
>  * Make sure 'standard_conforming_strings' is set to off in postgresql.conf.
You've taken this out of context. You've missed the line that states that the server must already be running and the database that the tests are to be performed on must already exist. You can create a special role for these tests, but that is optional as the 'postgres' database superuser or any other existing role can perform the tasks provided that the other roles have the permissions on the given database to do so.

> On  first run, postgresql unspecified as a dependency, no running daemon
> server, no required databses.
'dev-db/postgresql-base' is specified as a dependency and is the only required dependency. The server may run on any machine.

> How did it pass thru last 4.6.1??
What?

To be clear:
Only 'dev-db/postgresql-base' is required. The tests do not depend on 'dev-db/postgresql-server' because that server may be running anywhere, including one on another machine.

Any server that is version 8.4.x or older, or earlier, or lower, will handle the tests properly. Servers versioned 9.0.x or 9.1.x will not. 'dev-libs/libpqxx' will still build properly against any version library.

If you don't want to go through all the work of properly setting this up, don't run the tests.