Re: clang prefix for centos7

From: Devrim Gündüz <devrim(at)gunduz(dot)org>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: Justin Pryzby <pryzby(at)telsasoft(dot)com>, pgsql-pkg-yum <pgsql-pkg-yum(at)postgresql(dot)org>
Subject: Re: clang prefix for centos7
Date: 2020-03-11 01:33:49
Message-ID: 0c0a0b18c3b01e3ad986b322c0c93642b7dca457.camel@gunduz.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-pkg-yum


Hi Craig,

Thanks for reporting this (again). Next time, please try report using redmine.
That makes my life easier.

For this case, I'm tracking it. Will commit changes tomorrow or so.

Do you think this requires an update before next minor releases?

Regards, Devrim

On Fri, 2020-03-06 at 12:52 +0800, Craig Ringer wrote:
> > The OS-default clang version is not sufficient enough to build PostgreSQL.
>
> This is a packaging bug in the PGDG yum CentOS 7 packages. I reported
> it earlier; see
> https://www.postgresql.org/message-id/CAMsr+YGzuPv3qSBp3LCrc9SnYi=iHfijdjERNNufh75+YM-92g@mail.gmail.com
> .
>
> The centos7 postgresql11-devel package is broken. I'll reply with a
> followup mail with details so I don't upset the automailmod
> but in short installing the devel package gets you an unusable build
> env due to missing dependencies.
>
> It's seemingly broken for all Pg versions really due to not declaring
> a dependency on clang. It's just worse for centos 7 because you can't
> simply install the required clang. I originally tested adding explicit
> dependences on SCL's llvm toolset and clang, but that proved painful
> for other reasons. Especially since the steps to enable the SCL llvm
> toolset repo differ for CentOS 7 vs RHEL 7.
>
> So instead I propose that:
>
> * For CentOS 7, patch pgxs.mk to detect a missing clang and not add
> the bytecode dependency rules;
> * For OSes > CentOS 7 where we don't need to use SCL to get a suitable
> llvm, add a Requires: for the appropriate clang to the devel package,
> matching the BuildRequires specified by the source package.
>
> A patch for pgxs.mk is attached. I suggest adding it as a rpmbuild
> patch when building for centos 7.
>
> IMO the whole mess really a PGXS / build system issue where we bake
> the tool and compiler paths into our Makefile.global and pgxs.mk. But
> that's not simple to fix, since we have no guarantee that other tools
> found elsewhere will be compatible and produce correct code. I've seen
> a similar problem appear when the VM/container that built the postgres
> packages themselves used ccache, but ccache was not present on the
> machine that then installed the -devel package. At least that's easy
> to work around and defend against though.
>
> --
> Craig Ringer http://www.2ndQuadrant.com/
> 2ndQuadrant - PostgreSQL Solutions for the Enterprise

--
Devrim Gündüz
Open Source Solution Architect, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR

In response to

Responses

Browse pgsql-pkg-yum by date

  From Date Subject
Next Message Craig Ringer 2020-03-11 02:03:05 Re: clang prefix for centos7
Previous Message Devrim Gündüz 2020-03-11 01:31:18 Re: PgAdmin4 installation fails for RHEL 7.7