[CMake] Issues using CPack for making a debian package

Wagner, David david.wagner at intel.com
Thu Mar 31 12:17:19 EDT 2016


On 23/03/2016 16:15, Domen Vrankar wrote:
>> I'm considering working my problem around by shipping a patched copy of
>> CPackDeb.cmake, using this `-l` option. Has anyone another solution?
>
> Other than disabling use of dpkg-shlibdeps with
> CPACK_DEBIAN_PACKAGE_SHLIBDEPS nothing comes to mind.
>
> Would you be willing to provide the patch with `-l` option for
> inclusion into CPack and a minimal test CMakeLists.txt showing its
> usage?

It just so happens that the presence of the DEBIAN directory also fixes my 
use-case (withouth any RPATH): now, dpkg-shlibdeps finds my private libraries. 
However, I notice a strange behaviour from dpkg-shlibdeps:

> $ ls
> debian DEBIAN usr
> $ dpkg-shlibdeps --ignore-missing-info -O ./usr/lib/libparameter.so
> shlibs:Depends=libc6 (>= 2.14), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.6), libxml2 (>= 2.7.4)
> $ dpkg-shlibdeps --ignore-missing-info -O usr/lib/libparameter.so
> dpkg-shlibdeps: warning: binaries to analyze should already be installed in their package's directory
> dpkg-shlibdeps: warning: symbol _ZN31BackgroundRemoteProcessorServerC1EtOSt10unique_ptrI21IRemoteCommandHandlerSt14default_deleteIS1_EE used by usr/lib/libparameter.so found in none of the libraries
> shlibs:Depends=libc6 (>= 2.14), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.6), libxml2 (>= 2.7.4)

Note how it works ok when the path to the binary starts with ./ but fails 
otherwise. I narrowed it down to the `relative_to_pkg_root` function in 
Dpkg/Path.pm but I don't understand Perl enoough to go further. Fortunately, the 
way CPackDeb.cmake calls dpkg-shlibdeps has these leading './'.

Bottom line: it works but I don't know how robust it is.

BR
David

-- 
David Wagner

complex != complicated
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


More information about the CMake mailing list