Repository navigation
Fix cextern/wcslib build to compile original WCSLIB source in C99 mode - #11376
Conversation
|
Tentatively marked this for no changelog entry, as the modification seemed almost trivial, but wow, does |
| int precision = 0; | ||
| int i; | ||
| for (i = 0; i < nval; i++) { | ||
| for (int i = 0; i < nval; i++) { |
There was a problem hiding this comment.
tl;dr -- Will this be patched upstream too? Otherwise the next bundle update will overwrite this.
There was a problem hiding this comment.
this is "unpatching" my patch, though I think it is just harmless to leave it as is for now.
|
I think the problem with c99 is that it will not work with manylinux1 wheels. We could maybe switch to manylinux2010 though it requires a more recent pip (something we discussed a bit in #10873). |
|
And really, this is the single loop in the entire WCSLIB that does not comply to ANSI C standard. It is strange (to me) that the advice given was to change compiler flags instead of fixing this one loop. |
|
I could not find any build log in https://github.com/astropy/astropy/pull/11376/checks?check_run_id=2061368004 so it seems like the actual build finished, but from the test failures apparently the entire wcslib is broken when compiled with |
From Mark Calabretta's reply
I took it that future releases are likely to use more C99 constructs, so this seemed the cleaner and more future-proof solution. But right now for 7.4 it should not make much difference indeed. |
Fwiw, we can move to manylinux2010 now we dropped support for Python 3.6 in 4.2 (according to the now accepted APE 18). |
So is manylinux1 still using gcc 4.2 (which appears to be the default compiler on CentOS 5)? As we don't seem to have any CI testing that far back, that should be another motivation to move onwards. |
Does this mean someone gonna open a PR to patch the Azure pipeline? |
mcara
left a comment
There was a problem hiding this comment.
If possible to get c99 to work, I would prefer to use that option instead of gnu99. By being able to compile C code without enabling GNU extensions, I think the code will be able to compile on a wider range of platforms/compilers (i.e., using VS on Windows).
I don't really have an idea how to debug it without a build log from the CI, and the actual compilation apparently completing without critical errors. certainly look like there may be a mixup of float32 and float64 somehow! |
|
That value is breathtaking! |
|
Yes... |
I was also more worried initially about the MSVC or mingw32 builds, but at least the CI one seems to accept it. if determine_64_bit_int() != 'int' and get_compiler() == 'unix':
cfg['extra_compile_args'].extend(['-std=gnu99'])else set |
Description
Follow-up to #11260, replacing the source patch in the bundled WCSLIB 7.4 with a fix to the build script.
This should enable C99-compliant builds with all supported compilers for future WCSLIB updates as well.