diff --git a/tools/refresh.conf b/tools/refresh.conf index 98f709f..a653b03 100644 --- a/tools/refresh.conf +++ b/tools/refresh.conf @@ -3,10 +3,18 @@ # BUILD_CMD runs from / with $PREFIX (the libmeos install prefix) and $CATALOG # exported; $SKIP_TESTS is set when --skip-tests is passed. tools/codegen.py reads the catalog # staged at CATALOG_DEST and regenerates the committed functions/ package. +# +# PKG_CONFIG_PATH names the prefix this run just built. functions/cgo.go says +# `#cgo pkg-config: meos`, so cgo resolves whichever meos.pc the default search path answers +# with -- an older install under /usr/local otherwise wins, and it publishes none of the +# -D=1 defines the fresh meos.pc carries. Each declaration then stays behind its +# `#if` and the build fails naming a symbol the header does declare. The include path comes +# from the same meos.pc, and the h3 one from cgo.go's own `#cgo linux CFLAGS`, so no +# CGO_CFLAGS is needed here. ENGINE=go BUILD_DIR=. BUILD_LIBMEOS=true CATALOG_DEST=tools/meos-idl.json BUILD_CMD='python3 tools/codegen.py - CGO_CFLAGS="-I$PREFIX/include -I/usr/include/h3" CGO_LDFLAGS="-L$PREFIX/lib -lmeos" LD_LIBRARY_PATH="$PREFIX/lib" go build ./functions + PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig" CGO_LDFLAGS="-L$PREFIX/lib -lmeos" LD_LIBRARY_PATH="$PREFIX/lib" go build ./functions [ -n "${SKIP_TESTS:-}" ] || CGO_ENABLED=0 go test ./tools/parity/'