View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0010312CMakeModulespublic2010-02-19 08:452010-06-25 10:46
Reporterandreasm 
Assigned ToBrad King 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionduplicate 
PlatformOSOS Version
Product VersionCMake-2-8 
Target VersionFixed in Version 
Summary0010312: FindMPI.cmake fails for path name containing "-l"
DescriptionUsing find_package(MPI) fails on a Linux machine, where the MPI installation is located in a directory containing the string "/mpi-libs/":

CMake Error at [...]/cmake-2.8/Modules/FindMPI.cmake:277 (message):
  Unable to find MPI library ibs/[...]/include

While parsing MPI_LINK_CMDLINE, FindMPI.cmake seems to assume anything after "-l" is a library name, even if no whitespace is preceeding the "-l". Similiar issues might arise with the treatment of "-L" and further compiler/linker option strings.
Additional InformationA quick (and dirty) hack in FindMPI.cmake:

265c265
< string(REGEX MATCHALL "-l([^\" ]+|\"[^\"]+\")" MPI_LIBNAMES "${MPI_LINK_CMDLINE}")
---
> string(REGEX MATCHALL " -l([^\" ]+|\"[^\"]+\")" MPI_LIBNAMES "${MPI_LINK_CMDLINE}")
271c271
< string(REGEX REPLACE "^-l" "" LIB ${LIB})
---
> string(REGEX REPLACE "^ -l" "" LIB ${LIB})

solves the issue my case. Of course, this is no acceptable patch yet.
TagsNo tags attached.
Attached Files

 Relationships
duplicate of 0009093closedBrad King FindMPI sometimes fails because it checks for non-existing libraries 

  Notes
(0019582)
James Amundson (reporter)
2010-02-22 17:38

I hate to say "me, too!", but I am currently experiencing major headaches because of this bug. The only way to work around it is to edit the installed FindMPI.cmake script as suggested above.
(0021165)
Marcel Loose (developer)
2010-06-25 04:22

This is a duplicate of issue 0009093

 Issue History
Date Modified Username Field Change
2010-02-19 08:45 andreasm New Issue
2010-02-22 17:38 James Amundson Note Added: 0019582
2010-06-25 04:22 Marcel Loose Note Added: 0021165
2010-06-25 10:09 Bill Hoffman Status new => assigned
2010-06-25 10:09 Bill Hoffman Assigned To => Brad King
2010-06-25 10:46 Brad King Status assigned => closed
2010-06-25 10:46 Brad King Resolution open => duplicate
2010-06-25 10:47 Brad King Relationship added duplicate of 0009093


Copyright © 2000 - 2018 MantisBT Team