Thread: Make check uses wrong binary.
I've seen this before, and I'm not sure why I get this. When I run make check, in the top dir, I get: ============== removing existing temp installation ============== ============== creating temporary installation ============== ============== initializing database system ============== pg_regress: initdb failed Examine ./log/initdb.log for the reason. make[2]: *** [check] Error 2 In the log file it says: The program /usr/local/pgsql/bin/postgres needed by initdb does not belong to PostgreSQL version 7.4beta2, or there may be a configuration problem. Obviously, it's not supposed to take that binary but the one in the source tree. Before I did this, I did a make clean and a make. In src/test/regress/pg_regress I see this: libdir='/usr/local/pgsql/lib' pkglibdir='/usr/local/pgsql/lib' bindir='/usr/local/pgsql/bin' datadir='/usr/local/pgsql/share' Kurt
Kurt Roeckx <Q@ping.be> writes: > In the log file it says: > The program > /usr/local/pgsql/bin/postgres > needed by initdb does not belong to PostgreSQL version 7.4beta2, or > there may be a configuration problem. > Obviously, it's not supposed to take that binary but the one in > the source tree. Actually, it should take the one installed beside initdb in the temporary installation's bin directory. Eyeballing the check in initdb, the only likely reason I can see for rejecting the correct postgres executable is if it's not putting out the exact same version string that initdb expects. You might try running the temp installation's postgres with -V to see what it prints. regards, tom lane
Kurt Roeckx writes: > In the log file it says: > The program > /usr/local/pgsql/bin/postgres > needed by initdb does not belong to PostgreSQL version 7.4beta2, or > there may be a configuration problem. There is logic at the top of initdb that tries to prefer a "postgres" program in its own directory of the hardcoded location. Please look there if you find anything wrong. > In src/test/regress/pg_regress I see this: > libdir='/usr/local/pgsql/lib' > pkglibdir='/usr/local/pgsql/lib' > bindir='/usr/local/pgsql/bin' > datadir='/usr/local/pgsql/share' But there is also this: bindir=$temp_install/install/$bindir libdir=$temp_install/install/$libdir pkglibdir=$temp_install/install/$pkglibdir datadir=$temp_install/install/$datadir So everything is correct in this regard. -- Peter Eisentraut peter_e@gmx.net