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

python311Packages.scs: fix build; 3.2.3 -> 3.2.4 #268178

Merged
merged 3 commits into from Nov 19, 2023
Merged

python311Packages.scs: fix build; 3.2.3 -> 3.2.4 #268178

merged 3 commits into from Nov 19, 2023

Conversation

ghost
Copy link

@ghost ghost commented Nov 17, 2023

numpy change 1.25.1 -> 1.26.1 237a590 moved away from distutils and the scs build was unable to locate the blas and lapack libs and failed.

this change fixes the build by adding env vars so the build can locate the blas lapack libs for linux and the Accelerate lib for darwin. scs is then updated to 3.2.4. incorporates upstream PR bodono/scs-python#78 to use pkg-config and add myself as maintainer so i can remove the patches on the next version update.

Note that the linear algebra library for darwin is Accelerate as that is prioritized over blas / lapack by the build.

https://hydra.nixos.org/build/241138404
ZHF: #265948

bambi failures due to numpy < 1.26 constraints in pytensor

Result of nixpkgs-review run on x86_64-linux 1

28 packages marked as broken and skipped:
  • python310Packages.qiskit
  • python310Packages.qiskit-aer
  • python310Packages.qiskit-aer.dist
  • python310Packages.qiskit-finance
  • python310Packages.qiskit-finance.dist
  • python310Packages.qiskit-ibmq-provider
  • python310Packages.qiskit-ibmq-provider.dist
  • python310Packages.qiskit-ignis
  • python310Packages.qiskit-ignis.dist
  • python310Packages.qiskit-nature
  • python310Packages.qiskit-nature.dist
  • python310Packages.qiskit-optimization
  • python310Packages.qiskit-optimization.dist
  • python310Packages.qiskit.dist
  • python311Packages.qiskit
  • python311Packages.qiskit-aer
  • python311Packages.qiskit-aer.dist
  • python311Packages.qiskit-finance
  • python311Packages.qiskit-finance.dist
  • python311Packages.qiskit-ibmq-provider
  • python311Packages.qiskit-ibmq-provider.dist
  • python311Packages.qiskit-ignis
  • python311Packages.qiskit-ignis.dist
  • python311Packages.qiskit-nature
  • python311Packages.qiskit-nature.dist
  • python311Packages.qiskit-optimization
  • python311Packages.qiskit-optimization.dist
  • python311Packages.qiskit.dist
4 packages failed to build:
  • python310Packages.bambi
  • python310Packages.bambi.dist
  • python311Packages.bambi
  • python311Packages.bambi.dist
24 packages built:
  • python310Packages.blackjax
  • python310Packages.blackjax.dist
  • python310Packages.cvxpy
  • python310Packages.cvxpy.dist
  • python310Packages.jaxopt
  • python310Packages.jaxopt.dist
  • python310Packages.qpsolvers
  • python310Packages.qpsolvers.dist
  • python310Packages.qutip
  • python310Packages.qutip.dist
  • python310Packages.scs
  • python310Packages.scs.dist
  • python311Packages.blackjax
  • python311Packages.blackjax.dist
  • python311Packages.cvxpy
  • python311Packages.cvxpy.dist
  • python311Packages.jaxopt
  • python311Packages.jaxopt.dist
  • python311Packages.qpsolvers
  • python311Packages.qpsolvers.dist
  • python311Packages.qutip
  • python311Packages.qutip.dist
  • python311Packages.scs
  • python311Packages.scs.dist

Description of changes

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/)
  • 23.11 Release Notes (or backporting 23.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.

@ghost ghost marked this pull request as draft November 17, 2023 21:22
@ghost ghost marked this pull request as ready for review November 17, 2023 21:47
@ofborg ofborg bot requested a review from drewrisinger November 18, 2023 00:37
@ghost ghost marked this pull request as draft November 18, 2023 03:03
@mweinelt
Copy link
Member

Annoying that they don't use pkg-config for that.

@ghost
Copy link
Author

ghost commented Nov 18, 2023

cc @renesat given past changes

@ghost ghost marked this pull request as ready for review November 18, 2023 11:44
@ghost
Copy link
Author

ghost commented Nov 18, 2023

Annoying that they don't use pkg-config for that.

yeah -- i don't know meson well, but changing cc.find_library -> dependency and adding pkg-config works well on linux -- no env vars needed.

@mweinelt
Copy link
Member

That might be a good thing to propose upstream, if you're interested.

@ghost
Copy link
Author

ghost commented Nov 18, 2023

That might be a good thing to propose upstream, if you're interested.

proposed -- doesn't work with their CI for some reason. I was hoping dependency would fall back to find_library, but it doesn't seem to.

@ghost ghost changed the title python311Packages.scs: add BLAS & LAPACK env vars; fix build python311Packages.scs: fix build; 3.2.3 -> 3.2.4 Nov 18, 2023
annalee added 3 commits November 19, 2023 00:11
after numpy updated to 1.26.1 distutils no longer provides the lib
locations so use env vars for non-darwin. On darwin Accelerate library
is prioritized over BLAS so add Accelerate to buildInputs.
@mweinelt
Copy link
Member

Awesome work!

@mweinelt mweinelt merged commit 3fe4f79 into NixOS:master Nov 19, 2023
5 checks passed
@ghost ghost deleted the scs-blas-lapack-fix branch November 19, 2023 00:47
@ghost ghost added the 0.kind: ZHF Fixes Fixes during the Zero Hydra Failures (ZHF) campaign label Nov 19, 2023
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.

1 participant