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

gmt: fix the build and make the geospatial team adopt it #344941

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

autra
Copy link
Contributor

@autra autra commented Sep 27, 2024

Description of changes

This MR does 2 things:

  • it adopts gmt under the geospatial team. Is that ok for you @NixOS/geospatial and @tviti?
  • it fixes its build

About the build fix, it seems to be yet another libxml2 fix. For some reason, the error was about libspatialite, but libspatialite package has already the libxml2 fix. netcdf on the other hand, didn't and for some reason, that brought libxml2 without httpSupport for libspatialite too:

/nix/store/81xsp348yfgmaan9r5055mcdjfw7a8wc-binutils-2.42/bin/ld: /nix/store/hfb55givv2afsz93b705hkjd9y98wqam-libspatialite-5.1.0/lib/libspatialite.so.8: undefined reference to `xmlNanoHTTPCleanup@LIBXML2_2.4.30'
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/gmt.dir/build.make:108: src/gmt] Error 1
make[1]: *** [CMakeFiles/Makefile2:601: src/CMakeFiles/gmt.dir/all] Error 2

I don't really understand this (for me libspatialite should get its own libxml2 right?), so please have a look to my fix to ensure it is the correct one.

Another doubt I have: I decided not to patch directly netcdf derivation, but maybe we want this instead (this also fixes the build).

The build failure was discovered when updating geos (#344310)

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@autra autra self-assigned this Sep 27, 2024
@autra
Copy link
Contributor Author

autra commented Sep 27, 2024

Result of nixpkgs-review pr 344941 run on x86_64-linux 1

5 packages built:
  • gmt
  • python311Packages.pygmt
  • python311Packages.pygmt.dist
  • python312Packages.pygmt
  • python312Packages.pygmt.dist

@autra
Copy link
Contributor Author

autra commented Sep 27, 2024

Result of nixpkgs-review pr 344941 run on x86_64-linux 1

5 packages built:
  • gmt
  • python311Packages.pygmt
  • python311Packages.pygmt.dist
  • python312Packages.pygmt
  • python312Packages.pygmt.dist

@tviti
Copy link
Contributor

tviti commented Sep 28, 2024 via email

@sikmir
Copy link
Member

sikmir commented Sep 28, 2024

Result of nixpkgs-review pr 344941 run on x86_64-darwin 1

4 packages marked as broken and skipped:
  • python311Packages.pygmt
  • python311Packages.pygmt.dist
  • python312Packages.pygmt
  • python312Packages.pygmt.dist
1 package built:
  • gmt

@sikmir
Copy link
Member

sikmir commented Sep 28, 2024

It looks like we can remove it now:

# pygmt.exceptions.GMTCLibNotFoundError: Error loading the GMT shared library '/nix/store/r3xnnqgl89vrnq0kzxx0bmjwzks45mz8-gmt-6.1.1/lib/libgmt.dylib'
broken = stdenv.hostPlatform.isDarwin;

python311Packages.pygmt and python312Packages.pygmt is fine for me on darwin-x86_64.

@sikmir sikmir mentioned this pull request Sep 28, 2024
11 tasks
@autra
Copy link
Contributor Author

autra commented Sep 28, 2024

@sikmir updated. I've put the geospatial team as maintainers of pygmt as well, while I was at it.

@autra
Copy link
Contributor Author

autra commented Sep 29, 2024

Drafting this until #340707 is merged.

@autra autra marked this pull request as draft September 29, 2024 16:38
@doronbehar
Copy link
Contributor

@autra would you like to close this? Or perhaps make the PR only be the adoption of the geospation team of the gmt package and related packages?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants