Re: To JIT (or not!) in Ubuntu packages

From: Ben Chobot <bench(at)silentmedia(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>, Christoph Berg <myon(at)debian(dot)org>
Subject: Re: To JIT (or not!) in Ubuntu packages
Date: 2021-09-15 03:30:53
Message-ID: a7ad41ef-ac9a-c3e5-da30-9a4528efaede@silentmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thomas Munro wrote on 9/14/21 5:50 PM:
> On Tue, Sep 14, 2021 at 10:11 AM Ben Chobot <bench(at)silentmedia(dot)com> wrote:
>> We've noticed that the Ubuntu postgresql-12 package has --with-llvm
>> enabled on x86_64, but not on aarch64. Does anybody know if this was
>> intentional, or just an oversight?
>>
>> For what it's worth, it seems the beta postgresql-14 package for Ubuntu
>> still doesn't have --with-llvm.
>>
>> I'm not sure if this explains why our aarch64 DBs are missing a
>> jit_provider GUC variable, but I expect it does explain why
>> pg_jit_available() tells me no.
> Hmm. No Ubuntu here and I don't know the answer (CC Christoph). Can
> you show exactly where the package is coming from, what pg_config
> outputs. For what it's worth, it does look like it's enabled in the
> Ubuntu aarch64 packages from apt.postgresql.org, according to a quick
> look using caveman techniques:
>
> $ curl -sO http://apt.postgresql.org/pub/repos/apt/pool/14/p/postgresql-14/postgresql-14_14~beta3-1.pgdg+1_arm64.deb
> $ ar x postgresql-14_14~beta3-1.pgdg+1_arm64.deb
> $ tar xf data.tar.xz
> $ strings usr/lib/postgresql/14/bin/postgres | grep 'with-llvm'
> '--build=aarch64-linux-gnu' '--prefix=/usr'
> '--includedir=${prefix}/include' '--mandir=${prefix}/share/man'
> '--infodir=${prefix}/share/info' '--sysconfdir=/etc'
> '--localstatedir=/var' '--disable-option-checking'
> '--disable-silent-rules' '--libdir=${prefix}/lib/aarch64-linux-gnu'
> '--runstatedir=/run' '--disable-maintainer-mode'
> '--disable-dependency-tracking' '--with-icu' '--with-tcl'
> '--with-perl' '--with-python' '--with-pam' '--with-openssl'
> '--with-libxml' '--with-libxslt' 'PYTHON=/usr/bin/python3'
> '--mandir=/usr/share/postgresql/14/man'
> '--docdir=/usr/share/doc/postgresql-doc-14'
> '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share/'
> '--datadir=/usr/share/postgresql/14'
> '--bindir=/usr/lib/postgresql/14/bin'
> '--libdir=/usr/lib/aarch64-linux-gnu/'
> '--libexecdir=/usr/lib/postgresql/'
> '--includedir=/usr/include/postgresql/' '--with-extra-version= (Debian
> 14~beta3-1.pgdg+1)' '--enable-nls' '--enable-thread-safety'
> '--enable-tap-tests' '--enable-debug' '--enable-dtrace'
> '--enable-cassert' '--disable-rpath' '--with-uuid=e2fs'
> '--with-gnu-ld' '--with-lz4' '--with-pgport=5432'
> '--with-system-tzdata=/usr/share/zoneinfo' '--with-llvm'
> 'LLVM_CONFIG=/usr/bin/llvm-config-11' 'CLANG=/usr/bin/clang-11'
> '--with-systemd' '--with-selinux' 'MKDIR_P=/bin/mkdir -p'
> 'PROVE=/usr/bin/prove' 'TAR=/bin/tar' 'XSLTPROC=xsltproc --nonet'
> 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat
> -Werror=format-security' 'LDFLAGS=-Wl,-z,relro -Wl,-z,now'
> '--with-gssapi' '--with-ldap' 'build_alias=aarch64-linux-gnu'
> 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2
> -fstack-protector-strong -Wformat -Werror=format-security'
> $ find . -name '*jit*.so'
> ./usr/lib/postgresql/14/lib/llvmjit.so
Ohh, interesting, I don't have that .so file.

