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WtlWzFdOiBMZWF2aW5nIGRpcmVj dG9yeQpgL2dsYWRlL3Avd29yay9uZnJhemllMS9DSS1XQVRFUi10b29scy9z b3VyY2VzL3Bvc3RncmVzcWwtOS4yLjE4L3NyYycNCm1ha2U6ICoqKiBbYWxs LXNyYy1yZWN1cnNlXSBFcnJvciAyDQoKCg==
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
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:
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)
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
Вложения
Nels Frazier <hellkite500@gmail.com> writes: > So I checked out ~/.ccache, and there was no such file/directory in my home > folder. Hm, ccache RPM not installed then? > 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. Don't know what to tell you. RHEL 6.4 was current during 2013, which is the same year that 9.2 was our current release, and we would certainly have noticed if there was any widespread (or even not so widespread) build failure on that combination. Also, the code in question hasn't changed in quite some time, so the issue would affect other PG branches besides 9.2, making it even less likely that we'd have missed a problem. I have to think that one or another component of your toolchain is nonstandard or corrupted, but it's hard to say more than that. > Should it be ok to proceed using the patch to get a build completed? Well, Postgres isn't going to care. Applications that make use of the output of pg_config might be unhappy with the lack of quotes, although most likely it wouldn't matter as long as there's not spaces or quotes in your path names. regards, tom lane