Bug 1821728
Summary: | mpich doesn't work with clang | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | david08741 |
Component: | mpich | Assignee: | Zbigniew Jędrzejewski-Szmek <zbyszek> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 33 | CC: | dakingun, peter.georg, zbyszek |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | mpich-3.3.2-7.fc33 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-09-15 14:14:29 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
david08741
2020-04-07 13:27:52 UTC
Any progress on this issue? It not only blocks clang from being used as a compiler for MPICH's mpicc or mpicxx, but also results in unexpected behavior for any compiler. The manpage for mpicc says in its description: """ This command can be used to compile and link MPI programs written in C. It provides the options and any special libraries that are needed to compile and link MPI programs. It is important to use this command, particularly when linking programs, as it provides the necessary libraries. """ I.e. when simply compiling a single source file with mpicc source.c I expect it to be compiled with all options required and the necessary libraries, but no other particular options. With the current setup it will automatically turn on -g, -O2, -Wall, and even treats at least one warning as an error (-Werror=format-security). These options are in no way "needed to compile and link MPI programs", it might even cause my code to not compile anymore. Or cause other compilers than gcc to not work with mpicc / mpicxx. According to the MPICH 3.3 Readme (https://www.mpich.org/static/downloads/3.3/mpich-3.3-README.txt) the output of mpicc -compile_info / -link_info depends on the following: """ 3. Compiler Flags ================= MPICH allows several sets of compiler flags to be used. The first three sets are configure-time options for MPICH, while the fourth is only relevant when compiling applications with mpicc and friends. (a) CFLAGS, CPPFLAGS, CXXFLAGS, FFLAGS, FCFLAGS, LDFLAGS and LIBS (abbreviated as xFLAGS): Setting these flags would result in the MPICH library being compiled/linked with these flags and the flags internally being used in mpicc and friends. (b) MPICHLIB_CFLAGS, MPICHLIB_CPPFLAGS, MPICHLIB_CXXFLAGS, MPICHLIB_FFLAGS, and MPICHLIB_FCFLAGS (abbreviated as MPICHLIB_xFLAGS): Setting these flags would result in the MPICH library being compiled with these flags. However, these flags will *not* be used by mpicc and friends. (c) MPICH_MPICC_CFLAGS, MPICH_MPICC_CPPFLAGS, MPICH_MPICC_LDFLAGS, MPICH_MPICC_LIBS, and so on for MPICXX, MPIF77 and MPIFORT (abbreviated as MPICH_MPIX_FLAGS): These flags do *not* affect the compilation of the MPICH library itself, but will be internally used by mpicc and friends. +--------------------------------------------------------------------+ | | | | | | MPICH library | mpicc and friends | | | | | +--------------------+----------------------+------------------------+ | | | | | xFLAGS | Yes | Yes | | | | | +--------------------+----------------------+------------------------+ | | | | | MPICHLIB_xFLAGS | Yes | No | | | | | +--------------------+----------------------+------------------------+ | | | | | MPICH_MPIX_FLAGS | No | Yes | | | | | +--------------------+----------------------+------------------------+ All these flags can be set as part of configure command or through environment variables. """ The current mpich.spec file (https://src.fedoraproject.org/rpms/mpich/blob/master/f/mpich.spec) uses the %configure rpm macro, hence sets the xFLAGS. For the reasons given above it should be changed to only set the MPICHLIB_xFLAGS. RPM opt flags *should* only be used to compile MPICH and not force everyone to use them. Fedora (and CentOS, RHEL) are the only systems I have seen so far configuring MPICH like this. Without this change the mpicc / mpicxx wrapper seem to be useless to me (apart from being used to build other packages). This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle. Changing version to 33. Should be fixed now. |