View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014941CMakeCCMakepublic2014-05-28 13:132016-06-10 14:31
ReporterChad Balen 
Assigned ToKitware Robot 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionmoved 
Platformx86_64OSOpenSUSEOS Version12.3
Product VersionCMake 2.8.8 
Target VersionFixed in Version 
Summary0014941: Can't install Metis with ExternalPackage_Add module
DescriptionThe typical terminal commands to install Metis are:
$ make config shared=1 prefix=/path/to/installation
$ make # Alternatively you can skip make and just do: make install
$ make install

**If you go to line 7 of my CMake script (in steps to reproduce text box) you can copy the URL to download a copy of Metis.

When I run the equivalent commands in the ExternalPackage_Add module (See steps to reproduce text box) I get the following error at the end of the build process (or if you skip the make command and just do make install in the BUILD_COMMAND then CMake gives the same error but now after installing):

[100%] Built target ndmetis
make[4]: *** No rule to make target `s'. Stop.
gmake[3]: *** [all] Error 2
make[2]: *** [Metis-prefix/src/Metis-stamp/Metis-build] Error 2
make[1]: *** [CMakeFiles/Metis.dir/all] Error 2
make: *** [all] Error 2
Steps To ReproduceIn one directory above the source folder (where source folder is named: src) run commands in terminal:
$ mkdir Build
$ mkdir Install
$ cd Build
$ cmake ../src -DCMAKE_INSTALL_PREFIX=../Install
$ make

Where you use the following CMake script in src folder:

cmake_minimum_required(VERSION 2.8.8)
project(MetisBuild)
include(ExternalProject)

#SET(CMAKE_VERBOSE_MAKEFILE ON) #line 5
ExternalProject_Add(Metis
  URL http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz [^] #line 7
  URL_MD5 0
  DOWNLOAD_DIR ${CMAKE_SOURCE_DIR}/Metis
  SOURCE_DIR ${CMAKE_SOURCE_DIR}/Metis/src
  BUILD_IN_SOURCE 1
  UPDATE_COMMAND ""
  CONFIGURE_COMMAND ${CMAKE_BUILD_TOOL} config shared=1 prefix=${CMAKE_INSTALL_PREFIX}/Metis
  BUILD_COMMAND ${CMAKE_BUILD_TOOL} #line 14
  #BUILD_COMMAND ${CMAKE_BUILD_TOOL} install #line 15
  INSTALL_COMMAND ${CMAKE_BUILD_TOOL} install #line 16
)


***At end of build process you get the error shown in the description text box. If you remove the comment from line 15 and instead comment out lines 14 and 16 the same error occurs but now after it installs Metis.
Additional InformationI mentioned this issue initially in the mailing list (https://www.mail-archive.com/cmake@cmake.org/msg49029.html [^]) Norman K Williams responded and was able to reproduce the error on his machine as well. He noticed that if he set CMAKE_VERBOSE_MAKEFILE to ON then the build succeeded but I was unable to reproduce that result on my machine. Instead if I removed the comment from line 5 to set VERBOSE to ON then the error I received was:

[100%] Built target ndmetis
make[5]: Leaving directory `/home/cbalen/ConvertCmake/CMakeTutorial/Mine/12a_Metis2/src/Metis/src/build/Linux-x86_64'
/usr/bin/cmake -E cmake_progress_start /home/cbalen/ConvertCmake/CMakeTutorial/Mine/12a_Metis2/src/Metis/src/build/Linux-x86_64/CMakeFiles 0
make[4]: *** No rule to make target `w'. Stop.
make[4]: Leaving directory `/home/cbalen/ConvertCmake/CMakeTutorial/Mine/12a_Metis2/src/Metis/src/build/Linux-x86_64'
gmake[3]: *** [all] Error 2
gmake[3]: Leaving directory `/home/cbalen/ConvertCmake/CMakeTutorial/Mine/12a_Metis2/src/Metis/src'
make[2]: *** [Metis-prefix/src/Metis-stamp/Metis-build] Error 2
make[2]: Leaving directory `/home/cbalen/ConvertCmake/CMakeTutorial/Mine/12a_Metis2/Build'
make[1]: *** [CMakeFiles/Metis.dir/all] Error 2
make[1]: Leaving directory `/home/cbalen/ConvertCmake/CMakeTutorial/Mine/12a_Metis2/Build'
make: *** [all] Error 2
make: *** No rule to make target `install'. Stop.

So same thing but the target changed from 's' to 'w'
TagsNo tags attached.
Attached Filestxt file icon Metis_ConfigAndMake_Report.txt [^] (13,349 bytes) 2014-05-28 13:13 [Show Content]
? file icon metis-nested-make.sh [^] (255 bytes) 2014-05-28 14:53

 Relationships

  Notes
(0035955)
Brad King (manager)
2014-05-28 14:55

I can reproduce this without CMake using the attached "metis-nested-make.sh" script. The problem is in the Metis Makefile on this line:

               make -C $(BUILDDIR) $@ $(MAKEFLAGS); \

The direct reference to $(MAKEFLAGS) should be dropped. The make tool should automatically honor that from the environment. Currently the outer make sets the MAKEFLAGS to something that looks like a target name when referenced on the command line like that.
(0042553)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2014-05-28 13:13 Chad Balen New Issue
2014-05-28 13:13 Chad Balen File Added: Metis_ConfigAndMake_Report.txt
2014-05-28 14:53 Brad King File Added: metis-nested-make.sh
2014-05-28 14:55 Brad King Note Added: 0035955
2016-06-10 14:29 Kitware Robot Note Added: 0042553
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team