<div dir="ltr">OK.... so when I reproduce this issue, I see that I do not have directory creation permissions in &quot;/opt&quot; on my Linux machine.&nbsp;So... the error message is not really surprising to me.&nbsp;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 &quot;/opt&quot; 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">&lt;<a href="mailto:petrihodju@yahoo.com">petrihodju@yahoo.com</a>&gt;</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&#39;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&#39;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&#39;t bother with the tar file here is written out the CMakeLists.txt &amp; 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 &quot;${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}&quot;)<br><br>#-------------------------------------------------------------------------------<br># macro for creating packages.<br>
#-------------------------------------------------------------------------------<br><br>ADD_CUSTOM_TARGET(pack)<br><br>MACRO(ADD_PACKAGE COMPONENT)<br>&nbsp; SET(TARGET pack-${COMPONENT})<br>&nbsp; SET(CONFIG &quot;CPackConfig-${COMPONENT}.cmake&quot;)<br>
&nbsp; SET(PACKAGE ${COMPONENT})<br>&nbsp; CONFIGURE_FILE(&quot;CPackConfig.in&quot; &quot;${CONFIG}&quot; @ONLY)<br>&nbsp; ADD_CUSTOM_TARGET(${TARGET} COMMAND cpack --config &quot;${CONFIG}&quot;)<br>&nbsp; ADD_DEPENDENCIES(pack
 ${TARGET})<br>ENDMACRO(ADD_PACKAGE)<br><br>#-------------------------------------------------------------------------------<br># installation path settings<br>#-------------------------------------------------------------------------------<br>
<br>SET(CMAKE_SET_DESTDIR &quot;ON&quot;)<br>SET(CMAKE_INSTALL_PREFIX &quot;/opt/test&quot;)<br>SET(CPACK_GENERATOR &quot;DEB&quot; &quot;RPM&quot;)<br><br>#-------------------------------------------------------------------------------<br>
# create test binary<br>#-------------------------------------------------------------------------------<br><br>ADD_EXECUTABLE(bin1 &quot;bin1.cc&quot;)<br>INSTALL(TARGETS bin1 DESTINATION &quot;bin&quot; COMPONENT &quot;binaries&quot;)<br>
ADD_PACKAGE(binaries)<br><br>CPackConfig.in:<br><br>#===============================================================================<br># template for package generation<br>#===============================================================================<br>
<br>SET(CMAKE_SET_DESTDIR
 &quot;@CMAKE_SET_DESTDIR@&quot;)<br>SET(CMAKE_INSTALL_PREFIX &quot;@CMAKE_INSTALL_PREFIX@&quot;)<br>SET(CPACK_SET_DESTDIR &quot;@CMAKE_SET_DESTDIR@&quot;)<br>SET(CPACK_INSTALL_PREFIX &quot;@CMAKE_INSTALL_PREFIX@&quot;)<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 &quot;@CMAKE_GENERATOR@&quot;)<br>
SET(CPACK_GENERATOR &quot;@CPACK_GENERATOR@&quot;)<br><br>SET(CPACK_INSTALL_CMAKE_PROJECTS &quot;@PROJECT_BINARY_DIR@;@PROJECT_NAME@;@PACKAGE@;/&quot;)<br>SET(CPACK_PACKAGE_FILE_NAME &quot;@PROJECT_NAME@-@PACKAGE@-@VERSION@-@CMAKE_SYSTEM_NAME@&quot;)<br>
SET(CPACK_PACKAGE_NAME &quot;@PROJECT_NAME@&quot;)<br>SET(CPACK_PACKAGE_VENDOR &quot;Test Vendor&quot;)<br>SET(CPACK_PACKAGE_CONTACT &quot;<a href="mailto:test@vendor.org" target="_blank">test@vendor.org</a>&quot;)<br>SET(CPACK_PACKAGE_DESCRIPTION_FILE &quot;@PROJECT_BINARY_DIR@/Description.txt&quot;)<br>
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY &quot;Test @PACKAGE@ Package&quot;)<br>SET(CPACK_SYSTEM_NAME &quot;@CMAKE_SYSTEM_NAME@&quot;)<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>