-
-
Notifications
You must be signed in to change notification settings - Fork 516
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
Native Windows build #38872
base: develop
Are you sure you want to change the base?
Native Windows build #38872
Conversation
Documentation preview for this PR (built with commit 0bb2c5b; changes) is ready! 🎉 |
../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
@soehms Thanks you very much for giving this a run, and sorry for not providing enough installation instructions. I've added most of your steps now to the documentation. Having it "compile" is currently the best I can provide. As you saw, importing |
gsl, libgd issues are fixed now and bdw-gc and pari should be available now. |
|
@isuruf - is Windows pari Cygwin-based? That is, linking to libpari needs Cygwin? |
No, it's compiled using UCRT based MinGW. Since it's only C, no problem mixing with MSVC builds. We have the UCRT based MinGW toolchain and runtime libraries packaged in conda-forge. |
OK, so then the next thing would be to port cypari2 ? |
Yes |
With flintlib/flint@3604bb2 one needs to include the gmp header before using `fmpz_get_mpz`.
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:
set LIB
includes the conda env (e.g....\.conda\envs\sage-dev\Library\lib
). If not, runconda deactivate
followed byconda activate sage-dev
and then check again.set LIB=%CONDA_PREFIX%\Library\lib;%LIB%
LIB
meson setup builddir -Dbuildtype=release
<path to conda>\sage-dev\include\pyconfig.h
uncomment://# define Py_DEBUG
and changepython311_d.lib
topython311.lib
pyconfig.h
gsl.pc
to match:c-compiler
on Windows, VS 2022 Build Tools init file is not installed conda-forge/compilers-feedstock#66LNK2019: unresolved external symbol
on Windows conda-forge/m4ri-feedstock#15Upstream issues
Singular
Flint:
small
macro fromrpcndr
flintlib/flint#2100pid_t
mingw-w64/mingw-w64#65 (indirectly since pthread is flint dependency). Would be fixed by winpthreads-related issue when compiling against flint conda-forge/libflint-feedstock#38.-> Workaround: Change
typedef __int64 pid_t;
totypedef int pid_t;
in.conda\envs\sage-dev\Library\include\pthread_compat.h
-> Workaround: disable compilation of fraction_field_FpT for now
Cysignals:
📝 Checklist
⌛ Dependencies