Re: missing requirement on ccache in postgresql16-devel

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Greg Hennessy <greg(dot)hennessy(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org, Devrim Gündüz <devrim(at)gunduz(dot)org>
Subject: Re: missing requirement on ccache in postgresql16-devel
Date: 2023-10-25 17:21:44
Message-ID: 1000999.1698254504@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> On Wed, Oct 25, 2023 at 11:25:15AM -0400, Greg Hennessy wrote:
>> The file /usr/pgsql-16/lib/pgxs/src/Makefile.global has a reference
>> to ccache but the rpm doesn't list this as a dependency. I would like
>> to submit that it is a bug that it does not.

> Uh, ccache is an _optional_ way to speed up compilation. It is not a
> requirement/dependency.

Yeah, but if the Makefile says "CC = ccache gcc" then anybody
trying to build under PGXS will fail if they don't have ccache
installed. So I think Greg has a point.

On typical Red Hat setups, it's not necessary to mention ccache
explicitly to use it; instead that's managed via PATH. For
example, I have

$ which gcc
/usr/lib64/ccache/gcc

$ ls -l /usr/lib64/ccache/gcc
lrwxrwxrwx. 1 root root 16 May 21 09:35 /usr/lib64/ccache/gcc -> ../../bin/ccache

so it Just Works. I'd suggest arranging the rpm builds to be
done similarly, and then you get ccache usage in the rpm build,
while the distributed Makefile will just say "CC = gcc" so
it will work for users whether they use ccache or not.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2023-10-25 18:36:50 Re: missing requirement on ccache in postgresql16-devel
Previous Message Bruce Momjian 2023-10-25 16:47:56 Re: missing requirement on ccache in postgresql16-devel