[unable to compile MPICH v4.2.1 with GNU toolchain v13.2.0 @ macOS Sonoma v14.4.1]

Maxim Abalenkov maxim.abalenkov at gmail.com
Mon May 13 10:36:01 UTC 2024


Dear all,

How are you? I hope all is well with you. I need help please. I’m struggling to compile MPICH v4.2.1 (from source code) with the GNU toolchain v13.2.0 @ macOS Sonoma v14.4.1. Please see my configuration and installation Perl script attached. I also attach a full log of the compilation errors. I recently installed GNU toolchain via MacPorts. When the script proceeds to compilation, it crashes with the following error messages:

Compiling MPICH...
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/sys/_types.h:32,
                 from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/_types.h:27,
                 from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/pthread.h:55,
                 from ../../../modules/yaksa/src/util/yaksu_atomics.c:6:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/sys/cdefs.h:554:30: error: missing ')' after "__has_attribute"
  554 | #if __has_cpp_attribute(clang::unsafe_buffer_usage)
      |                              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/sys/cdefs.h:554:31: error:  ':' without preceding '?'
  554 | #if __has_cpp_attribute(clang::unsafe_buffer_usage)

I suspect that Apple compilers’ header files are picked up erroneously. Is this normal for GNU toolchain to rely on Apple SDK’s header files? I’m new to Apple CPUs. Would you please educate me, what is the suggested way of installing software on Apple M? processors from source? Or should I just save the pain and install my code using Apple’s native toolchain? Thank you for your help and have a productive week ahead!

—
Best wishes,
Maxim



Maxim Abalenkov \\ maxim.abalenkov at gmail.com
+44 7 486 486 505 \\ www.maxim.abalenkov.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20240513/20449270/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mpich-install-gnu.pl
Type: text/x-perl-script
Size: 2381 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20240513/20449270/attachment.bin>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20240513/20449270/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mpich-4.2.1-install.log
Type: application/octet-stream
Size: 8640 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20240513/20449270/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20240513/20449270/attachment-0002.htm>


More information about the macports-users mailing list