pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
missing requirement on ccache in postgresql16-devel
7+ messages / 4 participants
[nested] [flat]

* missing requirement on ccache in postgresql16-devel
@ 2023-10-25 15:25  Greg Hennessy <greg.hennessy@gmail.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Greg Hennessy @ 2023-10-25 15:25 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org

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.

Sincerely,
Greg Hennessy

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: missing requirement on ccache in postgresql16-devel
@ 2023-10-25 16:47  Bruce Momjian <bruce@momjian.us>
  parent: Greg Hennessy <greg.hennessy@gmail.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Bruce Momjian @ 2023-10-25 16:47 UTC (permalink / raw)
  To: Greg Hennessy <greg.hennessy@gmail.com>; +Cc: pgsql-bugs@lists.postgresql.org

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.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Only you can decide what is important to you.





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: missing requirement on ccache in postgresql16-devel
@ 2023-10-25 17:21  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Bruce Momjian <bruce@momjian.us>
  0 siblings, 2 replies; 7+ messages in thread

From: Tom Lane @ 2023-10-25 17:21 UTC (permalink / raw)
  To: Bruce Momjian <bruce@momjian.us>; +Cc: Greg Hennessy <greg.hennessy@gmail.com>; pgsql-bugs@lists.postgresql.org, Devrim Gündüz <devrim@gunduz.org>

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





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: missing requirement on ccache in postgresql16-devel
@ 2023-10-25 18:36  Bruce Momjian <bruce@momjian.us>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 7+ messages in thread

From: Bruce Momjian @ 2023-10-25 18:36 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Greg Hennessy <greg.hennessy@gmail.com>; pgsql-bugs@lists.postgresql.org, Devrim Gündüz <devrim@gunduz.org>

On Wed, Oct 25, 2023 at 01:21:44PM -0400, Tom Lane wrote:
> 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.

Well, the question is where can we see this file,
/usr/pgsql-16/lib/pgxs/src/Makefile.global?  Who created it?  What does
it contain?

Mine is built from Makefile.global.in, and has:

	CC = ccache gcc

but I define CC='ccache gcc' before I run autoconf.

> 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

Oh, I have not done that.  I like to know when ccache is being used.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Only you can decide what is important to you.





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: missing requirement on ccache in postgresql16-devel
@ 2023-10-26 21:42  Devrim Gündüz <devrim@gunduz.org>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 2 replies; 7+ messages in thread

From: Devrim Gündüz @ 2023-10-26 21:42 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; Bruce Momjian <bruce@momjian.us>; +Cc: Greg Hennessy <greg.hennessy@gmail.com>; pgsql-bugs@lists.postgresql.org


Hi,

On Wed, 2023-10-25 at 13:21 -0400, Tom Lane wrote:
> 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. 

Makefile.global has this reference to ccache on RHEL 9 and Fedora:

CLANG = /usr/lib64/ccache/clang

which is caused by:

%if 0%{?rhel} && 0%{?rhel} == 8
        export CLANG=%{_bindir}/clang LLVM_CONFIG=%{_bindir}/llvm-config-64
%endif

(so this issue does not exist on RHEL 8).

Pushed a fix to PostgreSQL 17. I'll check the results tomorrow, and then
will patch PostgreSQL 11+.

Greg: Thanks for the report. The changes will appear in next month's
minor release set (Nov 9). I'm not inclined to push an update set just
for this issue.

Regards,
-- 
Devrim Gündüz
Open Source Solution Architect, PostgreSQL Major Contributor
Twitter: @DevrimGunduz , @DevrimGunduzTR





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: missing requirement on ccache in postgresql16-devel
@ 2023-10-26 22:02  Bruce Momjian <bruce@momjian.us>
  parent: Devrim Gündüz <devrim@gunduz.org>
  1 sibling, 0 replies; 7+ messages in thread

From: Bruce Momjian @ 2023-10-26 22:02 UTC (permalink / raw)
  To: Devrim Gündüz <devrim@gunduz.org>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Greg Hennessy <greg.hennessy@gmail.com>; pgsql-bugs@lists.postgresql.org

On Thu, Oct 26, 2023 at 10:42:10PM +0100, Devrim Gunduz wrote:
> 
> Hi,
> 
> On Wed, 2023-10-25 at 13:21 -0400, Tom Lane wrote:
> > 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. 
> 
> Makefile.global has this reference to ccache on RHEL 9 and Fedora:
> 
> CLANG = /usr/lib64/ccache/clang
> 
> which is caused by:
> 
> %if 0%{?rhel} && 0%{?rhel} == 8
>         export CLANG=%{_bindir}/clang LLVM_CONFIG=%{_bindir}/llvm-config-64
> %endif
> 
> (so this issue does not exist on RHEL 8).
> 
> Pushed a fix to PostgreSQL 17. I'll check the results tomorrow, and then
> will patch PostgreSQL 11+.
> 
> Greg: Thanks for the report. The changes will appear in next month's
> minor release set (Nov 9). I'm not inclined to push an update set just
> for this issue.

Great, thanks.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Only you can decide what is important to you.





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: missing requirement on ccache in postgresql16-devel
@ 2023-10-27 15:28  Greg Hennessy <greg.hennessy@gmail.com>
  parent: Devrim Gündüz <devrim@gunduz.org>
  1 sibling, 0 replies; 7+ messages in thread

From: Greg Hennessy @ 2023-10-27 15:28 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org

Thank you very much. I agree that waiting till the next minor release is
fine.

Greg


On Thu, Oct 26, 2023 at 5:42 PM Devrim Gündüz <devrim@gunduz.org> wrote:

>
> Hi,
>
> On Wed, 2023-10-25 at 13:21 -0400, Tom Lane wrote:
> > 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.
>
> Makefile.global has this reference to ccache on RHEL 9 and Fedora:
>
> CLANG = /usr/lib64/ccache/clang
>
> which is caused by:
>
> %if 0%{?rhel} && 0%{?rhel} == 8
>         export CLANG=%{_bindir}/clang LLVM_CONFIG=%{_bindir}/llvm-config-64
> %endif
>
> (so this issue does not exist on RHEL 8).
>
> Pushed a fix to PostgreSQL 17. I'll check the results tomorrow, and then
> will patch PostgreSQL 11+.
>
> Greg: Thanks for the report. The changes will appear in next month's
> minor release set (Nov 9). I'm not inclined to push an update set just
> for this issue.
>
> Regards,
> --
> Devrim Gündüz
> Open Source Solution Architect, PostgreSQL Major Contributor
> Twitter: @DevrimGunduz , @DevrimGunduzTR
>

^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2023-10-27 15:28 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-10-25 15:25 missing requirement on ccache in postgresql16-devel Greg Hennessy <greg.hennessy@gmail.com>
2023-10-25 16:47 ` Bruce Momjian <bruce@momjian.us>
2023-10-25 17:21   ` Tom Lane <tgl@sss.pgh.pa.us>
2023-10-25 18:36     ` Bruce Momjian <bruce@momjian.us>
2023-10-26 21:42     ` Devrim Gündüz <devrim@gunduz.org>
2023-10-26 22:02       ` Bruce Momjian <bruce@momjian.us>
2023-10-27 15:28       ` Greg Hennessy <greg.hennessy@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox