[CMake] [CPACK] symlink problem and man cpack issue

David Cole david.cole at kitware.com
Thu Mar 22 12:54:27 EDT 2012


The error message:
CPack Error: Cannot create symlink: /lib/libvtkgdcm.so.2.0-->
libvtkgdcm.so.2.0.18

Looks to me like a probable permissions issue because it's trying to
create a file in "/lib" -- do you use an install rule DESTINATION
argument of "/lib"? (Why install into an absolute path, shouldn't it
be underneath CMAKE_INSTALL_PREFIX? Just use "lib" instead of
"/lib"...)

There are no "cpack -E" commands, only "cmake -E" commands.

However, these symlinks should be created for you automatically (and
in fact, the install step is trying to create them or you wouldn't get
that error message), and you should not have to use cmake -E to create
lib version name symlinks.


On Thu, Mar 22, 2012 at 12:37 PM, kassim orra <kassimorra at gmail.com> wrote:
>
> Hi All !
>
> I'm using cmake for a few months ago and I just started to try to use cpack
> to distribute my application. I use some lib's, including some Kitware
> libraries. I had build a CPackConfig.cmaje file and when I execute "cpack",
> I receive the following message:
>
> CPack: Create package using TGZ
> CPack: Install projects
> CPack: - Install directory: /root/medsquare/
> CPack Error: Cannot create symlink: /lib/libvtkgdcm.so.2.0-->
> libvtkgdcm.so.2.0.18
>
> My main question is: I searched at the history of the CMake archive and
> found the answer that I should type "cpack -E create_symlink" that should
> solve it. But it didn't work and my doubt include the fact that this option
> doesn't appear at the Man CPACK file or the website documentation.
>
> Someone has already passed trough it ?
>
> Here is my cpack lines:
>
> set(CPACK_GENERATOR, "TZ")
> set(CPACK_INSTALL_DIRECTORY "MedSquare")
> set(CPACK_SOURCE_INSTALLED_DIRECTORIES "/root/medsquare/;source")
> set(CPACK_DEFAULT_LOCATION "./")
> set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY "1")
> set(CPACK_INSTALL_CMAKE_PROJECTS "/root/medsquare/source")
> set(CPACK_INTALL_PREFIX "/root/medsquare/installer")
> set(CPACK_PACKAGE_FILE_NAME "medsquare")
> set(CPACK_PACKAGE_INSTALL_DIRECTORY "/root/medsquare")
> set(CPACK_PACKAGING_INSTALL_PREFIX "/root/medsquare")
> include(CPack)
>
> Thanks,
>
> Kassim
>
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list