-
-
Notifications
You must be signed in to change notification settings - Fork 528
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
Compile errors in giac with c++ 17 on Windows & MacOS #38985
Comments
#if __cplusplus >= 201103L
// post-c++11 functional headers changes, thanks to George Huebner
#define CPP11
#endif
#ifdef CPP11
std::function<bool(const monomial<T> &, const monomial<T> &)> strictly_greater ;
sort_helper(const std::function<bool(const monomial<T> &, const monomial<T> &)> is_strictly_greater):strictly_greater(is_strictly_greater) {};
sort_helper():strictly_greater(m_lex_is_strictly_greater<T>) {};
#else
std::pointer_to_binary_function < const monomial<T> &, const monomial<T> &, bool> strictly_greater ;
sort_helper(const std::pointer_to_binary_function < const monomial<T> &, const monomial<T> &, bool> is_strictly_greater):strictly_greater(is_strictly_greater) {};
sort_helper():strictly_greater(std::ptr_fun<const monomial<T> &, const monomial<T> &, bool>(m_lex_is_strictly_greater<T>)) {};
#endif In principle, the error cannot happen if everything are configured correctly. I cannot reproduce the error on my machine (either replacing (I'm compiling with meson however, which if I recalled correctly might not parse the Which compiler are you using? Could be MSVC issue ? Or maybe your version of Giac is too old? (judging by your line number, 342, this seems likely. But where is the header pulled from? Sage's spkg?) |
Thanks @user202729 for looking into this, and sorry for not providing not enough information in the first place. You are right, I'm using MSVC and thus the check in @parisseb could you please change the line
to
Thanks! |
Same error occurs also on MacOS: https://github.com/sagemath/sage/actions/runs/12579685480/job/35060278092?pr=38879#step:8:4735 |
Might be conda issue this time. On my machine
tl;dr version of giac on conda-forge is too old that it doesn't include the https://github.com/conda-forge/giac-feedstock It's at 1.9.0.21, while http://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/ is at 1.9.0.998 (note: version number is not linear) |
Steps To Reproduce
Remove the line
# distutils: extra_compile_args = -std=c++11
insrc\sage\libs\giac\giac.pyx
. Then compile with MSVC.Expected Behavior
Compiles fine
Actual Behavior
Additional Information
No response
Environment
Checklist
The text was updated successfully, but these errors were encountered: