Skip to content

Use the installed MEOS headers, not a copy in the repo - #15

Merged
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:fix/use-the-installed-meos-headers
Aug 29, 2026
Merged

Use the installed MEOS headers, not a copy in the repo#15
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:fix/use-the-installed-meos-headers

Conversation

@estebanzimanyi

@estebanzimanyi estebanzimanyi commented Aug 29, 2026

Copy link
Copy Markdown
Member

The root package discovers MEOS through #cgo pkg-config: meos, the form functions/cgo.go already uses, so the installed library reports its own include dir and the family macros it carries. The three vendored public headers go with the hardcoded paths that reached them.

A quoted include resolves from the including file's own directory first, so a copy beside the sources beats every -I: the package compiles against the copy while linking the library, which stays quiet until the library renames a symbol. The calls follow the surface the library publishes — mul_* for the multiplication entry points, date_in/date_out and timestamptz_in/timestamptz_out from pg_date.h and pg_timestamp.h, and text_in/text_out for the text conversions, whose cstring2text/text2cstring spellings libmeos exports nowhere.

The root package discovers MEOS through `#cgo pkg-config: meos`, the form
functions/cgo.go already uses: the installed library reports its own
include dir and the family macros it carries, and PKG_CONFIG_PATH selects
which libmeos a build compiles against. The three vendored public headers
go with the hardcoded paths that reached them.

A quoted include resolves from the including file's own directory first,
so a copy beside the sources wins over every -I: the package compiled
against the copy and linked the library, which is silent until the
library renames something. The copy names mult_* and RTreeSearchOp where
the library exports mul_* and IndexSearchOp.

The calls follow the surface the library publishes: mul_* for the five
multiplication entry points, date_in/date_out and timestamptz_in/
timestamptz_out from pg_date.h and pg_timestamp.h, and text_in/text_out
for the thirty text conversions, whose cstring2text/text2cstring
spellings libmeos exports nowhere.
@estebanzimanyi
estebanzimanyi merged commit 567692d into MobilityDB:main Aug 29, 2026
2 checks passed
@estebanzimanyi
estebanzimanyi deleted the fix/use-the-installed-meos-headers branch August 29, 2026 12:59
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