-
-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MacOS release builds don't include support for GeoPackage providers #736
Comments
Yeah, that is weird. I will take a look at this. |
I think i found the root of the issue. From the (cgo docs)[https://golang.org/cmd/cgo/]:
In our CI we're not setting
Seems like it should be a simple CI fix. @flother would you want to send in a change? The CI will build artifacts for PRs that you could test. |
Thanks for digging into this, @ARolek. I had a quick go at fixing the CI job, but I got stuck because it needs a C cross-compiler. From the cgo docs:
The current GitHub Actions job runs on Ubuntu and so, to build for MacOS, the job environment would need to have a Linux → Darwin C cross-compiler available. I think a better alternative would be to split the Linux/MacOS build job into two: compile for Linux (and AWS Lambda) in one job running on an I wanted to write this down both to clarify my thinking and to get a sanity check from you both. But if it sounds sensible, I can have a go at it. What do you reckon? (Edit: I don't have a Windows machine to test this on, but the release build for Windows already runs on a Windows runner. I think that means that cgo will work just fine — no cross-compilation — so it's probably just the MacOS build that suffers from this problem.) |
Yeah, I think this would be the cleanest. That way each env is built in its native environment rather than a cross-compile. One of the downsides is that I believe the MacOS runner uses 10x the CI compute minutes, but I think we should be fine for now. So really the only build that's having CGO issues is Darwin. 🤔 |
This updates the Tegola documentation to match the PR that fixes go-spatial/tegola#736.
Compiling MacOS release builds on Linux, as the GitHub Actions CI job does now, means cgo isn't enabled, which means the go-sqlite3 package isn't compiled, which means no GeoPackage support in the MacOS builds. This commit separates the jobs so that Linux builds are compiled on the ubuntu-latest runner while MacOS builds are compiled on the macos-latest runner. This means no cross-compilation is required and cgo can run happily. For further details, see the discussion at go-spatial/tegola#736.
The GeoPackage section of the configuration docs says:
The
_cgo
releases haven't been published since v0.10.4, when releases started to be built with GitHub Actions instead of Travis CI (commit 70d23e20). That commit says that "all builds now leverage CGO". My first thought was that that means all release builds now support GeoPackage providers by default, and that the sentence in the config docs should be removed.But it doesn't seem like this is the case. If you include a GeoPackage provider in
config.toml
, the release builds will complain:To reproduce this, create a
config.toml
containing only this (the referenced file,foobar.gpkg
, doesn't need to exist):Then download and run a release build of Tegola (I'm using a Mac so I used the Darwin build):
When I build from source with
go build
, GeoPackage providers are supported out-of-the-box. I'm not sure what it is that's stopping release builds including support. At the very least, the documentation should be updated to note that you'll need to build from source if you want to use a GeoPackage. But do you think it's possible to include GeoPackage support in the release builds again?The text was updated successfully, but these errors were encountered: