[Insight-users] Possible bug in ExternalProject_Add, no rule to make target Boost-cfgcmd.txt

Ramón Casero Cañas rcasero at gmail.com
Thu Jun 20 08:45:15 EDT 2013


Hi all,

I have created the following tree

mkdir foo
mkdir -p foo/cpp/src/third-party
mkdir foo/bin

with a minimal CMakeLists.txt to fetch and build the Boost libraries
using ExternalProject_Add (see attached).

Running (linux 64 bit, cmake 2.8.10.1)

cd foo/bin
cmake ..
make

produces the following error where there's no rule to make target
Boost-cfgcmd.txt.

$ cmake ..
-- The C compiler identification is GNU 4.7.3
-- The CXX compiler identification is GNU 4.7.3
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/~/Downloads/foo/bin


$ make VERBOSE=1
$ make VERBOSE=1
/usr/bin/cmake -H/home/rcasero/Downloads/foo
-B/home/rcasero/Downloads/foo/bin --check-build-system
CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start
/home/rcasero/Downloads/foo/bin/CMakeFiles
/home/rcasero/Downloads/foo/bin/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory `/home/rcasero/Downloads/foo/bin'
make -f CMakeFiles/Boost.dir/build.make CMakeFiles/Boost.dir/depend
make[2]: Entering directory `/home/rcasero/Downloads/foo/bin'
cd /home/rcasero/Downloads/foo/bin && /usr/bin/cmake -E cmake_depends "Unix
Makefiles" /home/rcasero/Downloads/foo /home/rcasero/Downloads/foo
/home/rcasero/Downloads/foo/bin /home/rcasero/Downloads/foo/bin
/home/rcasero/Downloads/foo/bin/CMakeFiles/Boost.dir/DependInfo.cmake
--color=
Dependee
"/home/rcasero/Downloads/foo/bin/CMakeFiles/Boost.dir/DependInfo.cmake" is
newer than depender
"/home/rcasero/Downloads/foo/bin/CMakeFiles/Boost.dir/depend.internal".
Dependee
"/home/rcasero/Downloads/foo/bin/CMakeFiles/CMakeDirectoryInformation.cmake"
is newer than depender
"/home/rcasero/Downloads/foo/bin/CMakeFiles/Boost.dir/depend.internal".
Scanning dependencies of target Boost
make[2]: Leaving directory `/home/rcasero/Downloads/foo/bin'
make -f CMakeFiles/Boost.dir/build.make CMakeFiles/Boost.dir/build
make[2]: Entering directory `/home/rcasero/Downloads/foo/bin'
/usr/bin/cmake -E cmake_progress_report
/home/rcasero/Downloads/foo/bin/CMakeFiles 3
[ 12%] Creating directories for 'Boost'
/usr/bin/cmake -E make_directory
/home/rcasero/Downloads/foo/cpp/src/third-party/boost_1_44_0
/usr/bin/cmake -E make_directory
/home/rcasero/Downloads/foo/cpp/src/third-party/boost_1_44_0
/usr/bin/cmake -E make_directory
/home/rcasero/Downloads/foo/cpp/src/third-party/boost_1_44_0
/usr/bin/cmake -E make_directory
/home/rcasero/Downloads/foo/cpp/src/third-party/boost_1_44_0
/usr/bin/cmake -E make_directory
/home/rcasero/Downloads/foo/cpp/src/third-party/boost_1_44_0
/usr/bin/cmake -E make_directory
/home/rcasero/Downloads/foo/cpp/src/third-party
/usr/bin/cmake -E touch
/home/rcasero/Downloads/foo/cpp/src/third-party/boost_1_44_0/Boost-mkdir
/usr/bin/cmake -E cmake_progress_report
/home/rcasero/Downloads/foo/bin/CMakeFiles 4
[ 25%] Performing download step (download, verify and extract) for 'Boost'
cd /home/rcasero/Downloads/foo/cpp/src/third-party && /usr/bin/cmake -P
/home/rcasero/Downloads/foo/cpp/src/third-party/boost_1_44_0/download-Boost.cmake
-- downloading...
     src='
http://downloads.sourceforge.net/project/boost/boost/1.44.0/boost_1_44_0.tar.gz
'

 dst='/home/rcasero/Downloads/foo/cpp/src/third-party/boost_1_44_0.tar.gz'
     timeout='none'
-- [download 0% complete]
-- [download 1% complete]
-- [download 2% complete]
[...]
-- [download 98% complete]
-- [download 99% complete]
-- [download 100% complete]
-- downloading... done
cd /home/rcasero/Downloads/foo/cpp/src/third-party && /usr/bin/cmake -P
/home/rcasero/Downloads/foo/cpp/src/third-party/boost_1_44_0/verify-Boost.cmake
-- verifying file...

 file='/home/rcasero/Downloads/foo/cpp/src/third-party/boost_1_44_0.tar.gz'
