Skip to content
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

libkml build failing #51

Closed
edmorley opened this issue May 17, 2024 · 1 comment · Fixed by #53
Closed

libkml build failing #51

edmorley opened this issue May 17, 2024 · 1 comment · Fixed by #53
Assignees

Comments

@edmorley
Copy link
Member

libkml is a dependency of the GDAL build, and so needs to be built for Heroku-24 so I can build GDAL for Heroku-24.

However, the libkml build is currently failing with:

Install the project...
-- Install configuration: "Release"
-- Installing: /tmp/tmp.ul8utM3CPi/include/minizip/crypt.h
-- Installing: /tmp/tmp.ul8utM3CPi/include/minizip/ioapi.h
-- Installing: /tmp/tmp.ul8utM3CPi/include/minizip/mztools.h
-- Installing: /tmp/tmp.ul8utM3CPi/include/minizip/unzip.h
-- Installing: /tmp/tmp.ul8utM3CPi/include/minizip/zip.h
-- Installing: /tmp/tmp.ul8utM3CPi/lib/libminizip.so
[  6%] Completed 'MINIZIP'
[  6%] Built target MINIZIP
[  7%] Creating directories for 'URIPARSER'
[  7%] Performing download step (download, verify and extract) for 'URIPARSER'
-- Downloading...
   dst='/tmp/tmp.zpELfYAgk1/libkml-libkml-0da164d/URIPARSER/src/uriparser-0.7.5.tar.bz2'
   timeout='none'
   inactivity timeout='none'
-- Using src='http://sourceforge.net/projects/uriparser/files/Sources/0.7.5/uriparser-0.7.5.tar.bz2/download'
CMake Error at URIPARSER-stamp/download-URIPARSER.cmake:170 (message):
  Each download failed!

    error: downloading 'http://sourceforge.net/projects/uriparser/files/Sources/0.7.5/uriparser-0.7.5.tar.bz2/download' failed
          status_code: 22
          status_string: "HTTP response code said error"
          log:
          --- LOG BEGIN ---
            Trying 104.18.12.149:80...

  Connected to sourceforge.net (104.18.12.149) port 80 (#0)

  GET
  /projects/uriparser/files/Sources/0.7.5/uriparser-0.7.5.tar.bz2/download
  HTTP/1.1

  Host: sourceforge.net

  User-Agent: curl/7.81.0

  Accept: */*

  

  Mark bundle as not supporting multiuse

  HTTP/1.1 301 Moved Permanently

  Date: Fri, 17 May 2024 07:16:34 GMT

  Content-Type: text/html

  Transfer-Encoding: chunked

  Connection: keep-alive

  location:
  https://sourceforge.net/projects/uriparser/files/Sources/0.7.5/uriparser-0.7.5.tar.bz2/download

...
@edmorley
Copy link
Member Author

The libkml project sadly hasn't had a new release since 2025:
https:/libkml/libkml/releases

It's possible this is fixed on master (which was last updated in 2016), or else we could use the packages Ubuntu's APT repo instead. (Though we'd then need to copy over the libs into the archive, since they wouldn't be present at runtime if only installed into the binary build environment's image using APT.)

@edmorley edmorley self-assigned this May 19, 2024
edmorley added a commit that referenced this issue May 20, 2024
* Switches to using GitHub Actions to build and upload the packages to S3,
  instead of the packages being built in containers locally.
* Fixes the errors seen when building `libkml` (#51) by switching to
  using `libkml` from the Ubuntu APT repository instead. As a side
  effect this means the final GDAL package is smaller since it no longer
  includes unnecessary libkml related headers.
* Switches to using CMake instead of autoconf/make, since newer
  GDAL/GEOS/PROJ no longer support autoconf.
* Rewrites the build scripts to accept an input version, so new versions
  can be built without having to copy-paste-commit additional scripts.
* Adds testing of the built packages against the run image, to ensure
  all dynamically linked libraries can be found.
* Enables GDAL's GEOS related features, by ensuring GEOS is available
  during the GDAL build.
* Documents the newly built and available package versions, which are:
  * GDAL: 3.6.4, 3.7.3, 3.8.5, 3.9.0
  * GEOS: 3.10.6, 3.11.3, 3.12.1
  * PROJ: 9.4.0

For now, the buildpack default versions of GDAL/GEOS/PROJ remain the
same, as anyone wanting the new versions needs to explicitly request the
new version using the `*_VERSION` env vars:
https:/heroku/heroku-geo-buildpack#default-versions

See also:
https://gdal.org/development/building_from_source.html
https://libgeos.org/usage/download/#build-from-source
https://proj.org/en/stable/install.html#compilation-and-installation-from-source-code

Fixes #51.
Fixes #52.
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 a pull request may close this issue.

1 participant