Skip to content
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

Fix compilation on Windows #207

Merged
merged 10 commits into from
Nov 19, 2024
Merged

Fix compilation on Windows #207

merged 10 commits into from
Nov 19, 2024

Conversation

tobiasdiez
Copy link
Contributor

@tobiasdiez tobiasdiez commented Oct 29, 2024

Based on #206, we make cysignals compile nicely on Windows. The tests (that are meaningful for windows) are passing, but I'm not sure if further work is necessary to handle Windows specifics. In either case, this should serve as a good start.

Windows (mingw) is added to ci to make sure that it keeps working.

Fixes #201 and fixes #198

@tobiasdiez
Copy link
Contributor Author

@dimpase @fchapoton Tests are passing, so this is good to go from my side. Please have a careful look at the changes to make sure I'm not breaking anything on linux and macos here (I really don't have a strong understanding of signal processing on unix).

@dimpase
Copy link
Member

dimpase commented Nov 18, 2024

you've removed cysignals_config.h.in - are you sure we don't need something like cysignals_config.h ?

@tobiasdiez
Copy link
Contributor Author

cysignals_config

It's now generated by meson: configure_file(output: 'cysignals_config.h', configuration: config, install_dir: py.get_install_dir(pure: false) / 'cysignals', install: true). No need to have a cysignals_config.h.in as source.

@@ -33,6 +33,19 @@ cimport cython
import sys
from gc import collect

# On Windows, some signals are not pre-defined.
# We define them here with values that will never occur in practice
Copy link
Member

Choose a reason for hiding this comment

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

https://stackoverflow.com/a/8420498/557937 shows how to do a sort of SIGALRM on Windows
(outdated, - python 2.7 - so perhaps there are better ways now)

Copy link
Member

Choose a reason for hiding this comment

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

It's for a future consideration - this PR doesn't need to do anything here.

Copy link
Member

@dimpase dimpase left a comment

Choose a reason for hiding this comment

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

lgtm

@dimpase dimpase merged commit 6633f1e into sagemath:main Nov 19, 2024
24 checks passed
@tobiasdiez tobiasdiez deleted the win-support branch November 20, 2024 06:34
@tobiasdiez
Copy link
Contributor Author

Thanks Dima!

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.

Problems building cysignal on Windows 11 Failing to build (2 windows machines so far)
2 participants