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

Allow OMPI to compile on OSX with gcc13 #12117

Merged
merged 4 commits into from
Jan 19, 2024

Conversation

bosilca
Copy link
Member

@bosilca bosilca commented Nov 22, 2023

Thanks @eschnett for reporting the 3 issues related to gcc13.

I am not entirely convinced the root cause is on OMPI side. It seems to me that some versions of gcc13.2 fail to define critical POSIX constants/defines (IOV_MAX, PATH_MAX and SSIZE_MAX) as well as their minimal values. Digging a little around it seems gcc13.2 (at least the MacPort variant) fails to use the OSX system headers to get these constants, aka. basically missing an #include_next on limits.h (this #include_next existed in gcc12).

Anyway, until we figure out the real solution I need to be able to compile on my laptop with gcc13.

Fixes #12108
Fixes #12109
Fixes #12110

Copy link
Member

@jsquyres jsquyres left a comment

Choose a reason for hiding this comment

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

Can you cite @eschnett somewhere? He did report these issues.

Per #12110 (comment), I don't actually have problems compiling OMPI with Homebrew-installed gcc 13.2.0. 🤷‍♂️

But most of these changes look good, anyway -- the only quibble I have is with SSIZE_MAX (noted above).

opal/include/opal_config_bottom.h Show resolved Hide resolved
@bosilca
Copy link
Member Author

bosilca commented Jan 19, 2024

all the commits are unverified now. let me try to fix this.

The only way to get IOV_MAX (and friends) is to manually include the GCC specific
syslimits.h header (sys/syslimits.h would not work either).

Fixes open-mpi#12110

Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
Manually define it based on the length of the ssize_t type.

Fixes open-mpi#12109

Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
Instead rely on OPAL_PATH_MAX #define. This complements the fix for open-mpi#12108

Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
We need to discover the existence and then include sys/param.h while
using the correctly named MPL defines.

Fixes open-mpi#12108

Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
@jsquyres
Copy link
Member

jsquyres commented Jan 19, 2024

all the commits are unverified now. let me try to fix this.

Sorry, that was probably just because I pushed last night (i.e., I became the committer on those commits).

The NVIDIA CI was failing last night; let's see if it passes today...
(@wenduwan thinks the problem may have been fixed by #12246, and therefore CI should pass now)

@bosilca bosilca merged commit f0261cb into open-mpi:main Jan 19, 2024
8 of 10 checks passed
@bosilca bosilca deleted the fix/compile_with_gcc13 branch January 19, 2024 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants