Skip to content

Conversation

tobiasdiez
Copy link
Contributor

@tobiasdiez tobiasdiez commented Oct 28, 2024

The goal of this PR is to provide a native Windows build of Sage using MSVC (using the new Meson build system).

Instructions on how to test are under the Windows tab at https://doc-pr-38872--sagemath.netlify.app/html/en/installation/meson.
Afterwards, you should be able to import some sage modules in a normal python install (but most modules actually don't properly import due to various errors that will be fixed peu a peu in follow-up PRs)

State of Windows support of dependencies

Conda Issues:

Upstream issues

Singular

Flint:

Cysignals:

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

Copy link

github-actions bot commented Oct 28, 2024

Documentation preview for this PR (built with commit 0c51e81; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

../src/sage/symbolic/ginac/upoly-ginac.cpp(219): error C2440: '<function-style-cast>': cannot convert from 'size_t' to 'GiNaC::numeric'
../src/sage/symbolic/ginac/upoly-ginac.cpp(219): note: 'GiNaC::numeric::numeric': ambiguous call to overloaded function
../src/sage/symbolic/ginac/archive.cpp(584): error C2039: 'mem_fun_ref': is not a member of 'std'
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\sstream(19): note: see declaration of 'std'
../src/sage/symbolic/ginac/archive.cpp(584): error C3861: 'mem_fun_ref': identifier not found
../src/sage/symbolic/ginac/archive.cpp(584): error C2672: 'for_each': no matching overloaded function found
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\xkeycheck.h(341): warning C4005: 'register': macro redefinition
../src/sage/symbolic/ginac/constant.cpp(23): note: see previous definition of 'register'
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\xkeycheck.h(343): fatal error C1189: #error:  The C++ Standard Library forbids macroizing the keyword "register". Enable warning C4005 to find the forbidden define.
ginac_lst.cpp.obj : error LNK2005: "protected: static void const * __cdecl GiNaC::container<class std::list>::get_tinfo(void)" (?get_tinfo@?$container@Vlist@std@@@ginac@@KAPEBXXZ) already defined in meson-generated_src_sage_symbolic_expression.pyx.cpp.obj
Some of them should perhaps be reverted
`os.uname` is not available on Windows
@dimpase
Copy link
Member

dimpase commented Apr 3, 2025

you should merge/rebase over, whatever you prefer, the latest development branch

@tobiasdiez
Copy link
Contributor Author

you should merge/rebase over, whatever you prefer, the latest development branch

I did this yesterday.

@tobiasdiez
Copy link
Contributor Author

The relevant CI tests are green again.

@dimpase
Copy link
Member

dimpase commented May 15, 2025

@ptrrsn - this is the Windows build I mentioned. @tobiasdiez can point you at related issues and PRs - this is not what I myself am familiar with.

CITATION.cff Outdated
Copy link
Member

Choose a reason for hiding this comment

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

Something is fishy with your rebase here
The versions should not go backwards

@vbraun vbraun merged commit d95a16a into sagemath:develop May 18, 2025
12 of 24 checks passed
@ptrrsn
Copy link
Contributor

ptrrsn commented Jun 21, 2025

By the way, I created a PR for a native Windows build for m4ri (as can be found above), and some PRs to help build GAP on MinGW.

@dimpase
Copy link
Member

dimpase commented Jun 22, 2025

@ptrrsn - please Cc me on these PRs.

Sorry for a strange turn of the interaction on the GAP's PR - it's not the first time there.

@ptrrsn
Copy link
Contributor

ptrrsn commented Jun 22, 2025

@dimpase - Thank you for your comments! I just cc'd you on the PRs (including the closed ones). The m4ri one is pretty much done. I will continue working on the GAP native Windows build and probably one or some of the other dependencies mentioned here that do not have a native Windows build yet.

@tobiasdiez tobiasdiez deleted the meson-win branch June 22, 2025 16:40
@tobiasdiez
Copy link
Contributor Author

@ptrrsn This is awesome! Thanks for your effort! Once a package builds nicely on Windows, please ping me (either here on in the relevant PR) and I'll help to publish the Windows-version as conda packages.

@ptrrsn
Copy link
Contributor

ptrrsn commented Jun 25, 2025

@tobiasdiez m4ri now supports MinGW on the master branch.

@tobiasdiez
Copy link
Contributor Author

Awesome!

@ptrrsn
Copy link
Contributor

ptrrsn commented Jun 26, 2025

I also added a PR to update MinGW build instructions and added a MinGW CI to m4rie. Aside from GAP (which I am still working on, and an active PR is being reviewed), do we have anything else here that I can help with?

@ptrrsn
Copy link
Contributor

ptrrsn commented Jun 26, 2025

For m4rie, you can already build the Windows version after m4ri works just by following the instructions in that PR above (or following the CI yml file).

@tobiasdiez
Copy link
Contributor Author

@ptrrsn In principle, all dependencies/packages that are currently excluded on windows (https://github.com/search?q=repo%3Asagemath%2Fsage%20is_windows&type=code) needs work. Some of them actually compile fine on Windows, but are not yet available on conda-forge.

The 'biggest' ones are probably gap, cypari2, singular and maxima (conda-forge/maxima-feedstock#38).

@ptrrsn
Copy link
Contributor

ptrrsn commented Jun 28, 2025

Thank you. By the way, m4rie PR was also merged (it can build cleaner now on MinGW).

@dimpase
Copy link
Member

dimpase commented Jun 28, 2025

cypari2 might benefit from a general update, as it has a somewhat broken memory design, leading to memory leaks.

regarding maxima - I thought ecl does work on Windows.

Singular has a rather complicated dynamic libraries setup, building internal dynamic libraries, other than that it's C++.

@ptrrsn
Copy link
Contributor

ptrrsn commented Jun 28, 2025

@dimpase Do you mind to give me the related issues or PRs on the cypari2 memory problems? Maybe I can help with the memory redesign.

@dimpase
Copy link
Member

dimpase commented Jun 28, 2025

@ptrrsn see sagemath/cypari2#112

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants