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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

mapserver: fix build with libxml2 2.12 #279418

Merged
merged 1 commit into from Jan 10, 2024
Merged

Conversation

imincik
Copy link
Contributor

@imincik imincik commented Jan 7, 2024

Description of changes

Fix mapserver build with libxml2 2.12.

This PR is based on MapServer/MapServer#6975 ,
which can't be applied without other patches.

Required for #275620

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.05 Release Notes (or backporting 23.05 and 23.11 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.

@drupol
Copy link
Contributor

drupol commented Jan 7, 2024

Can't you use this URL instead: https://github.com/MapServer/MapServer/commit/2c1d4f928b9657dbb4517ecbfc8cac30cc73ae9f.patch ?

@imincik
Copy link
Contributor Author

imincik commented Jan 7, 2024

Can't you use this URL instead: https://github.com/MapServer/MapServer/commit/2c1d4f928b9657dbb4517ecbfc8cac30cc73ae9f.patch ?

This was my first attempt, but

    (fetchpatch {
      url = "https://github.com/MapServer/MapServer/commit/2c1d4f928b9657dbb4517ecbfc8cac30cc73ae9f.patch";
      hash = "sha256-Muar7NU7sQ/bhYF+Sg/JXOCNjpvOfIZw4YYgrjBb1N4=";
    })

failed on

Running phase: patchPhase
applying patch /nix/store/jhr0spcjk9y25jysrkxb460if8abadjn-2c1d4f928b9657dbb4517ecbfc8cac30cc73ae9f.patch
patching file mapows.c
Hunk #1 FAILED at 162.
1 out of 1 hunk FAILED -- saving rejects to file mapows.c.rej
patching file mapwcs.cpp
Hunk #1 FAILED at 383.
1 out of 1 hunk FAILED -- saving rejects to file mapwcs.cpp.rej
patching file mapwcs20.cpp
Hunk #1 FAILED at 1459.
1 out of 1 hunk FAILED -- saving rejects to file mapwcs20.cpp.rej

I am actually not sure why.

@drupol
Copy link
Contributor

drupol commented Jan 7, 2024

Most probably that patches has been added in the meantime on the development branch.

Anyway, your PR LGTM.

@jtojnar

This comment was marked as resolved.

@imincik
Copy link
Contributor Author

imincik commented Jan 8, 2024

@jtojnar , is it failing only on Darwin ? Bot Linux a Darwin builds of this PR are successful and the error message doesn't look related to this PR.

@jtojnar
Copy link
Contributor

jtojnar commented Jan 8, 2024

IIRC, the prerequisite is Clang 16. You can try replacing stdenv with llvmPackages_16.stdenv.

@imincik
Copy link
Contributor Author

imincik commented Jan 8, 2024

Do you mean keep using clang 15 by changing

--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -27559,7 +27559,9 @@ with pkgs;

   mapproxy = callPackage ../servers/geospatial/mapproxy { };

-  mapserver = callPackage ../servers/geospatial/mapserver { };
+  mapserver = callPackage ../servers/geospatial/mapserver {
+    stdenv = if stdenv.isDarwin then overrideLibcxx llvmPackages_15.stdenv else stdenv;
+  };

Sorry, I am not Darwin user.

@jtojnar
Copy link
Contributor

jtojnar commented Jan 8, 2024

Actually, it might be that mapserver just has bad platform detection or something. I can reproduce the same error with clangStdenv on master. I retract my objection.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/week-in-geospatial-team/37035/2

@sikmir
Copy link
Member

sikmir commented Jan 9, 2024

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

1 package built:
  • mapserver

@imincik imincik merged commit cf53751 into master Jan 10, 2024
30 checks passed
@imincik imincik deleted the mapserver-fix-libxml2.12 branch January 10, 2024 08:27
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/week-in-geospatial-team/37035/3

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.

None yet

6 participants