Skip to content

Build pgPointCloud libpc.a without autotools to enable POINTCLOUD#154

Open
estebanzimanyi wants to merge 1 commit into
feat/trgeometry-port-corefrom
feat/pointcloud-vcpkg-enabler
Open

Build pgPointCloud libpc.a without autotools to enable POINTCLOUD#154
estebanzimanyi wants to merge 1 commit into
feat/trgeometry-port-corefrom
feat/pointcloud-vcpkg-enabler

Conversation

@estebanzimanyi
Copy link
Copy Markdown
Member

The MEOS -DPOINTCLOUD=ON build FATAL_ERRORs unless pointcloud-pg/lib/libpc.a exists, which pgPointCloud normally produces as a side effect of ./autogen.sh && ./configure && make. That autotools path cannot run in the manylinux extension-ci container, which has no autotools-usable PostgreSQL and no pg_config. The vendored pointcloud-pg/lib/ archive sources include only libxml2 and zlib (no PostgreSQL headers), and pointcloud-pg/lib/Makefile builds the libpc.a target directly via ar rs using only the XML2/ZLIB CPPFLAGS from config.mk; the CUnit dependency is confined to the all: cunit/ recurse. The portfile now generates config.mk and lib/pc_config.h the way pgPointCloud's autotools would, filling only the @vars@ that config.mk.in declares and the lib archive sources consume with vcpkg's libxml2 and zlib paths, builds the libpc.a target directly, asserts the archive exists at the path meos/src/pointcloud/CMakeLists.txt checks, and adds -DPOINTCLOUD=ON. libxml2 is declared as a dependency of the meos port and the top-level manifest; the meos port-version is bumped.

@estebanzimanyi estebanzimanyi force-pushed the feat/pointcloud-vcpkg-enabler branch 3 times, most recently from 9331934 to 024e8da Compare May 17, 2026 17:37
@estebanzimanyi
Copy link
Copy Markdown
Member Author

Reviewer's quickstart — ~2-3 minutes

What this PR does: Build pgPointCloud libpc.a without autotools to enable POINTCLOUD.

Risk: focused, single-purpose. Spot-check the source diff + matching tests; CI confirms.

Cross-link: Linux arm64 CI here needs #161 for the orthogonal MeosType build error.

estebanzimanyi added a commit to estebanzimanyi/MobilityDuck that referenced this pull request May 26, 2026
…bilityDB#154)

Enable -DPOINTCLOUD=ON in the MEOS vcpkg port so the temporal point
cloud types (tpcpoint/tpcpatch) can be built from the pinned MEOS.

The MEOS pointcloud module links the pgPointCloud archive libpc.a,
normally produced by pgPointCloud's autotools (./autogen.sh && configure
&& make), which cannot run here (no pg_config, no autotools-usable
PostgreSQL). The vendored pointcloud-pg/lib sources need only libxml2 and
zlib, and lib/Makefile builds libpc.a directly via ar. So the port now:

  - patches the upstream MEOS pcpoint.h/pcpatch.h DatumGetXxxP macros,
    which unconditionally use PG_DETOAST_DATUM (PostgreSQL-only) unlike
    every other type header, to DatumGetPointer under MEOS;
  - generates config.mk + lib/pc_config.h the way pgPointCloud's autotools
    would, with vcpkg's libxml2/zlib paths (CUnit/LazPerf disabled);
  - builds the libpc.a archive target directly;
  - renames libpc.a's stringbuffer_* symbols into a pc_stringbuffer_*
    namespace to avoid colliding with MEOS's bundled liblwgeom copy;
  - installs libpc.a alongside libmeos.a and propagates it (+ libxml2/zlib)
    through MEOS::meos's INTERFACE_LINK_LIBRARIES so consumers link cleanly.

Add libxml2/zlib to the meos port and project dependencies; bump the meos
port-version so vcpkg rebuilds it.
@estebanzimanyi estebanzimanyi force-pushed the feat/trgeometry-port-core branch from ede1610 to eb23e7c Compare May 26, 2026 22:07
@estebanzimanyi estebanzimanyi force-pushed the feat/pointcloud-vcpkg-enabler branch from 2ecc969 to 18dfeec Compare May 26, 2026 22:07
@estebanzimanyi estebanzimanyi force-pushed the feat/trgeometry-port-core branch from eb23e7c to 811018d Compare May 26, 2026 22:44
estebanzimanyi added a commit that referenced this pull request May 26, 2026
Enable -DPOINTCLOUD=ON in the MEOS vcpkg port so the temporal point
cloud types (tpcpoint/tpcpatch) can be built from the pinned MEOS.

The MEOS pointcloud module links the pgPointCloud archive libpc.a,
normally produced by pgPointCloud's autotools (./autogen.sh && configure
&& make), which cannot run here (no pg_config, no autotools-usable
PostgreSQL). The vendored pointcloud-pg/lib sources need only libxml2 and
zlib, and lib/Makefile builds libpc.a directly via ar. So the port now:

  - patches the upstream MEOS pcpoint.h/pcpatch.h DatumGetXxxP macros,
    which unconditionally use PG_DETOAST_DATUM (PostgreSQL-only) unlike
    every other type header, to DatumGetPointer under MEOS;
  - generates config.mk + lib/pc_config.h the way pgPointCloud's autotools
    would, with vcpkg's libxml2/zlib paths (CUnit/LazPerf disabled);
  - builds the libpc.a archive target directly;
  - renames libpc.a's stringbuffer_* symbols into a pc_stringbuffer_*
    namespace to avoid colliding with MEOS's bundled liblwgeom copy;
  - installs libpc.a alongside libmeos.a and propagates it (+ libxml2/zlib)
    through MEOS::meos's INTERFACE_LINK_LIBRARIES so consumers link cleanly.

Add libxml2/zlib to the meos port and project dependencies; bump the meos
port-version so vcpkg rebuilds it.
@estebanzimanyi estebanzimanyi force-pushed the feat/pointcloud-vcpkg-enabler branch from 18dfeec to 0b5e583 Compare May 26, 2026 22:44
@estebanzimanyi estebanzimanyi force-pushed the feat/trgeometry-port-core branch from 811018d to 8f4d1b9 Compare May 27, 2026 00:26
estebanzimanyi added a commit that referenced this pull request May 27, 2026
Enable -DPOINTCLOUD=ON in the MEOS vcpkg port so the temporal point
cloud types (tpcpoint/tpcpatch) can be built from the pinned MEOS.

The MEOS pointcloud module links the pgPointCloud archive libpc.a,
normally produced by pgPointCloud's autotools (./autogen.sh && configure
&& make), which cannot run here (no pg_config, no autotools-usable
PostgreSQL). The vendored pointcloud-pg/lib sources need only libxml2 and
zlib, and lib/Makefile builds libpc.a directly via ar. So the port now:

  - patches the upstream MEOS pcpoint.h/pcpatch.h DatumGetXxxP macros,
    which unconditionally use PG_DETOAST_DATUM (PostgreSQL-only) unlike
    every other type header, to DatumGetPointer under MEOS;
  - generates config.mk + lib/pc_config.h the way pgPointCloud's autotools
    would, with vcpkg's libxml2/zlib paths (CUnit/LazPerf disabled);
  - builds the libpc.a archive target directly;
  - renames libpc.a's stringbuffer_* symbols into a pc_stringbuffer_*
    namespace to avoid colliding with MEOS's bundled liblwgeom copy;
  - installs libpc.a alongside libmeos.a and propagates it (+ libxml2/zlib)
    through MEOS::meos's INTERFACE_LINK_LIBRARIES so consumers link cleanly.

Add libxml2/zlib to the meos port and project dependencies; bump the meos
port-version so vcpkg rebuilds it.
@estebanzimanyi estebanzimanyi force-pushed the feat/pointcloud-vcpkg-enabler branch from 0b5e583 to b7e4f7e Compare May 27, 2026 00:26
@estebanzimanyi estebanzimanyi force-pushed the feat/trgeometry-port-core branch from 8f4d1b9 to 8db3629 Compare May 27, 2026 01:43
estebanzimanyi added a commit that referenced this pull request May 27, 2026
Enable -DPOINTCLOUD=ON in the MEOS vcpkg port so the temporal point
cloud types (tpcpoint/tpcpatch) can be built from the pinned MEOS.

The MEOS pointcloud module links the pgPointCloud archive libpc.a,
normally produced by pgPointCloud's autotools (./autogen.sh && configure
&& make), which cannot run here (no pg_config, no autotools-usable
PostgreSQL). The vendored pointcloud-pg/lib sources need only libxml2 and
zlib, and lib/Makefile builds libpc.a directly via ar. So the port now:

  - patches the upstream MEOS pcpoint.h/pcpatch.h DatumGetXxxP macros,
    which unconditionally use PG_DETOAST_DATUM (PostgreSQL-only) unlike
    every other type header, to DatumGetPointer under MEOS;
  - generates config.mk + lib/pc_config.h the way pgPointCloud's autotools
    would, with vcpkg's libxml2/zlib paths (CUnit/LazPerf disabled);
  - builds the libpc.a archive target directly;
  - renames libpc.a's stringbuffer_* symbols into a pc_stringbuffer_*
    namespace to avoid colliding with MEOS's bundled liblwgeom copy;
  - installs libpc.a alongside libmeos.a and propagates it (+ libxml2/zlib)
    through MEOS::meos's INTERFACE_LINK_LIBRARIES so consumers link cleanly.

Add libxml2/zlib to the meos port and project dependencies; bump the meos
port-version so vcpkg rebuilds it.
@estebanzimanyi estebanzimanyi force-pushed the feat/pointcloud-vcpkg-enabler branch from b7e4f7e to 316ca4f Compare May 27, 2026 01:43
estebanzimanyi added a commit that referenced this pull request May 27, 2026
Enable -DPOINTCLOUD=ON in the MEOS vcpkg port so the temporal point
cloud types (tpcpoint/tpcpatch) can be built from the pinned MEOS.

The MEOS pointcloud module links the pgPointCloud archive libpc.a,
normally produced by pgPointCloud's autotools (./autogen.sh && configure
&& make), which cannot run here (no pg_config, no autotools-usable
PostgreSQL). The vendored pointcloud-pg/lib sources need only libxml2 and
zlib, and lib/Makefile builds libpc.a directly via ar. So the port now:

  - patches the upstream MEOS pcpoint.h/pcpatch.h DatumGetXxxP macros,
    which unconditionally use PG_DETOAST_DATUM (PostgreSQL-only) unlike
    every other type header, to DatumGetPointer under MEOS;
  - generates config.mk + lib/pc_config.h the way pgPointCloud's autotools
    would, with vcpkg's libxml2/zlib paths (CUnit/LazPerf disabled);
  - builds the libpc.a archive target directly;
  - renames libpc.a's stringbuffer_* symbols into a pc_stringbuffer_*
    namespace to avoid colliding with MEOS's bundled liblwgeom copy;
  - installs libpc.a alongside libmeos.a and propagates it (+ libxml2/zlib)
    through MEOS::meos's INTERFACE_LINK_LIBRARIES so consumers link cleanly.

Add libxml2/zlib to the meos port and project dependencies; bump the meos
port-version so vcpkg rebuilds it.
@estebanzimanyi estebanzimanyi force-pushed the feat/pointcloud-vcpkg-enabler branch from 316ca4f to 9c64f7b Compare May 27, 2026 02:50
estebanzimanyi added a commit that referenced this pull request May 27, 2026
Enable -DPOINTCLOUD=ON in the MEOS vcpkg port so the temporal point
cloud types (tpcpoint/tpcpatch) can be built from the pinned MEOS.

The MEOS pointcloud module links the pgPointCloud archive libpc.a,
normally produced by pgPointCloud's autotools (./autogen.sh && configure
&& make), which cannot run here (no pg_config, no autotools-usable
PostgreSQL). The vendored pointcloud-pg/lib sources need only libxml2 and
zlib, and lib/Makefile builds libpc.a directly via ar. So the port now:

  - patches the upstream MEOS pcpoint.h/pcpatch.h DatumGetXxxP macros,
    which unconditionally use PG_DETOAST_DATUM (PostgreSQL-only) unlike
    every other type header, to DatumGetPointer under MEOS;
  - generates config.mk + lib/pc_config.h the way pgPointCloud's autotools
    would, with vcpkg's libxml2/zlib paths (CUnit/LazPerf disabled);
  - builds the libpc.a archive target directly;
  - renames libpc.a's stringbuffer_* symbols into a pc_stringbuffer_*
    namespace to avoid colliding with MEOS's bundled liblwgeom copy;
  - installs libpc.a alongside libmeos.a and propagates it (+ libxml2/zlib)
    through MEOS::meos's INTERFACE_LINK_LIBRARIES so consumers link cleanly.

Add libxml2/zlib to the meos port and project dependencies; bump the meos
port-version so vcpkg rebuilds it.
@estebanzimanyi estebanzimanyi force-pushed the feat/pointcloud-vcpkg-enabler branch from 9c64f7b to f6d2141 Compare May 27, 2026 03:41
estebanzimanyi added a commit that referenced this pull request May 27, 2026
Enable -DPOINTCLOUD=ON in the MEOS vcpkg port so the temporal point
cloud types (tpcpoint/tpcpatch) can be built from the pinned MEOS.

The MEOS pointcloud module links the pgPointCloud archive libpc.a,
normally produced by pgPointCloud's autotools (./autogen.sh && configure
&& make), which cannot run here (no pg_config, no autotools-usable
PostgreSQL). The vendored pointcloud-pg/lib sources need only libxml2 and
zlib, and lib/Makefile builds libpc.a directly via ar. So the port now:

  - patches the upstream MEOS pcpoint.h/pcpatch.h DatumGetXxxP macros,
    which unconditionally use PG_DETOAST_DATUM (PostgreSQL-only) unlike
    every other type header, to DatumGetPointer under MEOS;
  - generates config.mk + lib/pc_config.h the way pgPointCloud's autotools
    would, with vcpkg's libxml2/zlib paths (CUnit/LazPerf disabled);
  - builds the libpc.a archive target directly;
  - renames libpc.a's stringbuffer_* symbols into a pc_stringbuffer_*
    namespace to avoid colliding with MEOS's bundled liblwgeom copy;
  - installs libpc.a alongside libmeos.a and propagates it (+ libxml2/zlib)
    through MEOS::meos's INTERFACE_LINK_LIBRARIES so consumers link cleanly.

Add libxml2/zlib to the meos port and project dependencies; bump the meos
port-version so vcpkg rebuilds it.
@estebanzimanyi estebanzimanyi force-pushed the feat/pointcloud-vcpkg-enabler branch from f6d2141 to c5d4a61 Compare May 27, 2026 04:20
@estebanzimanyi estebanzimanyi force-pushed the feat/trgeometry-port-core branch 3 times, most recently from cb39d26 to 744b0df Compare May 29, 2026 22:56
estebanzimanyi added a commit that referenced this pull request May 30, 2026
Enable -DPOINTCLOUD=ON in the MEOS vcpkg port so the temporal point
cloud types (tpcpoint/tpcpatch) can be built from the pinned MEOS.

The MEOS pointcloud module links the pgPointCloud archive libpc.a,
normally produced by pgPointCloud's autotools (./autogen.sh && configure
&& make), which cannot run here (no pg_config, no autotools-usable
PostgreSQL). The vendored pointcloud-pg/lib sources need only libxml2 and
zlib, and lib/Makefile builds libpc.a directly via ar. So the port now:

  - patches the upstream MEOS pcpoint.h/pcpatch.h DatumGetXxxP macros,
    which unconditionally use PG_DETOAST_DATUM (PostgreSQL-only) unlike
    every other type header, to DatumGetPointer under MEOS;
  - generates config.mk + lib/pc_config.h the way pgPointCloud's autotools
    would, with vcpkg's libxml2/zlib paths (CUnit/LazPerf disabled);
  - builds the libpc.a archive target directly;
  - renames libpc.a's stringbuffer_* symbols into a pc_stringbuffer_*
    namespace to avoid colliding with MEOS's bundled liblwgeom copy;
  - installs libpc.a alongside libmeos.a and propagates it (+ libxml2/zlib)
    through MEOS::meos's INTERFACE_LINK_LIBRARIES so consumers link cleanly.

Add libxml2/zlib to the meos port and project dependencies; bump the meos
port-version so vcpkg rebuilds it.
@estebanzimanyi estebanzimanyi force-pushed the feat/pointcloud-vcpkg-enabler branch 2 times, most recently from 6f7f6ba to 0399d81 Compare May 30, 2026 19:15
@estebanzimanyi estebanzimanyi force-pushed the feat/trgeometry-port-core branch from 744b0df to f053543 Compare June 2, 2026 14:14
@estebanzimanyi estebanzimanyi force-pushed the feat/trgeometry-port-core branch from f053543 to 9fba6b8 Compare June 5, 2026 16:02
@estebanzimanyi estebanzimanyi force-pushed the feat/pointcloud-vcpkg-enabler branch from 0399d81 to ac5edff Compare June 5, 2026 16:12
@estebanzimanyi estebanzimanyi force-pushed the feat/trgeometry-port-core branch from 9fba6b8 to 80e5b50 Compare June 5, 2026 17:15
@estebanzimanyi estebanzimanyi force-pushed the feat/pointcloud-vcpkg-enabler branch from ac5edff to 287abc9 Compare June 5, 2026 17:15
@estebanzimanyi estebanzimanyi force-pushed the feat/trgeometry-port-core branch from 80e5b50 to 2914789 Compare June 5, 2026 18:42
@estebanzimanyi estebanzimanyi force-pushed the feat/pointcloud-vcpkg-enabler branch 2 times, most recently from 152e3fc to 67e326f Compare June 6, 2026 04:38
@estebanzimanyi estebanzimanyi force-pushed the feat/trgeometry-port-core branch 2 times, most recently from 201a740 to e8f021a Compare June 6, 2026 06:10
@estebanzimanyi estebanzimanyi force-pushed the feat/pointcloud-vcpkg-enabler branch from 67e326f to 94250ca Compare June 6, 2026 06:10
@estebanzimanyi estebanzimanyi force-pushed the feat/trgeometry-port-core branch from e8f021a to b22b977 Compare June 6, 2026 06:35
@estebanzimanyi estebanzimanyi force-pushed the feat/pointcloud-vcpkg-enabler branch 2 times, most recently from 596b182 to f016ba1 Compare June 6, 2026 07:15
@estebanzimanyi estebanzimanyi force-pushed the feat/trgeometry-port-core branch from b22b977 to 9d0e670 Compare June 6, 2026 07:15
Enable -DPOINTCLOUD=ON and -DH3=ON in the MEOS vcpkg port so the temporal
point cloud types (tpcpoint/tpcpatch) and the temporal H3 index can be built
from the pinned MEOS. The pin carries the extended-type stack (tbigint,
th3index, pgPointCloud) on the pre-rename trgeo C API the stack targets.

The MEOS pointcloud module links the pgPointCloud archive libpc.a, normally
produced by pgPointCloud's autotools, which cannot run here. The vendored
pointcloud-pg/lib sources need only libxml2 and zlib, and lib/Makefile builds
libpc.a directly via ar. So the port patches the upstream pcpoint.h/pcpatch.h
DatumGetXxxP macros to DatumGetPointer under MEOS, generates config.mk +
lib/pc_config.h with vcpkg's libxml2/zlib paths, builds the libpc.a archive
target directly with the stringbuffer_* symbols renamed into a pc_stringbuffer_*
namespace, installs libpc.a alongside libmeos.a, and propagates it (+ libxml2/
zlib) through MEOS::meos's INTERFACE_LINK_LIBRARIES. Adds the meos_h3.h install
rule and adds h3/libxml2/zlib to the meos port and project dependencies.
@estebanzimanyi estebanzimanyi force-pushed the feat/trgeometry-port-core branch from 9d0e670 to 730dd3e Compare June 6, 2026 23:53
@estebanzimanyi estebanzimanyi force-pushed the feat/pointcloud-vcpkg-enabler branch from f016ba1 to cabf439 Compare June 6, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant