-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
astropy fails to compile with gcc 14 #16449
Comments
Welcome to Astropy 👋 and thank you for your first issue! A project member will respond to you as soon as possible; in the meantime, please double-check the guidelines for submitting issues and make sure you've provided the requested details. GitHub issues in the Astropy repository are used to track bug reports and feature requests; If your issue poses a question about how to use Astropy, please instead raise your question in the Astropy Discourse user forum and close this issue. If you feel that this issue has not been responded to in a timely manner, please send a message directly to the development mailing list. If the issue is urgent or sensitive in nature (e.g., a security vulnerability) please send an e-mail directly to the private e-mail feedback@astropy.org. |
I can reproduce on macOS (M2) using homebrew-provided gcc
In fact I can check with multiple versions of gcc. Here are the results
gcc 14 seems very recent (version 14.1 was released a week ago ?), so it makes sense that we haven't caught this in CI yet. |
There seem to be 2 distinct errors, both of which look like conversions that gcc14 refuses to do implicitly. I think the first one is solved with the following patch. diff --git a/astropy/wcs/src/wcslib_celprm_wrap.c b/astropy/wcs/src/wcslib_celprm_wrap.c
index 3694ac4efe..322c2d51e2 100644
--- a/astropy/wcs/src/wcslib_celprm_wrap.c
+++ b/astropy/wcs/src/wcslib_celprm_wrap.c
@@ -321,7 +321,7 @@ static int PyCelprm_set_ref(PyCelprm* self, PyObject* value, void* closure)
return 0;
}
- PyObject* value_array = PyArray_ContiguousFromAny(value, NPY_DOUBLE, 1, 1);
+ PyArrayObject* value_array = (PyArrayObject*) PyArray_ContiguousFromAny(value, NPY_DOUBLE, 1, 1);
if (!value_array) return -1;
size = PyArray_SIZE(value_array); Still working on the second one. |
Full patch at #16450 |
Thanks, all! |
Description
Attempteting to build from source with gcc 14 fails with the following erro:
The full build log (including creating a virtual env) below. This is with python312 from Arch linux. See with both np1.x and np2.0.
Expected behavior
compile!
How to Reproduce
python -m venv /tmp/astropy . /tmp/astropy/bin/activate pip install --no-binary astropy astropy
Versions
N/A because could not get astropy to install. See both with latest release from pypi and the default branch.
The text was updated successfully, but these errors were encountered: