<div dir="ltr">OK.... so when I reproduce this issue, I see that I do not have directory creation permissions in "/opt" on my Linux machine. So... the error message is not really surprising to me. Plus, I get the same error with CMake 2.6.0 and CMake <a href="http://2.6.2.">2.6.2.</a><div>
<div><br></div><div>Maybe you lost permissions to your "/opt" directory at the same time that you upgraded to CMake <a href="http://2.6.2.">2.6.2.</a>....??</div><div><br></div><div>Let me know if you still think this is a CMake issue after you verify that you really have different behavior between 2.6.0 and 2.6.2 on the same machine.</div>
<div><br></div><div><br></div><div>Thanks,</div><div>David Cole</div><div>Kitware, Inc.</div><div><br></div><div><br></div><div><div class="gmail_quote">On Mon, Oct 13, 2008 at 6:05 AM, Petri Hodju <span dir="ltr"><<a href="mailto:petrihodju@yahoo.com">petrihodju@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font:inherit">Hi!<br><br>I have put together a custom way of building packages inspired by Stuart Herring posted here earlier:<br>
<br>Fri Apr 4 20:39:04 EDT 2008<br>[CMake] CPack: Building Multiple Packages<br><br>Everything is working fine with version 2.6.0 but things break up with <a href="http://2.6.2." target="_blank">2.6.2.</a> The<br>error I get is like:<br>
<br>CPack Error: Problem creating temporary directory: /opt/test<br><br>So, I'm not sure if there is a bug in 2.6.2 or has something changed between 2.6.0 and 2.6.2 which I don't take into account. <br><br>I have attached to this mail a tar package containing full example of the problem.<br>
<br>For those who can't bother with the tar file here is written out the CMakeLists.txt & CPackConfig.in files, which make it all happen:<br><br>CMakeLists.txt:<br><br>#===============================================================================<br>
# Top level
project makefile<br>#===============================================================================<br><br>CMAKE_MINIMUM_REQUIRED(VERSION 2.6)<br><br>PROJECT(test)<br><br>SET(VERSION_MAJOR 0)<br>SET(VERSION_MINOR 1)<br>
SET(VERSION_PATCH 2)<br>SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")<br><br>#-------------------------------------------------------------------------------<br># macro for creating packages.<br>
#-------------------------------------------------------------------------------<br><br>ADD_CUSTOM_TARGET(pack)<br><br>MACRO(ADD_PACKAGE COMPONENT)<br> SET(TARGET pack-${COMPONENT})<br> SET(CONFIG "CPackConfig-${COMPONENT}.cmake")<br>
SET(PACKAGE ${COMPONENT})<br> CONFIGURE_FILE("CPackConfig.in" "${CONFIG}" @ONLY)<br> ADD_CUSTOM_TARGET(${TARGET} COMMAND cpack --config "${CONFIG}")<br> ADD_DEPENDENCIES(pack
${TARGET})<br>ENDMACRO(ADD_PACKAGE)<br><br>#-------------------------------------------------------------------------------<br># installation path settings<br>#-------------------------------------------------------------------------------<br>
<br>SET(CMAKE_SET_DESTDIR "ON")<br>SET(CMAKE_INSTALL_PREFIX "/opt/test")<br>SET(CPACK_GENERATOR "DEB" "RPM")<br><br>#-------------------------------------------------------------------------------<br>
# create test binary<br>#-------------------------------------------------------------------------------<br><br>ADD_EXECUTABLE(bin1 "bin1.cc")<br>INSTALL(TARGETS bin1 DESTINATION "bin" COMPONENT "binaries")<br>
ADD_PACKAGE(binaries)<br><br>CPackConfig.in:<br><br>#===============================================================================<br># template for package generation<br>#===============================================================================<br>
<br>SET(CMAKE_SET_DESTDIR
"@CMAKE_SET_DESTDIR@")<br>SET(CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")<br>SET(CPACK_SET_DESTDIR "@CMAKE_SET_DESTDIR@")<br>SET(CPACK_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")<br>
<br>SET(CPACK_PACKAGE_VERSION_MAJOR @VERSION_MAJOR@)<br>SET(CPACK_PACKAGE_VERSION_MINOR @VERSION_MINOR@)<br>SET(CPACK_PACKAGE_VERSION_PATCH @VERSION_PATCH@)<br><br>SET(CPACK_CMAKE_GENERATOR "@CMAKE_GENERATOR@")<br>
SET(CPACK_GENERATOR "@CPACK_GENERATOR@")<br><br>SET(CPACK_INSTALL_CMAKE_PROJECTS "@PROJECT_BINARY_DIR@;@PROJECT_NAME@;@PACKAGE@;/")<br>SET(CPACK_PACKAGE_FILE_NAME "@PROJECT_NAME@-@PACKAGE@-@VERSION@-@CMAKE_SYSTEM_NAME@")<br>
SET(CPACK_PACKAGE_NAME "@PROJECT_NAME@")<br>SET(CPACK_PACKAGE_VENDOR "Test Vendor")<br>SET(CPACK_PACKAGE_CONTACT "<a href="mailto:test@vendor.org" target="_blank">test@vendor.org</a>")<br>SET(CPACK_PACKAGE_DESCRIPTION_FILE "@PROJECT_BINARY_DIR@/Description.txt")<br>
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Test @PACKAGE@ Package")<br>SET(CPACK_SYSTEM_NAME "@CMAKE_SYSTEM_NAME@")<br><br>and finally
here is the output I get with cmake 2.6.0 and 2.6.2<br><br>Best regards,<br>Petri Hodju<br><br>--------------------------- with cmake 2.6.0 ---------------------------------<br><br>pho@host:~/misc/code/cpack$ cmake --version<br>
cmake version 2.6-patch 0<br><br>pho@host:~/misc/code/cpack$ cpack --version<br>cpack version 2.6-patch 0<br><br>pho@host:~/misc/code/cpack$ cmake .<br>-- The C compiler identification is GNU<br>-- The CXX compiler identification is GNU<br>
-- Check for working C compiler: /usr/bin/gcc<br>-- Check for working C compiler: /usr/bin/gcc -- works<br>-- Detecting C compiler ABI info<br>-- Detecting C compiler ABI info - done<br>-- Check for working CXX compiler: /usr/bin/c++<br>
-- Check for working CXX compiler: /usr/bin/c++ -- works<br>-- Detecting CXX compiler ABI info<br>-- Detecting CXX compiler ABI info - done<br>-- Configuring done<br>-- Generating done<br>-- Build files have been written to:
/home/pho/misc/code/cpack<br><br>pho@host:~/misc/code/cpack$ make<br>Scanning dependencies of target bin1<br>[100%] Building CXX object CMakeFiles/bin1.dir/bin1.cc.o<br>Linking CXX executable bin1<br>[100%] Built target bin1<br>
<br>pho@host:~/misc/code/cpack$ make pack<br>Scanning dependencies of target pack-binaries<br>CPack: Create package using DEB<br>CPack: Install projects<br>CPack: - Run preinstall target for: test<br>CPack: - Install project: test<br>
CPack: Compress package<br>CPack: Finalize package<br>CPack: Package /home/pho/misc/code/cpack/test-binaries-0.1.2-Linux.deb generated.<br>CPack: Create package using RPM<br>CPack: Install projects<br>CPack: - Run preinstall target for: test<br>
CPack: - Install project: test<br>CPack: Compress package<br>CPack: Finalize package<br>CPack: Package /home/pho/misc/code/cpack/test-binaries-0.1.2-Linux.rpm generated.<br>Built target pack-binaries<br>Scanning dependencies of target pack<br>
Built target
pack<br><br>--------------------------- with cmake 2.6.2 ---------------------------------<br><br>pho@host:~/misc/code/cpack$ cmake --version<br>cmake version 2.6-patch 2<br><br>pho@host:~/misc/code/cpack$ cpack --version<br>
cpack version 2.6-patch 2<br><br>pho@host:~/misc/code/cpack$ cmake .<br>-- The C compiler identification is GNU<br>-- The CXX compiler identification is GNU<br>-- Check for working C compiler: /usr/bin/gcc<br>-- Check for working C compiler: /usr/bin/gcc -- works<br>
-- Detecting C compiler ABI info<br>-- Detecting C compiler ABI info - done<br>-- Check for working CXX compiler: /usr/bin/c++<br>-- Check for working CXX compiler: /usr/bin/c++ -- works<br>-- Detecting CXX compiler ABI info<br>
-- Detecting CXX compiler ABI info - done<br>-- Configuring done<br>-- Generating done<br>-- Build files have been written to: /home/pho/misc/code/cpack<br><br>pho@host:~/misc/code/cpack$ make<br>Scanning dependencies of target bin1<br>
[100%]
Building CXX object CMakeFiles/bin1.dir/bin1.cc.o<br>Linking CXX executable bin1<br>[100%] Built target bin1<br><br>pho@host:~/misc/code/cpack$ make pack<br>Scanning dependencies of target pack-binaries<br>CPack: Create package using DEB<br>
CPack: Install projects<br>CPack: - Run preinstall target for: test<br>CPack: - Install project: test<br>CPack Error: Problem creating temporary directory: /opt/test<br>CPack Error: Error when generating package: test<br>
make[3]: *** [CMakeFiles/pack-binaries] Error 1<br>make[2]: *** [CMakeFiles/pack-binaries.dir/all] Error 2<br>make[1]: *** [CMakeFiles/pack.dir/rule] Error 2<br>make: *** [pack] Error 2<br></td></tr></tbody></table><br>
<br>_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br></div></div></div>