PyMultiNest icon indicating copy to clipboard operation
PyMultiNest copied to clipboard

MultiNest cmake error at CMakeLists

Open AnnaPuecher opened this issue 2 years ago • 12 comments

Hi,

I was trying to install MultiNest following the instructions here https://johannesbuchner.github.io/PyMultiNest/install.html, but when running $cmake .. I got the following error

 ........

 -- A library with BLAS API found.

 -- A library with LAPACK API found.
 
 -- Detected gfortran, adding -ffree-line-length-none compiler flag.

 CMake Error at src/CMakeLists.txt:38 (if):

 if given arguments:


"CMAKE_C_COMPILER_VERSION" "VERSION_GREATER_EQUAL" "10"


Unknown arguments specified

 -- Configuring incomplete, errors occurred!

Looking into /MultiNest/src/CMakeLists.txt I think the problem is that it doesn't recognize the variable CMAKE_FORTRAN_COMPILER_VERSION, since a similar error is given at line 46. A quick solution was commenting out lines 38-41 and 46-49, but I was wondering if there's a better way to make it work. I've installed MultiNest other times before and this is the first one I'm getting this error. Also, I'm using cmake 2.8.12.2, which should meet the minimum requirements.

Thanks a lot in advance.

AnnaPuecher avatar Jan 19 '22 12:01 AnnaPuecher

sounds similar to #189

JohannesBuchner avatar Jan 19 '22 12:01 JohannesBuchner

Thanks, I looked into this issue, and if I understood correctly it was caused by a merge request and solved with a git pull. I tried but I'm still getting the same error (and git pull just says everything is already up to date), was there something different to do?

AnnaPuecher avatar Jan 20 '22 15:01 AnnaPuecher

Did you try cleaning your build/ folder completely (including hidden files)?

JohannesBuchner avatar Jan 20 '22 15:01 JohannesBuchner

I used rm -r build/*, is that ok? I also tried re-installing from scratch and doing a git pull right after cloning but I got the same error

AnnaPuecher avatar Jan 20 '22 15:01 AnnaPuecher

ls -A will show you the files

JohannesBuchner avatar Jan 20 '22 16:01 JohannesBuchner

ok, ls -A prompted

  .  ..  .gitignore

Removing also .gitignore still gives the same error, but I can't delete the other two, I get

rm: refusing to remove ‘.’ or ‘..’ directory: skipping ‘.’

rm: refusing to remove ‘.’ or ‘..’ directory: skipping ‘..’

AnnaPuecher avatar Jan 20 '22 17:01 AnnaPuecher

yeah, that's fine. So you still get the same error when doing cmake .. && make?

JohannesBuchner avatar Jan 20 '22 18:01 JohannesBuchner

yes, when I try cmake .. I get the same

AnnaPuecher avatar Jan 20 '22 18:01 AnnaPuecher

Then I don't know. What OS is this?

JohannesBuchner avatar Jan 20 '22 18:01 JohannesBuchner

Linux, with

 Distributor ID:	Scientific
 Description:	Scientific Linux release 7.9 (Nitrogen) 
 Release:	7.9 
 Codename:	Nitrogen

But I'm actually running on a cluster, so there might be some conflict

AnnaPuecher avatar Jan 20 '22 18:01 AnnaPuecher

Perhaps updating cmake could help.

JohannesBuchner avatar Jul 07 '22 14:07 JohannesBuchner

FYI I had this same problem and "solved" it using this thread:

https://github.com/glfw/glfw/issues/1584

CMakeLists only checks for cmake > 2.8, but VERSION_GREATER_EQUAL was not introduced until cmake 3.7. I cannot update cmake on my system due to permissions, but I got it to run by changing VERSION_GREATER_EQUAL --> VERSION_GREATER (in 2 places).

jenniferyee avatar Sep 23 '22 19:09 jenniferyee