Skip to content

{scotch, mumps}: fix musl and static, remove perl by default #431612

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

LordGrimmauld
Copy link
Contributor

  • fixed scotch on static (was building shared libs unconditionally)
  • fixed scotch on musl by disabling PtScotch
    • (required an extra patch to fix the includes of sched.h)
    • PtScotch is broken, because mpi is broken on musl
  • fixed mumps on musl (scotch is no longer broken)
  • propagate withPtScotch override parameter to scotch

Happy side effect: If scotch is built without PtScotch, it does not indirectly depend on perl at runtime. This means maths-intensive things such as freecad are one step closer to run on a perlless system.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. labels Aug 6, 2025
@nix-owners nix-owners bot requested review from qbisi, bzizou and nim65s August 6, 2025 23:17
@LordGrimmauld LordGrimmauld added 6.topic: static Static builds (e.g. pkgsStatic) 0.kind: build failure A package fails to build 6.topic: musl Running or building packages with musl libc labels Aug 7, 2025
Copy link
Contributor

@nim65s nim65s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diff lgtm. review seems almost OK too:

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review
Commit: 134132b58d0ffe1c4d5ff5191852a6712174d17f


x86_64-linux

⏩ 6 packages marked as broken and skipped:
  • python312Packages.pydicom-seg
  • python312Packages.pydicom-seg.dist
  • python313Packages.mayavi
  • python313Packages.mayavi.dist
  • python313Packages.pydicom-seg
  • python313Packages.pydicom-seg.dist
❌ 14 packages failed to build:
  • pflotran
  • precice
  • python312Packages.fenics
  • python312Packages.fenics.dist
  • python312Packages.pymatgen
  • python312Packages.pymatgen.dist
  • python312Packages.pyprecice
  • python312Packages.pyprecice.dist
  • python312Packages.sumo
  • python312Packages.sumo.dist
  • python313Packages.fenics
  • python313Packages.fenics.dist
  • python313Packages.pyprecice
  • python313Packages.pyprecice.dist
✅ 290 packages built:
  • aligator
  • aligator.doc
  • ants
  • appcsxcad
  • bonmin
  • c3d
  • casadi
  • cloudcompare
  • crocoddyl
  • crocoddyl.doc
  • csxcad
  • dartsim
  • dolfinx
  • elastix
  • elmerfem
  • exhibit
  • expliot
  • expliot.dist
  • ezminc
  • f3d
  • f3d.man
  • freecad
  • gdcm
  • getdp
  • intensity-normalization (python313Packages.intensity-normalization)
  • intensity-normalization.dist (python313Packages.intensity-normalization.dist)
  • ipopt
  • itk
  • itk_5_2
  • libsForQt5.qcsxcad
  • libsForQt5.qcsxcad.dev
  • mim-solvers
  • mirtk
  • mrtrix
  • mumps
  • mumps-mpi
  • ndcurves
  • ndcurves.doc
  • octavePackages.dicom
  • openems
  • openturns
  • otb
  • pagmo2
  • pcl
  • petsc
  • pinocchio
  • pinocchio.doc
  • proxsuite-nlp
  • proxsuite-nlp.doc
  • python312Packages.aerosandbox
  • python312Packages.aerosandbox.dist
  • python312Packages.aligator
  • python312Packages.aligator.doc
  • python312Packages.casadi
  • python312Packages.crocoddyl
  • python312Packages.crocoddyl.doc
  • python312Packages.cyipopt
  • python312Packages.cyipopt.dist
  • python312Packages.dartsim
  • python312Packages.dcmstack
  • python312Packages.dcmstack.dist
  • python312Packages.deid
  • python312Packages.deid.dist
  • python312Packages.dicom-numpy
  • python312Packages.dicom-numpy.dist
  • python312Packages.dicom2nifti
  • python312Packages.dicom2nifti.dist
  • python312Packages.dicomweb-client
  • python312Packages.dicomweb-client.dist
  • python312Packages.dipy
  • python312Packages.dipy.dist
  • python312Packages.example-robot-data
  • python312Packages.example-robot-data.doc
  • python312Packages.f3d
  • python312Packages.f3d.man
  • python312Packages.fast-simplification
  • python312Packages.fast-simplification.dist
  • python312Packages.fenics-dolfinx
  • python312Packages.fenics-dolfinx.dist
  • python312Packages.firedrake
  • python312Packages.firedrake.dist
  • python312Packages.fslpy
  • python312Packages.fslpy.dist
  • python312Packages.gdcm
  • python312Packages.gstools
  • python312Packages.gstools.dist
  • python312Packages.heudiconv
  • python312Packages.heudiconv.dist
  • python312Packages.highdicom
  • python312Packages.highdicom.dist
  • python312Packages.intensity-normalization
  • python312Packages.intensity-normalization.dist
  • python312Packages.itk
  • python312Packages.mayavi
  • python312Packages.mayavi.dist
  • python312Packages.medpy
  • python312Packages.medpy.dist
  • python312Packages.medvol
  • python312Packages.medvol.dist
  • python312Packages.mim-solvers
  • python312Packages.napari-nifti
  • python312Packages.napari-nifti.dist
  • python312Packages.ndcurves
  • python312Packages.ndcurves.doc
  • python312Packages.neuralfoil
  • python312Packages.neuralfoil.dist
  • python312Packages.nibabel
  • python312Packages.nibabel.dist
  • python312Packages.nilearn
  • python312Packages.nilearn.dist
  • python312Packages.nipy
  • python312Packages.nipy.dist
  • python312Packages.nipype
  • python312Packages.nipype.dist
  • python312Packages.nitime
  • python312Packages.nitime.dist
  • python312Packages.nitransforms
  • python312Packages.nitransforms.dist
  • python312Packages.niworkflows
  • python312Packages.niworkflows.dist
  • python312Packages.openturns
  • python312Packages.petsc4py
  • python312Packages.pinocchio
  • python312Packages.pinocchio.doc
  • python312Packages.proxsuite-nlp
  • python312Packages.proxsuite-nlp.doc
  • python312Packages.pybids
  • python312Packages.pybids.dist
  • python312Packages.pydicom
  • python312Packages.pydicom.dist
  • python312Packages.pygmo
  • python312Packages.pykrige
  • python312Packages.pykrige.dist
  • python312Packages.pylibjpeg
  • python312Packages.pylibjpeg-openjpeg
  • python312Packages.pylibjpeg-openjpeg.dist
  • python312Packages.pylibjpeg.dist
  • python312Packages.pymedio
  • python312Packages.pymedio.dist
  • python312Packages.pynetdicom
  • python312Packages.pynetdicom.dist
  • python312Packages.pyorthanc
  • python312Packages.pyorthanc.dist
  • python312Packages.pyotb
  • python312Packages.pyotb.dist
  • python312Packages.pyradiomics
  • python312Packages.pyradiomics.dist
  • python312Packages.python-csxcad
  • python312Packages.python-csxcad.dist
  • python312Packages.python-openems
  • python312Packages.python-openems.dist
  • python312Packages.pyvista
  • python312Packages.pyvista.dist
  • python312Packages.sfepy
  • python312Packages.sfepy.dist
  • python312Packages.simpleitk
  • python312Packages.simpleitk.dist
  • python312Packages.slepc4py
  • python312Packages.templateflow
  • python312Packages.templateflow.dist
  • python312Packages.torchio
  • python312Packages.torchio.dist
  • python312Packages.trx-python
  • python312Packages.trx-python.dist
  • python312Packages.tsid
  • python312Packages.tsid.doc
  • python312Packages.vtk
  • python312Packages.xnatpy
  • python312Packages.xnatpy.dist
  • python313Packages.aerosandbox
  • python313Packages.aerosandbox.dist
  • python313Packages.aligator
  • python313Packages.aligator.doc
  • python313Packages.casadi
  • python313Packages.crocoddyl
  • python313Packages.crocoddyl.doc
  • python313Packages.cyipopt
  • python313Packages.cyipopt.dist
  • python313Packages.dartsim
  • python313Packages.dcmstack
  • python313Packages.dcmstack.dist
  • python313Packages.deid
  • python313Packages.deid.dist
  • python313Packages.dicom-numpy
  • python313Packages.dicom-numpy.dist
  • python313Packages.dicom2nifti
  • python313Packages.dicom2nifti.dist
  • python313Packages.dicomweb-client
  • python313Packages.dicomweb-client.dist
  • python313Packages.dipy
  • python313Packages.dipy.dist
  • python313Packages.example-robot-data
  • python313Packages.example-robot-data.doc
  • python313Packages.f3d
  • python313Packages.f3d.man
  • python313Packages.fast-simplification
  • python313Packages.fast-simplification.dist
  • python313Packages.fenics-dolfinx
  • python313Packages.fenics-dolfinx.dist
  • python313Packages.firedrake
  • python313Packages.firedrake.dist
  • python313Packages.fslpy
  • python313Packages.fslpy.dist
  • python313Packages.gdcm
  • python313Packages.gstools
  • python313Packages.gstools.dist
  • python313Packages.highdicom
  • python313Packages.highdicom.dist
  • python313Packages.itk
  • python313Packages.medpy
  • python313Packages.medpy.dist
  • python313Packages.medvol
  • python313Packages.medvol.dist
  • python313Packages.mim-solvers
  • python313Packages.napari-nifti
  • python313Packages.napari-nifti.dist
  • python313Packages.ndcurves
  • python313Packages.ndcurves.doc
  • python313Packages.neuralfoil
  • python313Packages.neuralfoil.dist
  • python313Packages.nibabel
  • python313Packages.nibabel.dist
  • python313Packages.nilearn
  • python313Packages.nilearn.dist
  • python313Packages.nipy
  • python313Packages.nipy.dist
  • python313Packages.nitime
  • python313Packages.nitime.dist
  • python313Packages.nitransforms
  • python313Packages.nitransforms.dist
  • python313Packages.openturns
  • python313Packages.petsc4py
  • python313Packages.pinocchio
  • python313Packages.pinocchio.doc
  • python313Packages.proxsuite-nlp
  • python313Packages.proxsuite-nlp.doc
  • python313Packages.pybids
  • python313Packages.pybids.dist
  • python313Packages.pydicom
  • python313Packages.pydicom.dist
  • python313Packages.pygmo
  • python313Packages.pykrige
  • python313Packages.pykrige.dist
  • python313Packages.pylibjpeg
  • python313Packages.pylibjpeg-openjpeg
  • python313Packages.pylibjpeg-openjpeg.dist
  • python313Packages.pylibjpeg.dist
  • python313Packages.pymedio
  • python313Packages.pymedio.dist
  • python313Packages.pynetdicom
  • python313Packages.pynetdicom.dist
  • python313Packages.pyorthanc
  • python313Packages.pyorthanc.dist
  • python313Packages.pyotb
  • python313Packages.pyotb.dist
  • python313Packages.pyradiomics
  • python313Packages.pyradiomics.dist
  • python313Packages.python-csxcad
  • python313Packages.python-csxcad.dist
  • python313Packages.pyvista
  • python313Packages.pyvista.dist
  • python313Packages.simpleitk
  • python313Packages.simpleitk.dist
  • python313Packages.slepc4py
  • python313Packages.templateflow
  • python313Packages.templateflow.dist
  • python313Packages.torchio
  • python313Packages.torchio.dist
  • python313Packages.trx-python
  • python313Packages.trx-python.dist
  • python313Packages.tsid
  • python313Packages.tsid.doc
  • vtk-full (python313Packages.vtk)
  • python313Packages.xnatpy
  • python313Packages.xnatpy.dist
  • rtabmap
  • scipopt-gcg
  • scipopt-scip
  • scipopt-ug
  • scotch
  • scotch.bin
  • scotch.dev
  • simpleitk
  • slepc
  • therion
  • tsid
  • tsid.doc
  • vtk
  • vtkWithQt5
  • vtkWithQt6

pymatgen is fine on hydra but has 1 repetable test failure on my side:

python3.12-pymatgen> =================================== FAILURES ===================================
python3.12-pymatgen> _____________________ TestHeisenbergMapper.test_get_igraph _____________________
python3.12-pymatgen> [gw6] linux -- Python 3.12.11 /nix/store/2i76abyx06asxr2k3rgsp8zx647qj38h-python3-3.12.11/bin/python3.12
python3.12-pymatgen> self = <analysis.magnetism.test_heisenberg.TestHeisenbergMapper object at 0x7ffd80e250d0>
python3.12-pymatgen>     def test_get_igraph(self):
python3.12-pymatgen>         for hm in self.hms:
python3.12-pymatgen> >           igraph = hm.get_interaction_graph()
python3.12-pymatgen> /build/source/tests/analysis/magnetism/test_heisenberg.py:69:
python3.12-pymatgen> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
python3.12-pymatgen> self = <pymatgen.analysis.magnetism.heisenberg.HeisenbergMapper object at 0x7ffd76432ae0>
python3.12-pymatgen> filename = None
python3.12-pymatgen>     def get_interaction_graph(self, filename=None):
python3.12-pymatgen>         """Get a StructureGraph with edges and weights that correspond to exchange
python3.12-pymatgen>         interactions and J_ij values, respectively.
python3.12-pymatgen>     
python3.12-pymatgen>         Args:
python3.12-pymatgen>             filename (str): if not None, save interaction graph to filename.
python3.12-pymatgen>     
python3.12-pymatgen>         Returns:
python3.12-pymatgen>             StructureGraph: Exchange interaction graph.
python3.12-pymatgen>         """
python3.12-pymatgen>         structure = self.ordered_structures[0]
python3.12-pymatgen>         sgraph = self.sgraphs[0]
python3.12-pymatgen>     
python3.12-pymatgen>         igraph = StructureGraph.from_empty_graph(
python3.12-pymatgen>             structure, edge_weight_name="exchange_constant", edge_weight_units="meV"
python3.12-pymatgen>         )
python3.12-pymatgen>     
python3.12-pymatgen> >       if "<J>" in self.ex_params:  # Only <J> is available
python3.12-pymatgen> E       TypeError: argument of type 'NoneType' is not iterable
python3.12-pymatgen> /nix/store/m8yi1rb3v7xikna4y6r93p3c8xl3zvnl-python3.12-pymatgen-2025.6.14/lib/python3.12/site-packages/pymatgen/analysis/magnetism/heisenberg.py:550: TypeError

Not sure if related though

@LordGrimmauld
Copy link
Contributor Author

pymatgen is broken on python 3.13. With python 3.14 becoming a thing soon (and 3.12 being dropped then), i don't think that break is super critical. But just to be sure, i'll run the build on master again.

Copy link
Contributor

@nim65s nim65s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fenics and precice are already broken on hydra, so no worry about those.
And you are right about pymatgen and python versions I think.

Thanks !

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Aug 7, 2025
@LordGrimmauld
Copy link
Contributor Author

Actually, pymatgen succeeds on my local machine, even on this PR. I suspect there are build impurities at play. Maybe tests fail on low RAM? not sure, but whatever the case i don't think it is actually truly broken.

flex
]
++ lib.optionals withPtScotch [
mpi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mpi is essentialy a buildInput by providing linking library -lmpi, though cmake find its library via checking mpicc/mpiexec in the path.
I would suggest not using strictdeps and put mpi in buildInputs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

honestly i have to disagree. If things are broken with strictDeps, then they should be fixed. Removing strictDeps shouldn't be the solution, especially because there are efforts to make strict deps a global default.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not against using strictdeps, but we should resolve the dependency of mpi first. Current status of this pr: mpi as a nativeBuildInput is in the nar closure of scotch. It's common we have nativeBuildInputs bash/perl in the nar closure since we patch SheBang, but is it good with nativeBuildInputs mpi if we actually link to libmpi.so?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it'd very much explode on cross. But i am not sure how to fix this properly.. Maybe our resident strictDeps @quantenzitrone has some insights?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't really know a lot about strictDeps
however according to cmake docs, if i understand them correctly (i have never worked with cmake), we should be able to fix this by setting MPI_HOME

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wait sorry, i confused you with someone else, sorry! Should have done the PR lookup. I meant @FliegendeWurst, the other nix human i met at GPN! Sorry for the noise...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But i'll look into MPI_HOME, that is still a good pointer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the thing that has me confused: openmpi supplies things like mpiCC, which is a C compiler. It already does some tricks to provide the correct compiler with the right target platform. But then its linking libraries... I also can't seem to make it work setting MPI_HOME.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i also tried around a bit and neither MPI_HOME as cmakeFlag or environment variable nor MPI_C_LIBRARIES and MPI_C_ADDITIONAL_INCLUDE_DIRS seem to work

@@ -10,6 +10,7 @@
stdenv,
zlib,
xz,
withPtScotch ? !stdenv.hostPlatform.isMusl,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we make ptscotch a separate variant of scotch by setting the make target?
This approach should involve treewide change in mumps/petsc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we cant. scotch is build always, because PtScotch depends on it. There is no supported way to build just ptscotch.

Copy link
Contributor

@qbisi qbisi Aug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need either

mpiSupport ? lib.meta.availableOn stdenv.hostPlatform mpi,
withPtScotch? mpiSupport,

or

diff --git a/pkgs/by-name/pe/petsc/package.nix b/pkgs/by-name/pe/petsc/package.nix
index 8a2d78fc3226..417559da86e5 100644
--- a/pkgs/by-name/pe/petsc/package.nix
+++ b/pkgs/by-name/pe/petsc/package.nix
@@ -27,10 +27,10 @@
   # External libraries options
   withHdf5 ? withCommonDeps,
   withMetis ? withCommonDeps,
-  withZlib ? (withP4est || withPtscotch),
+  withZlib ? (withP4est || withPtScotch),
   withScalapack ? withCommonDeps && mpiSupport,
   withParmetis ? withFullDeps, # parmetis is unfree
-  withPtscotch ? withCommonDeps && mpiSupport,
+  withPtScotch ? withCommonDeps && mpiSupport,
   withMumps ? withCommonDeps,
   withP4est ? withFullDeps,
   withHypre ? withCommonDeps && mpiSupport,
@@ -68,7 +68,7 @@ assert withP4est -> (mpiSupport && withZlib);
 # Package parmetis depend on metis and mpi support
 assert withParmetis -> (withMetis && mpiSupport);
 
-assert withPtscotch -> (mpiSupport && withZlib);
+assert withPtScotch -> (mpiSupport && withZlib);
 assert withScalapack -> mpiSupport;
 assert (withMumps && mpiSupport) -> withScalapack;
 assert withHypre -> mpiSupport;
@@ -82,6 +82,7 @@ let
       python3Packages
       # global override options
       mpiSupport
+      withPtScotch
       fortranSupport
       pythonSupport
       precision
@@ -141,7 +142,7 @@ stdenv.mkDerivation (finalAttrs: {
   ++ lib.optional withP4est petscPackages.p4est
   ++ lib.optional withMetis petscPackages.metis
   ++ lib.optional withParmetis petscPackages.parmetis
-  ++ lib.optional withPtscotch petscPackages.scotch
+  ++ lib.optional withPtScotch petscPackages.scotch
   ++ lib.optional withScalapack petscPackages.scalapack
   ++ lib.optional withMumps petscPackages.mumps
   ++ lib.optional withHypre petscPackages.hypre
@@ -192,7 +193,7 @@ stdenv.mkDerivation (finalAttrs: {
   ++ lib.optional pythonSupport "--with-petsc4py=1"
   ++ lib.optional withMetis "--with-metis=1"
   ++ lib.optional withParmetis "--with-parmetis=1"
-  ++ lib.optional withPtscotch "--with-ptscotch=1"
+  ++ lib.optional withPtScotch "--with-ptscotch=1"
   ++ lib.optional withScalapack "--with-scalapack=1"
   ++ lib.optional withMumps "--with-mumps=1"
   ++ lib.optional (withMumps && !mpiSupport) "--with-mumps-serial=1"

to make petsc.petscPackages.scotch in consistent with petsc.petscPackages.mumps

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What the hell is petscPackages? This is the first time i am hearing about it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Further: mpi is broken on musl, because libpsm2 is broken on musl. lib.meta.availableOn does not return false if something is broken, and it certainly does not return false if a dependency of something is broken. It only respects badPlatforms of the package itself. We do not have a way to do badPlatforms for musl afaik.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also i'd rather not change the override interface here. That sounds like a bad idea asking for peoples overrides to explode.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did add f2390fb, which fixes pkgsMusl.petsc.petscPackages.mumps and pkgsMusl.petsc.petscPackages.scotch. But i will not change the override interface, and i will not switch to availableOn because it doesn't work for this.

@@ -17,9 +17,12 @@
withParmetis ? false, # default to false due to unfree license
withPtScotch ? mpiSupport,
}:

assert mpiSupport -> !stdenv.hostPlatform.isMusl;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If openmpi is broken on musl, we can mark it broken when stdenv.hostPlatform.isMusl and use lib.meta.availableOn stdenv.hostPlatform mpi here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually we can probably delete this assert completely. mpi is already marked broken (by transitive dep)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as #431612 (comment). availableOn does not really work here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually we can probably delete this assert completely

Then let's just remove it? Or add a comment explaining why so we know to remove it later when mpi is fixed.

@nixpkgs-ci nixpkgs-ci bot removed the 6.topic: musl Running or building packages with musl libc label Aug 8, 2025
@LordGrimmauld LordGrimmauld added the 6.topic: musl Running or building packages with musl libc label Aug 8, 2025
mumps = self.callPackage mumps.override {
withPtScotch = withPtscotch;
inherit mpiSupport;
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you fix withPtscotch-> withPtScotch in petsc and inherit withPtScotch in petscPackages, then you dont have to set extra override arguments (e.g here inherit mpiSupport; in petscPackages.mumps is redundant since self.callPackages will pass mpiSupport to mumps)

Copy link
Contributor Author

@LordGrimmauld LordGrimmauld Aug 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As i said, that would break the override interface of petsc, on which people might be relying. I see no good reason to actively break peoples setup with a somewhat pointless rename like this. See #431612 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am also not super convinced callPackage is the best approach here, it probably should be override. But that is a different topic, and would balloon this PR out of proportion.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, just remove this commit in petsc, i will open a pr fixing it seprately.

@nixpkgs-ci nixpkgs-ci bot removed the 6.topic: musl Running or building packages with musl libc label Aug 8, 2025
assert withParmetis -> mpiSupport;
assert withPtScotch -> mpiSupport;
let
scotch' = scotch.override { inherit withPtScotch; };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we needs the overridden Scotch here — for pkgsMusl.mumps or mumps?
IMO whether the package Scotch should be built with PtScotch by default is handled on each platform, so we don’t need the override.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

openmpi is introducing a perl dependency. If we build mumps without PtScotch, we shouldn't add it to scotch to avoid that perl dependency in runtime closure. In fact this was my key motivation to even start looking into this! This should stay for the sake of perlless-ness.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, we need to minimize the closure size of mumps/scotch when we dont need mpi. Now only petsc/mumps depend on scotch, I will open a pr to set withPtScotch by default false.

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Aug 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: build failure A package fails to build 6.topic: static Static builds (e.g. pkgsStatic) 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants