Skip to content

Link the module against the installed MEOS archive - #14

Merged
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:fix/link-installed-meos-archive
Aug 31, 2026
Merged

Link the module against the installed MEOS archive#14
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:fix/link-installed-meos-archive

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

The emcc line takes MEOS from the install prefix, so the prefix is the only
thing it names and the build-tree layout stays MEOS's own business.

MEOS installs one self-contained archive: it folds pgtypes, liblwgeom and ryu
into libmeos.a — and libpc with POINTCLOUD on — so a consumer embedding MEOS in
a single relocatable module links one library. The build-tree paths the link
line used instead are intermediates that the install does not publish, and
meos/CMakeLists.txt places the archive at the binary root rather than under
build/meos, so build/meos/libmeos.a names a file that is not written and
emcc stops at the missing input. The sidecar libpgtypes.a and libpostgis.a go
with it, their objects already being inside the archive.

The source-tree include paths go too: the installed umbrella headers resolve
among themselves and reach outside the prefix only for json-c and h3, which
carry their own. Keeping the MobilityDB source on the include path let its
tracked pg_config_manual.h and postgres_ext.h answer ahead of the installed
copies, which is the shape that compiles against one set of definitions and
links against another.

The embedded spatial_ref_sys.csv comes from the prefix for the same reason.

The emcc line takes MEOS from the install prefix, so the prefix is the only
thing it names and the build-tree layout stays MEOS's own business.

MEOS installs one self-contained archive: it folds pgtypes, liblwgeom and ryu
into libmeos.a — and libpc with POINTCLOUD on — so a consumer embedding MEOS in
a single relocatable module links one library. The build-tree paths the link
line used instead are intermediates that the install does not publish, and
`meos/CMakeLists.txt` places the archive at the binary root rather than under
`build/meos`, so `build/meos/libmeos.a` names a file that is not written and
emcc stops at the missing input. The sidecar libpgtypes.a and libpostgis.a go
with it, their objects already being inside the archive.

The source-tree include paths go too: the installed umbrella headers resolve
among themselves and reach outside the prefix only for json-c and h3, which
carry their own. Keeping the MobilityDB source on the include path let its
tracked pg_config_manual.h and postgres_ext.h answer ahead of the installed
copies, which is the shape that compiles against one set of definitions and
links against another.

The embedded spatial_ref_sys.csv comes from the prefix for the same reason.
@estebanzimanyi
estebanzimanyi merged commit aa8db0d into MobilityDB:main Aug 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant