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
[WIP] sage: Add darwin support #45364
Conversation
The equivalent log line from the linux build is
I'm honestly a bit surprised how that works because the openblas lib dir is not passed to the linker. Anyways I think the important difference is |
@@ -91,7 +91,8 @@ stdenv.mkDerivation rec { | |||
license = licenses.gpl3Plus; | |||
## xcas is buildable on darwin but there are specific instructions I could | |||
## not test | |||
platforms = platforms.linux; | |||
## ^^ not sure what this means |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@symphorien do you remember what you meant by that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that was a note that I wanted to discuss that comment above about xcas
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OSX is supported as per https://www-fourier.ujf-grenoble.fr/~parisse/giac_compile.html
but the compilation process is said to be different: quote:
Notes for compilation on Mac OS X. For recent versions of giac (>=0.9.x) on Mac OS X.6 run the script mkosx.
So I thought the derivation would not work as such on osx and would require more work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If xcas works as is on darwin, you can just remove the comment.
There are like three or four dependencies with openblas in the name, a few of which seem to have to do with |
Those provide different pkg-config files for openblas, see #45257. If you want to switch to blas completely, you probably would have to provide equivalents of those for blas. For now I'd just try to add blas in addition to openblas. Its not pretty but it might work (its only needed to compile the cython files interfacing with linbox). |
Also I think openblas and atlas are the only two officially supported blas implementations by sage. So not sure if plain blas would work. |
@jbaum98 are you still interested in this? |
I am, I haven't had much time to work on it though. What was the decision on the blas thing? |
What decision? |
Regarding the blas thing I would recommend to try if the plain sage package (which currently doesn't run any tests) also fails the fflas_ffpack tests. If not, compare differences in build. If yes, just disable checks on darwin for now (it is reported upstream and nobody has noticed yet so it cannot be too serious). |
Are there any updates on this pull request, please? |
Sorry, this fell off my radar. I may be able to take another crack at it in a few weeks, but I started this because I needed to use sage, and I don't anymore. |
While full darwin support for sage would be nice of course, isn't the part in this PR basically ready? |
Yes, assuming those packages (still) work reasonably on darwin... |
@jbaum98 are you up to a rebase and a re-test? |
For sure. I won't be able to do it for another week or two because I don't have a Mac machine available right now. |
I did a rebase and now it's stuck building
This particular issue seems to have a straightforward fix, but I can't say if I'll have time to work on this for a bit. I feel like this isn't the issue I was stuck on last time, but to be honest I don't remember that well. |
libgap was an unreachable file, so I removed it in 252a30e. @GrahamcOfBorg build gap giac lrcalc nauty |
The merge conflict was blocking the builds, I presume, so let me try again: @GrahamcOfBorg build gap giac lrcalc nauty |
If I read Borg right, the only build failures are |
vcunat amended the commit a bit; see the PR for details/discussion.
Right, libgap is outdated.
In that case should we just leave out the gap and sympow parts for now? |
Yes, that's what I did last weekend; Hydra: https://hydra.nixos.org/eval/1542673#tabs-new |
vcunat amended the commit a bit; see the PR for details/discussion. (cherry picked from commit 991c0e1)
By the way I'm still interested in getting sage to run on darwin. As far as I'm aware, there is currently no good way for a mac user to install sage without building it from source. So this could help a lot of people. If anyone wants to take a shot, feel free to reach out either by opening a new nixpkgs issue or messaging me on IRC/matrix. |
Motivation for this change
I want
sage
to build ondarwin
. Lot's of packages just need their platforms updated.Right now, I'm having trouble getting
sagelib
to build, failing with an errorI know it's
blas
related, but there's a lot ofblas
stuff going on inpkgs/applications/science/math/sage/sagelib.nix
. @timokau any thoughts?Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)