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 issues that prevent compilation in Cygwin #2002

Merged
merged 2 commits into from
Feb 14, 2025

Conversation

harmenwierenga
Copy link
Contributor

See my PR for ESMF. ESMF uses ParallelIO, and it fails to build through cygwin because of a few small issues in ParallelIO. Here, I try to address those:

  • In the src/clib/CMakeLists.txt, there is a check that long long and size_t are the same size. On cygwin, these sizes cannot be retrieved, which makes them both empty strings. This causes the check to fail, because empty strings cannot be parsed as numbers so ${SIZEOF_SIZE_T} EQUAL ${SIZEOF_LONG_LONG} evaluates to false in CMake. I modified the check to simply test if they are the same, not if they are parsable numbers and the same.
  • In the src/clib/pioc_support.c there is an include of execinfo.h. This header is missing on many platforms, including Cygwin. I have added a more portable check to see if the header is available, and I have excluded the include and the use of the backtrace functionality from that file when execinfo.h is not available. The backtrace functionality appears to be added as some useful logging for debugging purposes, but not as a necessary feature of the library, so I hope I was correct that it could simply be turned off. I have tried to suppress any warnings of unused variables.

Thank you for considering this, and please let me know if I should make changes!

Copy link
Contributor

@jedwards4b jedwards4b left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

@jedwards4b jedwards4b merged commit fcb8529 into NCAR:main Feb 14, 2025
3 checks passed
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.

2 participants