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
qsort_r detection relies on implicit function declaration #125
Comments
It seems that astrometry >= 0.82 has overcame the qsort_r usage? |
Certainly possible. I only checked this repository here and didn't track the full upstream relationship. |
It is certainly possible that they did fix this upstream, but the problem is that I had to make so many changes to astrometry to make it compile on Windows, to make it play nicer on macOS, and to make it function as an internal library that would not require lots of temporary files that I can't update to a higher astrometry.net version without doing a lot of work. I had to remove a lot of code and modify a lot of functions to support the use case of StellarSolver, but astrometry.net needs that code for other use cases that StellarSolver does not require. I would like to update the base of StellarSolver to the latest astrometry.net, but I will need a large chunk of time to do so. |
Thanks to @timsurber for his contribution, and to @knro for letting me know about it. @fweimer-rh and @mattiaverga can you confirm that the fix rectified the issue for you? |
The
qsort_r
function comes with different prototypes on different systems. There are some tests aroundNEED_DECLARE_QSORT_R
andNEED_SWAP_QSORT_R
that try to work around that. However, they only work with compilers which accept implicit function declarations.Without support for implicit function declarations in the compiler, I get a build failure:
If I add
-D_GNU_SOURCE
to the build flags, the build fails because of a conflicting prototype:So there does not seem to be a good way to build this program with C99 compilers on glibc (or other non-BSD platforms).
The text was updated successfully, but these errors were encountered: