Build pgPointCloud libpc.a without autotools to enable POINTCLOUD#154
Open
estebanzimanyi wants to merge 8 commits into
Open
Build pgPointCloud libpc.a without autotools to enable POINTCLOUD#154estebanzimanyi wants to merge 8 commits into
estebanzimanyi wants to merge 8 commits into
Conversation
9331934 to
024e8da
Compare
Member
Author
Reviewer's quickstart — ~2-3 minutesWhat 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 |
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.
ede1610 to
eb23e7c
Compare
2ecc969 to
18dfeec
Compare
eb23e7c to
811018d
Compare
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.
18dfeec to
0b5e583
Compare
811018d to
8f4d1b9
Compare
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.
0b5e583 to
b7e4f7e
Compare
8f4d1b9 to
8db3629
Compare
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.
b7e4f7e to
316ca4f
Compare
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.
316ca4f to
9c64f7b
Compare
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.
9c64f7b to
f6d2141
Compare
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.
f6d2141 to
c5d4a61
Compare
8db3629 to
2a6634e
Compare
Adds the SIZEOF_LONG_LONG emission to the rendered pg_config.h so the DuckDB-Wasm (wasm32-emscripten / ILP32) build of MEOS no longer fails the pg_bitutils integer-width check.
2a6634e to
cb39d26
Compare
Scalar and cast bodies run MEOS on DuckDB TaskScheduler worker threads, which need a per-thread meos_initialize(); a thread-local guard in the scalar exec wrapper and a cast trampoline (RegisterMeosCastFunction) cover every entry point, so timestamp formatting no longer dereferences a NULL session_timezone. Per-type DuckDB callbacks and blob helpers have internal linkage and a single canonical blob round-trip (TemporalToBlob / BlobToTemporal) declared once in temporal/temporal_blob.hpp, so each function-pointer registration binds to its own body.
Enable the CBUFFER, NPOINT, POSE and RGEO MEOS modules in the vcpkg port so the extended temporal types (tcbuffer, tnpoint, tpose, trgeometry) can be ported into MobilityDuck. RGEO depends on POSE.
Bring the temporal circular buffer (tcbuffer) type into MobilityDuck: construction, text/EWKT/WKB I/O, casts and accessors, gated by the CBUFFER config flag that mirrors the MEOS CBUFFER build module. Disabling CBUFFER drops the tcbuffer sources and its registration in LoadInternal. MFJSON input binds to MEOS tcbuffer_from_mfjson, which the pinned MEOS does not yet expose, so it is omitted here.
Brings the temporal network point (tnpoint) type into the accumulate: construction, text/EWKT/MFJSON I/O, casts, and accessors, registered in LoadInternal after the tcbuffer surface. The network model resolves route geometries from a ways CSV; MEOS hardcodes its path (/usr/local/share/ways1000.csv) with no setter, so the canonical ways1000.csv is embedded (ways_csv.inc) and materialized there on load (best-effort). Fixes applied on top of the #150 branch: - getValue/startValue/endValue value executors renamed to tnpoint-unique names (Tnpoint_{get,start,end}_value). Generic names (Tinstant_value / Temporal_start_value / Temporal_end_value) are also defined at namespace scope in the other geo .cpp — an ODR violation that would otherwise dispatch these to the surviving (geometry) definition and render the npoint as a geometry ("Unknown geometry type: 0"). - Refresh the asEWKT test expecteds with the ways-network SRID prefix (SRID=5676;), matching MobilityDB's asEWKT(npoint) reference; asText omits it. Full sqllogictest suite green: 1799 assertions across 78 test cases. (cherry picked from commit 94e01ad)
Brings the temporal pose (tpose) type into the accumulate: construction, text/EWKT/MFJSON/WKB I/O, casts, and accessors, registered in LoadInternal after the tnpoint surface. Fixes applied on top of the #151 branch: - getValue/startValue/endValue value executors renamed to tpose-unique names (Tpose_{get,start,end}_value) and rendered via pose_as_text (WKT form "Pose(POINT(x y),r)"). Generic names collide with the other geo .cpp (ODR violation -> geometry renderer -> "Unknown geometry type: 0"); pose_out emits the HexWKB/uppercase "POSE (...)" form, not what asText/getValue want. - Close the output-serialization gap the #151 test exercises but the port omitted: register asMFJSON (via temporal_as_mfjson) and asBinary / asEWKB / asHexWKB / asHexEWKB (via temporal_as_wkb / temporal_as_hexwkb), with tpose-unique exec names. MobilityDB exposes all of these for tpose. - Fix the setInterp-to-discrete test: a multi-instant continuous sequence cannot be discretized (MEOS errors); lift an instant instead, matching MobilityDB's 102_tpose reference. Full sqllogictest suite green: 1830 assertions across 79 test cases. (cherry picked from commit ec74d58)
Bring the temporal rigid geometry (trgeometry) type into MobilityDuck: construction, text/EWKT/WKB I/O, casts and accessors, gated by the RGEO config flag that mirrors the MEOS RGEO build module. Disabling RGEO drops the trgeometry sources and its registration in LoadInternal. The MEOS calls use the trgeo_* names exported by the pinned MEOS; MFJSON input binds to a MEOS symbol the pinned MEOS does not yet expose, so it is omitted here.
cb39d26 to
744b0df
Compare
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.
c5d4a61 to
6f7f6ba
Compare
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.
6f7f6ba to
0399d81
Compare
744b0df to
f053543
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.