Thread: 7.1Beta 4&5 - clean build problem with '--with-perl'

7.1Beta 4&5 - clean build problem with '--with-perl'

From
"Creager, Robert S"
Date:
On both beta 4 and 5, the configure script is run with --with-perl
--with-tcl --with-CXX

On a clean build (/usr/local/pgsql directory tree removed), Pg.c fails to
build, not finding include file libpq-fe.h and then postgres_ext.h.  Linking
these two files to /usr/local/pgsql/include causes the build to complete
successfully.  Include paths on compile line: /usr/local/include
/usr/local/pgsql/include
/proj/twolf/local/lib/perl5/5.6.0/sun4-solaris/CORE.  Machine is an Ultra 5
with Solaris 2.6

Cheers,
Rob

Robert Creager
Senior Software Engineer
Client Server Library
303.673.2365 V
303.661.5379 F
888.912.4458 P
StorageTek
INFORMATION made POWERFUL

Re: 7.1Beta 4&5 - clean build problem with '--with-perl'

From
Tom Lane
Date:
"Creager, Robert S" <CreagRS@LOUISVILLE.STORTEK.COM> writes:
> On both beta 4 and 5, the configure script is run with --with-perl
> --with-tcl --with-CXX

> On a clean build (/usr/local/pgsql directory tree removed), Pg.c fails to
> build, not finding include file libpq-fe.h and then postgres_ext.h.  Linking
> these two files to /usr/local/pgsql/include causes the build to complete
> successfully.  Include paths on compile line: /usr/local/include
> /usr/local/pgsql/include
> /proj/twolf/local/lib/perl5/5.6.0/sun4-solaris/CORE.

Strange.  I cannot duplicate this.  On my box, the compile line for Pg.c
ends up looking like

cc -c -I../libpq -I../../include -D_HPUX_SOURCE -Aa -I/usr/local/include -O    -DVERSION=\"1.8.0\"
-DXS_VERSION=\"1.8.0\"+z -I/opt/perl5/lib/5.00503/PA-RISC2.0/CORE  Pg.c 

and of course ../libpq and ../../include are exactly where those two
include files live.

I have not tried the scenario of building outside the source tree,
however ... were you doing that?

            regards, tom lane

Re: 7.1Beta 4&5 - clean build problem with '--with-perl'

From
Tom Lane
Date:
"Creager, Robert S" <CreagRS@LOUISVILLE.STORTEK.COM> writes:
> Alrighty.  I should of just looked at the Makefile.PL in the first place...
> I have the environment variables POSTGRES_INCLUDE and POSTGRES_LIB defined,
> so Makefile.PL assumes those directories exist.  When it makes, no include
> files...  I've included the patch to have the Makefile.PL check for the
> directories existence.  I added a '-d' before the $ENV{POSTGRES_???} stuff
> to make sure the directory exists.

> *** Makefile.PL    Mon Mar  5 14:31:27 2001
> --- Makefile.PL.org    Mon Mar  5 14:25:12 2001
> ***************
> *** 12,18 ****
>
>   my %opts;
>
> ! if (! -d $ENV{POSTGRES_LIB} || ! -d $ENV{POSTGRES_INCLUDE}) {
>
>       # Check that we actually are inside the Postgres source tree
>       if (! -d "../libpq") {
> --- 12,18 ----
>
>   my %opts;
>
> ! if (! $ENV{POSTGRES_LIB} || ! $ENV{POSTGRES_INCLUDE}) {
>
>       # Check that we actually are inside the Postgres source tree
>       if (! -d "../libpq") {

Ah so.  That seems like a good solution.  Do you think we should also
modify the GNUmakefile to unset POSTGRES_INCLUDE and POSTGRES_LIB when
doing 'make all'?  Or would that get in the way of legitimate uses
of these variables?

            regards, tom lane