<div dir="auto">Hi Gonzalo,<div dir="auto"><br></div><div dir="auto">You should be able to build Deb package including symlink without trouble.</div><div dir="auto"><br></div><div dir="auto">Could you give the exact sequence of dpkg command which leads to the error you are speaking of?</div><div dir="auto"><br></div><div dir="auto">Does it work ok if you uninstall the previously installed deb package first?</div><div dir="auto"><br></div><div dir="auto">Do you install the very same package twice or did you change somehow the package version?</div><br><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">Le 8 avr. 2017 19:28, "Gonzalo Garramuño" <<a href="mailto:ggarra13@gmail.com">ggarra13@gmail.com</a>> a écrit :<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Currently, I have a project where I build a library and an executable that depends on the library.  Finally, I package a .deb package with cpack.<br>
<br>
Now, my problem is that cpack packs the symbolic link of my library and that creates problems with the deb installer ( dpkg -i ) whenever I try to install the same version of my program twice. The error I get is that the symbolic link changed value from 20 to 42 (or something like that).<br>
<br>
I tried removing the symbolic link previous to packaging, but then I get cpack erroring out with:<br>
<br>
CMake Error at /media/gga/Datos/code/applicat<wbr>ions/mrViewer/BUILD/Linux-3.<wbr>13.0-108-generic-64/Release/<wbr>tmp/libACESclip/cmake_install.<wbr>cmake:47 (file):<br>
  file INSTALL cannot find<br>
"/media/gga/Datos/code/applica<wbr>tions/mrViewer/BUILD/Linux-3.<wbr>13.0-108-generic-64/Release/<wbr>lib/libACESclip.so".<br>
<br>
Following a post on stackoverflow, I also tried using NAMELINK_SKIP on the library, like:<br>
<br>
<br>
set_target_properties( ACESclip<br>
  PROPERTIES<br>
  SOVERSION ${SOVERSION})<br>
<br>
install( TARGETS ACESclip<br>
  RUNTIME DESTINATION bin<br>
  LIBRARY DESTINATION lib<br>
  ARCHIVE DESTINATION lib<br>
  NAMELINK_SKIP )<br>
<br>
But then the executable:<br>
<br>
ADD_EXECUTABLE( mrViewer WIN32 ${SOURCES} )<br>
TARGET_LINK_LIBRARIES( mrViewer ${LIBRARIES} ACESclip )<br>
<br>
would not find my library and would error out.<br>
<br>
Therefore, I turn to the list for help.  How do I prevent cpack from packaging symbolic links (a feature which is kind of wrong at least for .deb files)?  Or how do I make my executable use the library without symlinks?<br>
<br>
Thanks in advance.<br>
<br>
<br>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMak<wbr>e_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/su<wbr>pport.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/co<wbr>nsulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/tr<wbr>aining.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/cmake</a><br>
</blockquote></div><br></div></div>