BUG #18289: postgresql14-devel-14.10-2PGDG.rhel8.x86_64.rpm Contains invalid cLang option in Makefile.global - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #18289: postgresql14-devel-14.10-2PGDG.rhel8.x86_64.rpm Contains invalid cLang option in Makefile.global
Date
Msg-id 18289-cc1b88346b51af93@postgresql.org
Whole thread Raw
Responses Re: BUG #18289: postgresql14-devel-14.10-2PGDG.rhel8.x86_64.rpm Contains invalid cLang option in Makefile.global  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      18289
Logged by:          John Fensterman
Email address:      john.fensterman@charter.com
PostgreSQL version: 14.10
Operating system:   Linux RHEL 8.6
Description:

The postgresql14-devel-14.10-2PGDG.rhel8.x86_64.rpm contains a deprecated
clang option for opaque pointers.

After installing the above package and attempting to install the temporal
tables extension, which uses pgxs and the Makefile.global, the extension
install will fail.

As a test, I removed these specific entries and the extension will install
without issue.
Modifying clang flags with regards to opaque pointers appears to have been
deprecated in 2023.
Transition State
As of July 2023:

Typed pointers are not supported on the main branch.

The following typed pointer functionality has been removed:

The CLANG_ENABLE_OPAQUE_POINTERS cmake flag is no longer supported.

The -no-opaque-pointers cc1 clang flag is no longer supported.

The -opaque-pointers opt flag is no longer supported.

The -plugin-opt=no-opaque-pointers LTO flag is no longer supported.

C APIs that do not support opaque pointers (like LLVMBuildLoad) are no
longer supported.

The following typed pointer functionality is still to be removed:

Various APIs that are no longer relevant with opaque pointers.

Makefile.global entries impacted:
BITCODE_CFLAGS =  -fno-strict-aliasing -fwrapv -fexcess-precision=standard
-Xclang -no-opaque-pointers
BITCODE_CXXFLAGS =  -fno-strict-aliasing -fwrapv -fexcess-precision=standard
-Xclang -no-opaque-pointers -O2

Sample error when performing Make:
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'
make: ***
[/usr/pgsql-14/lib/pgxs/src/makefiles/../../src/Makefile.global:1084:
temporal_tables.bc] Error 1


pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #17798: Incorrect memory access occurs when using BEFORE ROW UPDATE trigger
Next
From: Robert Haas
Date:
Subject: Re: BUG #17798: Incorrect memory access occurs when using BEFORE ROW UPDATE trigger