Skip to content

Build the refreshed surface against the prefix the same run just installed - #24

Merged
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:fix/refresh-builds-against-the-prefix-it-just-built
Sep 3, 2026
Merged

Build the refreshed surface against the prefix the same run just installed#24
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:fix/refresh-builds-against-the-prefix-it-just-built

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

functions/cgo.go says #cgo pkg-config: meos, so cgo resolves whichever
meos.pc the default search path answers with. The recipe set CGO_CFLAGS and no
PKG_CONFIG_PATH, so on any machine carrying an older /usr/local install that
stale meos.pc wins -- and it publishes an include path with none of the
-D=1 defines the fresh one carries.

Each family declaration then stays behind its #if and the build fails naming a
symbol the installed header does declare:

functions/meos_meos.go:956:2: could not determine kind of name
    for C.meos_initialize_pointcloud
functions/meos_meos.go:556:11: could not determine kind of name
    for C.rtree_create_tpcbox

which reads as a libmeos built without the family rather than as an environment
that never named the family at all. So the documented one-command refresh cannot
build the package it has just generated. CI escapes it only because it installs
libmeos INTO /usr/local, where the default pkg-config path finds the fresh one.

Naming PKG_CONFIG_PATH makes the build read the prefix this run installed.
MEASURED: pkg-config then reads
.meos-chain/prefix/lib/pkgconfig/meos.pc rather than
/usr/local/lib/pkgconfig/meos.pc, and publishes 11 family defines against 0;
all 13 meos headers the preamble includes resolve inside that prefix;
go build ./functions and go test ./tools/parity/ both exit 0 where the build
previously failed.

CGO_CFLAGS goes away because the same meos.pc supplies the include path and
cgo.go's own #cgo linux CFLAGS supplies the h3 one.

…alled

`functions/cgo.go` says `#cgo pkg-config: meos`, so cgo resolves whichever
meos.pc the default search path answers with. The recipe set CGO_CFLAGS and no
PKG_CONFIG_PATH, so on any machine carrying an older /usr/local install that
stale meos.pc wins -- and it publishes an include path with none of the
-D<FAMILY>=1 defines the fresh one carries.

Each family declaration then stays behind its `#if` and the build fails naming a
symbol the installed header does declare:

    functions/meos_meos.go:956:2: could not determine kind of name
        for C.meos_initialize_pointcloud
    functions/meos_meos.go:556:11: could not determine kind of name
        for C.rtree_create_tpcbox

which reads as a libmeos built without the family rather than as an environment
that never named the family at all. So the documented one-command refresh cannot
build the package it has just generated. CI escapes it only because it installs
libmeos INTO /usr/local, where the default pkg-config path finds the fresh one.

Naming PKG_CONFIG_PATH makes the build read the prefix this run installed.
MEASURED: pkg-config then reads
`.meos-chain/prefix/lib/pkgconfig/meos.pc` rather than
`/usr/local/lib/pkgconfig/meos.pc`, and publishes 11 family defines against 0;
all 13 meos headers the preamble includes resolve inside that prefix;
`go build ./functions` and `go test ./tools/parity/` both exit 0 where the build
previously failed.

CGO_CFLAGS goes away because the same meos.pc supplies the include path and
cgo.go's own `#cgo linux CFLAGS` supplies the h3 one.
@estebanzimanyi
estebanzimanyi merged commit d81351f into MobilityDB:main Sep 3, 2026
2 checks passed
@estebanzimanyi
estebanzimanyi deleted the fix/refresh-builds-against-the-prefix-it-just-built branch September 3, 2026 16:45
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