Dear All,

Not sure what's the best way to post this issue, so I thought I'd send around 
an e-mail first.

We've been struggling with some RPM building errors in some of our projects for 
a while now. Finally I was able to understand what the cause of the issue is.

In some cases we put symbolic links into the installation area of our projects 
that themselves point to other symbolic links, outside of the project. When 
this happens, the RPM building dies with a message like:

CMake Error at 
/afs/cern.ch/sw/lcg/contrib/CMake/3.3.2/Linux-x86_64/share/cmake-3.3/Modules/CPackRPM.cmake:906
 (string):
string begin index: 164 is out of range 0 - 156 
Call Stack (most recent call first): 
/afs/cern.ch/sw/lcg/contrib/CMake/3.3.2/Linux-x86_64/share/cmake-3.3/Modules/CPackRPM.cmake:1535
 (cpack_rpm_prepare_install_files) 
/afs/cern.ch/sw/lcg/contrib/CMake/3.3.2/Linux-x86_64/share/cmake-3.3/Modules/CPackRPM.cmake:1697
 (cpack_rpm_generate_package)

For some of the files this is actually a bug on our end, as we need to make 
sure that we install actual files with the project, not a symlink to a file.

But I also ran into another case where avoiding CPackRPM to deal with such a 
link-to-a-link setup is not easily avoidable. Does anyone have an idea how the 
CPackRPM.cmake code should be protected against such issues? Printing warnings 
about such files, saying that the produced RPM will not be fully relocatable, 
is fine. We just need to avoid outright errors during the RPM building.

Cheers,
             Attila
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to