From: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
---|---|
To: | Devrim Gündüz <devrim(at)gunduz(dot)org> |
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-06 04:55:11 |
Message-ID: | CAMsr+YFP09-XqyxRDRtzei5Xk0SSTHr=SXcJ8e9FjMvzuq=Rrw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-pkg-yum |
On Fri, 6 Mar 2020 at 12:52, Craig Ringer <craig(at)2ndquadrant(dot)com> 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
Repro/demo attached.
Usage:
$ mkdir centos7-llvm-report
$ cd centos7-llvm-report
$ # copy the attached files into .
$ docker build -t centos7-llvm-report .
$ docker run -it --name centos7-llvm-report centos7-llvm-report
Result:
[craig(at)linux pgdgrepor]$ docker run --name foo -it --rm foo
This build will fail when trying to compile llvm bitcode
gcc -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute -Wformat-security -fno-strict-aliasing
-fwrapv -fexcess-precision=standard -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic
-fPIC -I. -I./ -I/usr/pgsql-11/include/server
-I/usr/pgsql-11/include/internal -D_GNU_SOURCE -I/usr/include/libxml2
-I/usr/include -c -o dummy.o dummy.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute -Wformat-security -fno-strict-aliasing
-fwrapv -fexcess-precision=standard -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic
-fPIC -L/usr/pgsql-11/lib -Wl,--as-needed -L/usr/lib64/llvm5.0/lib
-L/usr/lib64 -Wl,--as-needed
-Wl,-rpath,'/usr/pgsql-11/lib',--enable-new-dtags -shared -o dummy.so
dummy.o
/opt/rh/llvm-toolset-7/root/usr/bin/clang -Wno-ignored-attributes
-fno-strict-aliasing -fwrapv -O2 -I. -I./
-I/usr/pgsql-11/include/server -I/usr/pgsql-11/include/internal
-D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -flto=thin
-emit-llvm -c -o dummy.bc dummy.c
make: /opt/rh/llvm-toolset-7/root/usr/bin/clang: Command not found
make: *** [dummy.bc] Error 127
This build will succeed
gcc -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute -Wformat-security -fno-strict-aliasing
-fwrapv -fexcess-precision=standard -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic
-fPIC -I. -I./ -I/usr/pgsql-11/include/server
-I/usr/pgsql-11/include/internal -D_GNU_SOURCE -I/usr/include/libxml2
-I/usr/include -c -o dummy.o dummy.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute -Wformat-security -fno-strict-aliasing
-fwrapv -fexcess-precision=standard -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic
-fPIC -L/usr/pgsql-11/lib -Wl,--as-needed -L/usr/lib64/llvm5.0/lib
-L/usr/lib64 -Wl,--as-needed
-Wl,-rpath,'/usr/pgsql-11/lib',--enable-new-dtags -shared -o dummy.so
dummy.o
/usr/bin/mkdir -p '/usr/pgsql-11/lib'
/usr/bin/install -c -m 755 dummy.so '/usr/pgsql-11/lib/'
Attachment | Content-Type | Size |
---|---|---|
Makefile | application/octet-stream | 92 bytes |
build.sh | application/x-shellscript | 262 bytes |
Dockerfile | application/octet-stream | 335 bytes |
dummy.c | text/x-csrc | 136 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Jehan-Guillaume de Rorthais | 2020-03-10 10:55:51 | PostgreSQL Automatic Failover v2.3.0 released |
Previous Message | Craig Ringer | 2020-03-06 04:52:54 | Re: clang prefix for centos7 |