On Mon, 2007-06-04 at 13:51 +0930, Steve Thomas wrote:

> I have PostgreSQL 8.2.4 installed from a package. The DBD::Pg install
> requires pg_config from the development kit, so I've unpacked that and ran
> gmake to build pg_config. But I still cannot get the make for DBD::Pg to run
> - it crashes immediately with this:
> 
> $ make
[...]
> Pg.h:21:22: libpq-fe.h: No such file or directory
> In file included from Pg.h:47,
>                  from Pg.xs:14:
> dbdimp.h:36: error: syntax error before "PGconn"
> dbdimp.h:36: warning: no semicolon at end of struct or union
> etc. for about another hundred error lines.
> 
> (This  was after I tinkered with the DBD::Pg Makefile to adjust the
> erroneous paths provided by pg_config! Which made no difference.)

The libpq-fe.h file that gcc is unable to find while attempting to
compile the code is the primary header file of the postqres C client
development library. It defines the PGconn and other API datastructures.

It's been many years since I've used RedHat with postgres.  But, as I
recall there was a postgres-devel package or something similar that
would install this header file along with the libpq shared library.  You
may want to check and make sure that you have all of the postgres devel
packages installed.  A missing devel package and a lack of a correct
devel package dependency in the perl module package would explain why
this would work for some people and not others.

If there is no longer a devel package, or you already have it installed,
you can use 'locate' to find the libpq-fe.h header file.  Then, you can
either pass the appropriate arugment to './configure' to include that
include file path in the include paths or, if that is not possible, edit
the make file to include the path of its location after a '-I' argument
to gcc.

As far as I can remember, I think RedHat used to install these files in
strange places like a directories called "postgres" in /usr/include
and /usr/lib rather than those directories themselves.  So, you should
also be able to fix your problem by symlinking, or moving, those files
into the UNIX standard directories for their file type.  Although, that
type of action would make it more difficult to maintain your install
over time as you performed postgres upgrades.  Therefor, it would be
best to attempt to resolve your issue, as James suggests - by relying on
the distributions packages.  Reinstalling the packages can sometimes
clear up the types of problems you're seeing, especially if the source
code and configurations of those packages have been modified.

I hope my explanation of what I believe the problem to be has made it
easier for you to figure out how to correct it.


   - VAB

Attachment: signature.asc
Description: This is a digitally signed message part

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to