Re: missing requirement on ccache in postgresql16-devel - Mailing list pgsql-bugs

From Tom Lane
Subject Re: missing requirement on ccache in postgresql16-devel
Date
Msg-id 1000999.1698254504@sss.pgh.pa.us
Whole thread Raw
In response to Re: missing requirement on ccache in postgresql16-devel  (Bruce Momjian <bruce@momjian.us>)
Responses Re: missing requirement on ccache in postgresql16-devel  (Bruce Momjian <bruce@momjian.us>)
Re: missing requirement on ccache in postgresql16-devel  (Devrim Gündüz <devrim@gunduz.org>)
List pgsql-bugs
Bruce Momjian <bruce@momjian.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



pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: missing requirement on ccache in postgresql16-devel
Next
From: Bruce Momjian
Date:
Subject: Re: missing requirement on ccache in postgresql16-devel