-- verifying file... warning: did not verify file - no URL_HASH specified?
cd /home/rcasero/Downloads/foo/cpp/src/third-party && /usr/bin/cmake -P
/home/rcasero/Downloads/foo/cpp/src/third-party/boost_1_44_0/extract-Boost.cmake
-- extracting...

 src='/home/rcasero/Downloads/foo/cpp/src/third-party/boost_1_44_0.tar.gz'
     dst='/home/rcasero/Downloads/foo/cpp/src/third-party/boost_1_44_0'
-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
cd /home/rcasero/Downloads/foo/cpp/src/third-party && /usr/bin/cmake -E
touch
/home/rcasero/Downloads/foo/cpp/src/third-party/boost_1_44_0/Boost-download
/usr/bin/cmake -E cmake_progress_report
/home/rcasero/Downloads/foo/bin/CMakeFiles 6
[ 37%] No patch step for 'Boost'
cd /home/rcasero/Downloads/foo/cpp/src/third-party/boost_1_44_0 &&
/usr/bin/cmake -E touch
/home/rcasero/Downloads/foo/cpp/src/third-party/boost_1_44_0/Boost-patch
make[2]: *** No rule to make target
`../cpp/src/third-party/boost_1_44_0/Boost-cfgcmd.txt', needed by
`../cpp/src/third-party/boost_1_44_0/Boost-configure'. Stop.
make[2]: Leaving directory `/home/rcasero/Downloads/foo/bin'
make[1]: *** [CMakeFiles/Boost.dir/all] Error 2
make[1]: Leaving directory `/home/rcasero/Downloads/foo/bin'
make: *** [all] Error 2



The error goes away if the PREFIX, TMP_DIR and STAM_DIR lines are commented
out.


Best regards,

Ramon.

-- 
Dr. Ramón Casero Cañas

Oxford e-Research Centre (OeRC)
University of Oxford
7 Keble Rd
Oxford OX1 3QG

tlf     +44 (0) 1865 610739
web     http://www.cs.ox.ac.uk/people/Ramon.CaseroCanas
photos  http://www.flickr.com/photos/rcasero/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130620/df62732a/attachment.htm>
-------------- next part --------------
cmake_minimum_required(VERSION 2.8)

project(foo)

set(AUX_BOOST_VERSION_ 1_44_0)
set(AUX_BOOST_VERSION 1.44.0)

if(WIN32)
  set(Boost_bootstrap "bootstrap.bat")
  set(Boost_bjam "bjam")
  set(Boost_layout "versioned")
else()
  set(Boost_bootstrap "./bootstrap.sh")
  set(Boost_bjam "./bjam")
  set(Boost_layout "tagged")
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
  set(Boost_address_model 64)
else()
  set(Boost_address_model 32)
endif()

include(ExternalProject)
ExternalProject_Add(Boost
  PREFIX       ${foo_SOURCE_DIR}/cpp/src/third-party/boost_${AUX_BOOST_VERSION_}
  TMP_DIR      ${foo_SOURCE_DIR}/cpp/src/third-party/boost_${AUX_BOOST_VERSION_}
  STAMP_DIR    ${foo_SOURCE_DIR}/cpp/src/third-party/boost_${AUX_BOOST_VERSION_}
  DOWNLOAD_DIR ${foo_SOURCE_DIR}/cpp/src/third-party
  SOURCE_DIR   ${foo_SOURCE_DIR}/cpp/src/third-party/boost_${AUX_BOOST_VERSION_}
  BINARY_DIR   ${foo_SOURCE_DIR}/cpp/src/third-party/boost_${AUX_BOOST_VERSION_}
  
  URL http://downloads.sourceforge.net/project/boost/boost/${AUX_BOOST_VERSION}/boost_${AUX_BOOST_VERSION_}.tar.gz
  PATCH_COMMAND ""
  CONFIGURE_COMMAND "${Boost_bootstrap}"
  BUILD_COMMAND ""
  TEST_BEFORE_INSTALL 0
  INSTALL_COMMAND ${Boost_bjam} install release --prefix=${foo_SOURCE_DIR} 
  --libdir=${CMAKE_BINARY_DIR}
  --build-dir=./bin 
  --build-type=minimal address-model=${Boost_address_model}
  --with-regex
  #    LOG_CONFIGURE 1
  #    LOG_BUILD 1
  #    LOG_INSTALL 1
  )


More information about the Insight-users mailing list