Luma
Luma

Reputation: 55

pg_config in Postgresql 8.3.1

I'm trying to build Postgresql 8.3.1 from sources (later I need to run extension patch on the top of it). Nevertheless, the src/tutorial doesn't make

$make
make: pg_config: Command not found
make: *** No targets.  Stop.

I went to the bin directory of the installation and I found pg_config.exe there, I need help to make the configuration detect it.

I tried something like:

./configure --with-pg-config=path/pgsql/bin
 make
 make install

but it's still not working.

Thanks

Upvotes: 1

Views: 4805

Answers (1)

Craig Ringer
Craig Ringer

Reputation: 324295

You need to make sure that pg_config is on the executable search path - the PATH environment variable - before running configure.

It appears that you're probably using MinGW with msys, in which case you can use the syntax Andrew proposed. The location of the PostgreSQL executables may be a bit odd on msys, though, as per the documentation. UNIX paths have colons in them, so they can't contain drive specifiers like c:\, so MinGW "mounts" the drive letters as root directory entries like /c. Thus, for c:\Program Files\PostgreSQL 8.3\bin you would use:

"/c/Program Files/PostgreSQL 8.3/bin/pg_config.exe"

Note the double quotes. Try running that as a command in msys, see what happens. If you got pg_config output not an error, add it to the PATH with:

export PATH="$PATH:/c/Program Files/PostgreSQL 8.3/bin"

If you're on Cygwin, then:

  • That's not really an ideal environment, kind of half-windows, half-unix. Consider MinGW+msys, or compiling PostgreSQL natively using the Windows Platform SDK compiler and the Windows build scripts, as per Installing from Source Code on Windows .

  • Cygwin also mounts C:\ as /c/ so the path above should be just as valid for Cygwin.

This would've been a lot easier if you'd mentioned clearly:

  • Your operating system
  • Your compiler and toolset

Additionally, a_horse_with_no_name is quite right: Installing PostgreSQL 8.3.1 now is just nuts. At the absolute bare minimum you should be installing 8.3.21, the current version of the 8.3 series at time of writing. As per the version policy this is completely compatible with all 8.3.x versions. You should then begin urgent preparations to update to 9.2 (or 9.1 if you insist) before 8.3 goes end-of-life; again, see the version policy.

Upvotes: 3

Related Questions