Re: [PATCH] Skip llvm bytecode generation if LLVM is missing - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [PATCH] Skip llvm bytecode generation if LLVM is missing
Date
Msg-id 20200312203459.eeool6cw6lli3aq3@alap3.anarazel.de
Whole thread Raw
In response to Re: [PATCH] Skip llvm bytecode generation if LLVM is missing  (Euler Taveira <euler.taveira@2ndquadrant.com>)
Responses Re: [PATCH] Skip llvm bytecode generation if LLVM is missing  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers
Hi,

On 2020-03-12 17:22:09 -0300, Euler Taveira wrote:
> On Thu, 12 Mar 2020 at 16:25, Andres Freund <andres@anarazel.de> wrote:
>
> > Hi,
> >
> > On 2020-03-12 14:08:31 +0800, Craig Ringer wrote:
> > >
> > > I thought about that at first, but that'll only benefit people who're
> > > hand-compiling things, and it's already possible with
> > >
> > >     make with_llvm=no ...
> >
> > Well, the difference is that you'd be told about it, instead of getting
> > a hard to parse error message.
> >
> What about adding a WARNING but don't error out if LLVM isn't found? Add
> an additional option (if LLVM isn't found) is annoying because it means
> adding instruction into README of all extensions.

IMO only if the packager screwed up. The dependencies of the package
that includes pgxs, headers should have the dependencies to llvm. Which
e.g. debian's does:

$ apt show postgresql-server-dev-12
Package: postgresql-server-dev-12
Version: 12.2-1+b1
Priority: optional
Section: libdevel
Source: postgresql-12 (12.2-1)
Maintainer: Debian PostgreSQL Maintainers <team+postgresql@tracker.debian.org>
Installed-Size: 5,327 kB
Depends: clang-9, libpq-dev (>= 12~~), llvm-9-dev, postgresql-client-12, postgresql-common (>= 142~)
Breaks: postgresql-server-dev-all (<< 181~)
Homepage: http://www.postgresql.org/
Download-Size: 919 kB


I haven't looked up the dependencies for the rpm packages including the
headers.


It can make sense to split the *binary* packages so that the llvm
dependency is not incurred by default, even when the server was compiled
with LLVM support. But I see very little point in doing so for -dev[el]
packages.


> What is the side effects of not providing .bc files?

Prevent JITing the functions in that extension?


> It seems some extensions won't benefit from LLVM.

Sure, and those can disable it?

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Euler Taveira
Date:
Subject: Re: [PATCH] Skip llvm bytecode generation if LLVM is missing
Next
From: Daniel Gustafsson
Date:
Subject: Re: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library