So I've installed
http://apt.postgresql.org/pub/repos/apt/pool/14/p/postgresql-14/postgresql-14_14~beta3-1.pgdg18.04+1_arm64.deb,
after which I see:

$ /usr/lib/postgresql/14/bin/pg_config
BINDIR = /usr/lib/postgresql/14/bin
DOCDIR = /usr/share/doc/postgresql-doc-14
HTMLDIR = /usr/share/doc/postgresql-doc-14
INCLUDEDIR = /usr/include/postgresql
PKGINCLUDEDIR = /usr/include/postgresql
INCLUDEDIR-SERVER = /usr/include/postgresql/14/server
LIBDIR = /usr/lib/aarch64-linux-gnu
PKGLIBDIR = /usr/lib/postgresql/14/lib
LOCALEDIR = /usr/share/locale
MANDIR = /usr/share/postgresql/14/man
SHAREDIR = /usr/share/postgresql/14
SYSCONFDIR = /etc/postgresql-common
PGXS = /usr/lib/postgresql/14/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE =  '--build=aarch64-linux-gnu' '--prefix=/usr'
'--includedir=${prefix}/include' '--mandir=${prefix}/share/man'
'--infodir=${prefix}/share/info' '--sysconfdir=/etc'
'--localstatedir=/var' '--disable-silent-rules'
'--libdir=${prefix}/lib/aarch64-linux-gnu'
'--libexecdir=${prefix}/lib/aarch64-linux-gnu' '--runstatedir=/run'
'--disable-maintainer-mode' '--disable-dependency-tracking' '--with-icu'
'--with-tcl' '--with-perl' '--with-python' '--with-pam' '--with-openssl'
'--with-libxml' '--with-libxslt' 'PYTHON=/usr/bin/python3'
'--mandir=/usr/share/postgresql/14/man'
'--docdir=/usr/share/doc/postgresql-doc-14'
'--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share/'
'--datadir=/usr/share/postgresql/14'
'--bindir=/usr/lib/postgresql/14/bin'
'--libdir=/usr/lib/aarch64-linux-gnu/'
'--libexecdir=/usr/lib/postgresql/'
'--includedir=/usr/include/postgresql/' '--with-extra-version= (Ubuntu
14~beta2-1.pgdg18.04+1)' '--enable-nls' '--enable-thread-safety'
'--enable-tap-tests' '--enable-debug' '--enable-dtrace'
'--disable-rpath' '--with-uuid=e2fs' '--with-gnu-ld' '--with-lz4'
'--with-pgport=5432' '--with-system-tzdata=/usr/share/zoneinfo'
'--with-systemd' '--with-selinux' 'MKDIR_P=/bin/mkdir -p'
'PROVE=/usr/bin/prove' 'TAR=/bin/tar' 'XSLTPROC=xsltproc --nonet'
'CFLAGS=-g -O2 -fstack-protector-strong -Wformat
-Werror=format-security' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro
-Wl,-z,now' '--with-gssapi' '--with-ldap'
'build_alias=aarch64-linux-gnu' 'CPPFLAGS=-Wdate-time
-D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat
-Werror=format-security'
CC = gcc
CPPFLAGS = -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE
-I/usr/include/libxml2
CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Werror=vla -Wendif-labels
-Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wformat-security
-fno-strict-aliasing -fwrapv -fexcess-precision=standard
-Wno-format-truncation -g -g -O2 -fstack-protector-strong -Wformat
-Werror=format-security
CFLAGS_SL = -fPIC
LDFLAGS = -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed
LDFLAGS_EX =
LDFLAGS_SL =
LIBS = -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl
-lcrypto -lgssapi_krb5 -lz -lreadline -lpthread -lrt -ldl -lm
VERSION = PostgreSQL 14beta2 (Ubuntu 14~beta2-1.pgdg18.04+1)

It's very similar output for PG12 from the same source.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Munro 2021-09-15 04:05:30 Re: To JIT (or not!) in Ubuntu packages
Previous Message Gambhir Singh 2021-09-15 03:25:55 Re: Roles