Skip to content

2.31.0.0-b172

@jaki jaki tagged this 16 Jun 23:57
Summary:
External PGXS extension builds against a YB installation aborted at
Makefile.global's unconditional $(error YB_SRC_ROOT is not set), forcing
external extension authors onto hand-rolled build systems even though
the YB headers installed by commit
38489ebccf39dad70a8f8d66822f2d551d275721 are sufficient.

Remove the YB_SRC_ROOT requirement and the -I$(YB_SRC_ROOT)/src source-tree
include from Makefile.global.  This leaves Makefile.global's CPPFLAGS
region identical to upstream PG and lets external PGXS builds proceed
without YB_SRC_ROOT.

Close #32127 as this is part 2 of 2.

Test Plan:
- yb_build.sh fastdebug --gcc15 --clean-postgres: full build passes,
  including the postgres core build (which resolves yb headers through
  CPPFLAGS) and documentdb's pgrx/bindgen component (kept building by
  the commit 38489ebccf39dad70a8f8d66822f2d551d275721 include guards).
- Generated Makefile.global: CFLAGS and CXXFLAGS carry no YB -I;
  CPPFLAGS carries the include dirs; the CPPFLAGS region matches
  upstream.
- External-author simulation: an extension using pg_yb_utils.h and
  yb/yql/pggate/ybc_pggate.h builds via PGXS with only PG_CONFIG and CC
  set and YB_SRC_ROOT/YB_BUILD_ROOT unset.
- Bare -I$BUILD_ROOT/postgres/include/server compile still works.

Close: #32127
Depends on D54415
Jenkins: compile only

Reviewers: esheng

Reviewed By: esheng

Subscribers: yql

Differential Revision: https://phorge.dev.yugabyte.com/D54417
Assets 2
Loading