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

First try at Cirrus config #99

Merged
merged 46 commits into from
Feb 2, 2023
Merged

First try at Cirrus config #99

merged 46 commits into from
Feb 2, 2023

Conversation

sgillies
Copy link
Member

No description provided.

@sgillies
Copy link
Member Author

Getting builds going on a new platform is always an epic quest. A bunch of GDAL's dependencies like openssl and curl built, and then I get to libpng and install: /Users/admin/local/share/man/man3/libpng.3: Permission denied. https://cirrus-ci.com/task/5011115680202752?logs=build_wheel#L4811. WTF?

@sgillies
Copy link
Member Author

sgillies commented Jan 29, 2023

I made some progress today! This project's config.sh script had some missing PREFX in builds, and /usr/local is not as free to use as it used to be on the latest Macs. I've progressed to the point of building GDAL itself, which is failing because GDAL 3.5.3's configure script emits a broken -arch arm64-arch arm64 configuration on arm-apple-darwin. To go forward, it looks like we have to switch to using cmake to build GDAL.

@rouault can I bug you for advice? Does GDAL 3.5.3 build cleanly on Apple M1 using Cmake?

@rouault
Copy link

rouault commented Jan 29, 2023

Does GDAL 3.5.3 build cleanly on Apple M1 using Cmake?

Seeing OSGeo/gdal#5994 I assume so

@rouault
Copy link

rouault commented Jan 30, 2023

The build problem of the OGCAPI driver is related to the lack of the GML driver. This was fixed per OSGeo/gdal#6651.

  • update to GDAL 3.6.2
  • or enable the GML driver
  • or disable the OGCAPI driver

@sgillies
Copy link
Member Author

Enable the GML driver? Never! 😆

@sgillies
Copy link
Member Author

CFLAGS are a mess. A bunch of bare arm64 and an -arch arm64-arch arm64. Not sure what the cause is.

      clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -g arm64 arm64 -g -O2 -g -O2 -g -O2 -g -O2 -g -O2 -I/tmp/local/include -arch arm64-arch arm64 -I/private/var/folders/76/zy5ktkns50v6gt5g8r0sf6sc0000gn/T/cirrus-ci-build/venv/lib/python3.11/site-packages/numpy/core/include -I/tmp/local/include -I/private/var/folders/76/zy5ktkns50v6gt5g8r0sf6sc0000gn/T/cirrus-ci-build/venv/include -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c rasterio/_base.c -o build/temp.macosx-11.0-arm64-3.11/rasterio/_base.o -Wno-unused-parameter -Wno-unused-function
      clang: error: no such file or directory: 'arm64'
      clang: error: no such file or directory: 'arm64'
      clang: error: no such file or directory: 'arm64'
      clang: error: invalid arch name '-arch arm64-arch'
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

@sgillies
Copy link
Member Author

sgillies commented Jan 31, 2023

I found and fixed a multibuild bug and we've got wheels 🎉

Thank you very much for the help @rouault. You're the best!

@sgillies
Copy link
Member Author

Not quite ready to merge. My custom build breaks yum in the manylinux2014 image, so I need to avoid using get_modern_cmake for Linux builds.

@sgillies
Copy link
Member Author

sgillies commented Feb 1, 2023

GDAL's new CMake build system tends to include more drivers than the old autotools system did. For example, it finds OpenEXR installed on GHA's x86_64 macos VM and decides to build the EXR driver. But OpenEXR comes from homebrew and isn't comptatible with the macos version we're building for. The old system didn't do this.

x86_64 mac builds are broken until I track down all the new drivers being included by CMake.

@rouault
Copy link

rouault commented Feb 1, 2023

But OpenEXR comes from homebrew and isn't comptatible with the macos version we're building for. The old system didn't do this.

you could likely use CMake variables to restrict the search path, like https://cmake.org/cmake/help/latest/variable/CMAKE_PREFIX_PATH.html

@sgillies
Copy link
Member Author

sgillies commented Feb 1, 2023

Homebrew openjpeg! I think that's the last conflict 🤞

@sgillies
Copy link
Member Author

sgillies commented Feb 1, 2023

Yep, that was it 🙃

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.

2 participants