Skip to content

sage.lib, sage.test: clang-19 / darwin fixes#370822

Merged
collares merged 2 commits intoNixOS:masterfrom
paparodeo:sage-fixes-darwin
Jan 4, 2025
Merged

sage.lib, sage.test: clang-19 / darwin fixes#370822
collares merged 2 commits intoNixOS:masterfrom
paparodeo:sage-fixes-darwin

Conversation

@paparodeo
Copy link
Contributor

@paparodeo paparodeo commented Jan 4, 2025

adds NIX_CFLAGS_COMPILE = "-Wno-error=c++11-narrowing-const-reference"; to workaround sagemath/sage#39249

and some changes in sage.test to allow tests to succeed in sandbox.

once #370545 is merged sage should compile on darwin again (running now, have build with this change and a different lcalc fix).

given sage builds singular with a flint3 without blas the link error in that is seen in standalone singular https://hydra.nixos.org/build/283880696 does not exist. (I have various fixes for it but no need to hold off fixing sage for them)

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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

`https://github.com/sagemath/sage/pull/39249`

The v_index type is an integer and in the code there are lots of places where
the significant bytes of an 8 byte type are lost in assignment. However, this
is the only one which causes an error. A workaround is to ignore the error or
to preform the assignment outside of the initializer list.
@github-actions github-actions bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jan 4, 2025
@collares
Copy link
Member

collares commented Jan 4, 2025

Thanks, this is really great! Assuming running r("1+1") in Sage during normal execution doesn't show any locale warnings in Darwin, this is ready to merge.

By the way, one tangentially-related question since you have the hardware to test it (obviously this won't block this PR): We currently have a patch disabling some Singular doctests on Clang due to stack overflows (patches/disable-singular-doctest.patch, imported in sage-src.nix). Do you know if this patch is still needed?

@paparodeo
Copy link
Contributor Author

Thanks, this is really great! Assuming running r("1+1") in Sage during normal execution doesn't show any locale warnings in Darwin, this is ready to merge.

from an older sage using lcalc namespace

sage: r("1+1")
[1] 2

By the way, one tangentially-related question since you have the hardware to test it (obviously this won't block this PR): We currently have a patch disabling some Singular doctests on Clang due to stack overflows (patches/disable-singular-doctest.patch, imported in sage-src.nix). Do you know if this patch is still needed?

building now. unfortunately removing the patch requires a sagelib rebuild.

@collares
Copy link
Member

collares commented Jan 4, 2025

building now. unfortunately removing the patch requires a sagelib rebuild.

Thank you very much! This won't block the present PR, of course. Merging.

@collares collares merged commit 5729347 into NixOS:master Jan 4, 2025
45 checks passed
@paparodeo paparodeo deleted the sage-fixes-darwin branch January 4, 2025 11:42
@paparodeo
Copy link
Contributor Author

By the way, one tangentially-related question since you have the hardware to test it (obviously this won't block this PR): We currently have a patch disabling some Singular doctests on Clang due to stack overflows (patches/disable-singular-doctest.patch, imported in sage-src.nix). Do you know if this patch is still needed?

the patch is still needed, unfortunately

@collares
Copy link
Member

collares commented Jan 4, 2025

Thanks for checking!

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

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants