Re: BUG #14380: pg_config fails to build.

From: Nels Frazier <hellkite500(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14380: pg_config fails to build.
Date: 2016-10-19 17:24:35
Message-ID: CAKVtp69tNccODVDQSFds7EaOzW_cFJB7ieWwzhD1=2bnTDYe3w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

So I checked out ~/.ccache, and there was no such file/directory in my home
folder.

I tried configuring/building from both bash and tcsh, neither worked. This
is really strange, since I was able to build successfully on a RHEL 6.7
machine using:
GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)
GNU Make 3.8.1
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)

But on the RHEL 6.4 machine using:

GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)
GNU Make 3.81
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)

the build fails. I even tried using a different compiler version (gcc
(GCC) 4.7.1) to no avail.

I did finally get a working build of pg_config with no errors or warning by
removing the single quotes in the path variables. I don't know if this is
correct or not, since I'm not familiar with the mechanics used by
make/pg_config. But changing
-DVAL_CONFIGURE="\"'--prefix=/glade/p/work/nfrazie1/CI-WATER-tools/'\""
to
-DVAL_CONFIGURE="\"--prefix=/glade/p/work/nfrazie1/CI-WATER-tools/\""

and -DVAL_LDFLAGS="\"-Wl,--as-needed
-Wl,-rpath,'/glade/p/work/nfrazie1/CI-WATER-tools/lib',--enable-new-dtags\""
to
-DVAL_LDFLAGS="\"-Wl,--as-needed
-Wl,-rpath,/glade/p/work/nfrazie1/CI-WATER-tools/lib,--enable-new-dtags\""

I was able to build pg_config. I hacked the Makefile to strip the quotes
out (see attached patch if interested.)

An interesting note: I checked to compile line for the build on the 6.7
machine, and it has the single quotes in the compile line.

Should it be ok to proceed using the patch to get a build completed?

Nels

On Tue, Oct 18, 2016 at 9:56 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> hellkite500(at)gmail(dot)com writes:
> > I am attempting a build on a RHEL 6.4 machine using gcc 4.4.7.
> > I get the following error during the build.
>
> [ scratches head... ] Weird. Evidently something is going wrong with
> the quoting of those make variables; but the gcc command line looks
> exactly as it should, AFAICT. Are you using a nonstandard shell, or
> something other than the stock gcc installation?
>
> A slightly far-fetched possibility is that you have a corrupted ccache
> entry for this file. In a standard RHEL6 installation, "gcc" really
> invokes "ccache gcc", so the lack of any mention of ccache in the given
> command line doesn't eliminate this theory. If you can't find any other
> explanation, you might try "rm -rf ~/.ccache" and see if that makes it
> better.
>
> (FWIW, PG9.2 builds fine on RHEL6.8 for me, and I'm sure it built fine
> on 6.4, back when I was running that.)
>
> regards, tom lane
>

Attachment Content-Type Size
postgresql-9.2.17.patch text/x-patch 1.1 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2016-10-19 18:02:45 Re: BUG #14380: pg_config fails to build.
Previous Message Bruce Momjian 2016-10-19 15:12:48 Re: BUG #14373: PostgreSQL Service is seems to be "Stopped" after Jan 19, 2038.