Re: BUG #14380: pg_config fails to build.

Поиск
Список
Период
Сортировка
От Nels Frazier
Тема Re: BUG #14380: pg_config fails to build.
Дата
Msg-id CAKVtp69tNccODVDQSFds7EaOzW_cFJB7ieWwzhD1=2bnTDYe3w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #14380: pg_config fails to build.  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #14380: pg_config fails to build.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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@sss.pgh.pa.us> wrote:
hellkite500@gmail.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

Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #14373: PostgreSQL Service is seems to be "Stopped" after Jan 19, 2038.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #14380: pg_config fails to build.