RE: [EXTERNAL] Re: BUG #18289: postgresql14-devel-14.10-2PGDG.rhel8.x86_64.rpm Contains invalid cLang option in Makefile.global

From: "Fensterman, John P" <John(dot)Fensterman(at)charter(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: RE: [EXTERNAL] Re: BUG #18289: postgresql14-devel-14.10-2PGDG.rhel8.x86_64.rpm Contains invalid cLang option in Makefile.global
Date: 2024-01-16 17:42:03
Message-ID: DS0PR15MB6359450C3EC585B4BF24A612FC732@DS0PR15MB6359.namprd15.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Good morning Thomas.

These are the versions of clang and llvm that are being installed with the rpm in question:
postgresql.org/pub/repos/yum/14/redhat/rhel-8-x86_64/postgresql14-devel-14.10-2PGDG.rhel8.x86_64.rpm

clang-13.0.0-3.module_el8.6.0+1074+380cef3f.x86_64
clang-devel-13.0.0-3.module_el8.6.0+1074+380cef3f.x86_64
clang-libs-13.0.0-3.module_el8.6.0+1074+380cef3f.x86_64
clang-resource-filesystem-13.0.0-3.module_el8.6.0+1074+380cef3f.x86_64
clang-tools-extra-13.0.0-3.module_el8.6.0+1074+380cef3f.x86_64

llvm-compat-libs-13.0.1-2.module_el8.7.0+1142+5343df54.x86_64
llvm-devel-17.0.2-2.module_el8+738+cd33199b.x86_64
llvm-googletest-17.0.2-2.module_el8+738+cd33199b.x86_64
llvm-libs-17.0.2-2.module_el8+738+cd33199b.x86_64
llvm-static-17.0.2-2.module_el8+738+cd33199b.x86_64
llvm-test-17.0.2-2.module_el8+738+cd33199b.x86_64

Here are the sandbox machines details, please let me know if I can provide any other information:

Linux 4.18.0-372.32.1.el8_6.x86_64 #1 SMP Fri Oct 7 12:35:10 EDT 2022 x86_64 x86_64 x86_64 GNU/Linux

Group: Development Tools
Description: A basic development environment.
Mandatory Packages:
autoconf
automake
binutils
bison
flex
gcc
gcc-c++
gdb
glibc-devel
libtool
make
pkgconf
pkgconf-m4
pkgconf-pkg-config
redhat-rpm-config
rpm-build
rpm-sign
strace
Default Packages:
asciidoc
byacc
ctags
diffstat
elfutils-libelf-devel
git
intltool
jna
ltrace
patchutils
perl-Fedora-VSP
perl-Sys-Syslog
perl-generators
pesign
source-highlight
systemtap
valgrind
valgrind-devel
Optional Packages:
cmake
expect
rpmdevtools
rpmlint

compiler-rt.x86_64 13.0.0-1.module_el8.6.0+1029+6594c364 @appstream

gcc.x86_64 8.5.0-21.el8 @baseos
gcc-c++.x86_64 8.5.0-21.el8 @appstream
gcc-gdb-plugin.x86_64 8.5.0-21.el8 @appstream
gcc-plugin-annobin.x86_64 8.5.0-21.el8 @baseos
gcc-toolset-13.x86_64 13.0-2.el8 @@commandline
gcc-toolset-13-annobin-docs.noarch 12.32-2.el8 @appstream
gcc-toolset-13-annobin-plugin-gcc.x86_64 12.32-2.el8 @appstream
gcc-toolset-13-binutils.x86_64 2.40-15.el8 @appstream
gcc-toolset-13-binutils-gold.x86_64 2.40-15.el8 @appstream
gcc-toolset-13-dwz.x86_64 0.14-0.el8 @appstream
gcc-toolset-13-gcc.x86_64 13.2.1-6.el8 @appstream
gcc-toolset-13-gcc-c++.x86_64 13.2.1-6.el8 @appstream
gcc-toolset-13-gcc-gfortran.x86_64 13.2.1-6.el8 @appstream
gcc-toolset-13-gdb.x86_64 12.1-4.el8 @appstream
gcc-toolset-13-libquadmath-devel.x86_64 13.2.1-6.el8 @appstream
gcc-toolset-13-libstdc++-devel.x86_64 13.2.1-6.el8 @appstream
gcc-toolset-13-runtime.x86_64 13.0-2.el8 @appstream
libgcc.x86_64 8.5.0-21.el8 @baseos

java-1.8.0-openjdk-headless.x86_64 1:1.8.0.362.b08-3.el8 @appstream
javapackages-filesystem.noarch 5.3.0-2.module_el8.0.0+30+832da3a1 @powertools
tzdata-java.noarch 2023c-1.el8 @appstream

Installed Packages
gcc.x86_64 8.5.0-21.el8 @baseos

Installed Packages
gcc.x86_64 8.5.0-21.el8 @baseos
gcc-c++.x86_64 8.5.0-21.el8 @appstream
gcc-gdb-plugin.x86_64 8.5.0-21.el8 @appstream
gcc-plugin-annobin.x86_64 8.5.0-21.el8 @baseos
gcc-toolset-13.x86_64 13.0-2.el8 @@commandline
gcc-toolset-13-annobin-docs.noarch 12.32-2.el8 @appstream
gcc-toolset-13-annobin-plugin-gcc.x86_64 12.32-2.el8 @appstream
gcc-toolset-13-binutils.x86_64 2.40-15.el8 @appstream
gcc-toolset-13-binutils-gold.x86_64 2.40-15.el8 @appstream
gcc-toolset-13-dwz.x86_64 0.14-0.el8 @appstream
gcc-toolset-13-gcc.x86_64 13.2.1-6.el8 @appstream
gcc-toolset-13-gcc-c++.x86_64 13.2.1-6.el8 @appstream
gcc-toolset-13-gcc-gfortran.x86_64 13.2.1-6.el8 @appstream
gcc-toolset-13-gdb.x86_64 12.1-4.el8 @appstream
gcc-toolset-13-libquadmath-devel.x86_64 13.2.1-6.el8 @appstream
gcc-toolset-13-libstdc++-devel.x86_64 13.2.1-6.el8 @appstream
gcc-toolset-13-runtime.x86_64 13.0-2.el8 @appstream

-----Original Message-----
From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Sent: Friday, January 12, 2024 10:34 PM
To: Fensterman, John P <John(dot)Fensterman(at)charter(dot)com>; pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: [EXTERNAL] Re: BUG #18289: postgresql14-devel-14.10-2PGDG.rhel8.x86_64.rpm Contains invalid cLang option in Makefile.global

CAUTION: The e-mail below is from an external source. Please exercise caution before opening attachments, clicking links, or following guidance.

On Sat, Jan 13, 2024 at 7:34 AM PG Bug reporting form <noreply(at)postgresql(dot)org> wrote:
> make
> /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv
> -fexcess-precision=standard -Xclang -no-opaque-pointers
> -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro
> -Wno-deprecated-non-prototype -O2 -I. -I./
> -I/usr/pgsql-14/include/server -I/usr/pgsql-14/include/internal
> -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -flto=thin
> -emit-llvm -c -o temporal_tables.bc temporal_tables.c
> error: unknown argument: '-no-opaque-pointers'

Which version of clang is that? And can you tell from any of the artefacts in that -devel package which version of clang was used when it was configured?

LLVM 13-15 had optional opaque pointers, and LLVM 16+ required them.
We only started using them when they were absolutely required, at the same time as we added support for LLVM 16. Since we weren't sure what might break if we changed the behaviour with already-released code, eg .bc files that might be part of an extension, we figured it would be best to keep using -no-opaque-pointers with older clangs that will accept it. There is a test in the configure script:

checking whether /usr/bin/clang supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS... (cached) no checking whether /usr/bin/clang -xc++ supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS... (cached) no

Now if the package maintainer used a different major version of clang than you're using to compile your extension, it may have some compiler flags that your compiler doesn't like. I guess that problem is more general than LLVM, though?
E-MAIL CONFIDENTIALITY NOTICE:
The contents of this e-mail message and any attachments are intended solely for the addressee(s) and may contain confidential and/or legally privileged information. If you are not the intended recipient of this message or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message and any attachments. If you are not the intended recipient, you are notified that any use, dissemination, distribution, copying, or storage of this message or any attachment is strictly prohibited.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2024-01-16 18:27:11 Re: Fwd: bug in polish translation
Previous Message Jeremy Schneider 2024-01-16 15:59:36 Re: BUG #18289: postgresql14-devel-14.10-2PGDG.rhel8.x86_64.rpm Contains invalid cLang option in Makefile.global