MantisBT - CMake | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0014870 | CMake | CMake | public | 2014-04-09 16:22 | 2014-10-06 10:33 | |||||
Reporter | Melven Roehrig-Zoellner | |||||||||
Assigned To | Brad King | |||||||||
Priority | normal | Severity | major | Reproducibility | always | |||||
Status | closed | Resolution | fixed | |||||||
Platform | x86_64 | OS | Linux | OS Version | openSUSE 13.1 | |||||
Product Version | CMake 2.8.12 | |||||||||
Target Version | CMake 3.0 | Fixed in Version | CMake 3.0 | |||||||
Summary | 0014870: FindMPI.cmake returns 32-bit libraries on 64-bit systems for Fortran-only projects | |||||||||
Description | Linker errors for pure Fortran projects using MPI because find_package(MPI) adds a 32-bit library to MPI_Fortran_LIBRARIES. This occurs with the PGI-Compilers, but could also affect other compilers/MPI-versions. This affects at least CMake 2.8.11 and 2.8.12 | |||||||||
Steps To Reproduce | Minimal CMakeLists-example: project(test Fortran) find_package(MPI REQUIRED) message(STATUS ${MPI_Fortran_LIBRARIES}) For PGI-Fortran-Compilers: This shows: [...]/usr/lib/librt.so But must be: [...]/usr/lib64/librt.so So Linking with MPI_Fortran_LIBRARIES produces linker errors. In FindMPI.cmake system libraries are searched in /usr/lib and not in /usr/lib64. One can circumvent this bug through enabling C/C++, but this is not always an option (I only have a PGI Fortran License) | |||||||||
Additional Information | Possible bugfix: In FindMPI.cmake replace: # add the compiler implicit directories because some compilers # such as the intel compiler have libraries that show up # in the showme list that can only be found in the implicit # link directories of the compiler. Do this for C++ and C # compilers if the implicit link directories are defined. if (DEFINED CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES) set(MPI_LINK_PATH "${MPI_LINK_PATH};${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES}") endif () if (DEFINED CMAKE_C_IMPLICIT_LINK_DIRECTORIES) set(MPI_LINK_PATH "${MPI_LINK_PATH};${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") endif () by the respective language-specific variant: # add the compiler implicit directories because some compilers # such as the intel compiler have libraries that show up # in the showme list that can only be found in the implicit # link directories of the compiler. if (DEFINED CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES) set(MPI_LINK_PATH "${MPI_LINK_PATH};${CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES}") endif () | |||||||||
Tags | No tags attached. | |||||||||
Relationships |
| |||||||||
Attached Files | ![]() https://public.kitware.com/Bug/file/5126/FindMPI.cmake | |||||||||
Issue History | ||||||||||
Date Modified | Username | Field | Change | |||||||
2014-04-09 16:22 | Melven Roehrig-Zoellner | New Issue | ||||||||
2014-04-09 16:22 | Melven Roehrig-Zoellner | File Added: FindMPI.cmake | ||||||||
2014-04-10 10:26 | Brad King | Relationship added | related to 0010119 | |||||||
2014-04-10 10:33 | Brad King | Note Added: 0035666 | ||||||||
2014-04-10 12:10 | Melven Roehrig-Zoellner | Note Added: 0035667 | ||||||||
2014-04-10 12:10 | Melven Roehrig-Zoellner | Note Edited: 0035667 | bug_revision_view_page.php?bugnote_id=35667#r1444 | |||||||
2014-04-10 12:11 | Melven Roehrig-Zoellner | Note Edited: 0035667 | bug_revision_view_page.php?bugnote_id=35667#r1445 | |||||||
2014-04-10 12:40 | Brad King | Note Added: 0035668 | ||||||||
2014-04-10 12:40 | Brad King | Note Edited: 0035668 | bug_revision_view_page.php?bugnote_id=35668#r1447 | |||||||
2014-04-10 15:09 | Melven Roehrig-Zoellner | Note Added: 0035673 | ||||||||
2014-04-11 08:48 | Brad King | Note Added: 0035674 | ||||||||
2014-04-11 09:16 | Brad King | Note Added: 0035676 | ||||||||
2014-04-11 10:01 | Brad King | Note Added: 0035677 | ||||||||
2014-04-12 05:02 | Melven Roehrig-Zoellner | Note Added: 0035678 | ||||||||
2014-04-14 08:55 | Brad King | Note Added: 0035688 | ||||||||
2014-04-14 08:55 | Brad King | Assigned To | => Brad King | |||||||
2014-04-14 08:55 | Brad King | Status | new => resolved | |||||||
2014-04-14 08:55 | Brad King | Resolution | open => fixed | |||||||
2014-04-14 08:55 | Brad King | Fixed in Version | => CMake 3.0 | |||||||
2014-04-14 08:55 | Brad King | Target Version | => CMake 3.0 | |||||||
2014-10-06 10:33 | Robert Maynard | Note Added: 0036970 | ||||||||
2014-10-06 10:33 | Robert Maynard | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|