[CMake] CPack DEB dependencies

Eric Noulard eric.noulard at gmail.com
Tue Jan 29 03:37:45 EST 2013


2013/1/28 Clinton Stimpson <clinton at elemtech.com>:
> On Monday, January 28, 2013 10:07:04 PM Eric Noulard wrote:
>> 2013/1/28 Clinton Stimpson <clinton at elemtech.com>:
>> > When I try installing a cpack generated .rpm package on another machine,
>> > it
>> > also installs a handful of other dependent packages (including the 32 bit
>> > libc.so.6 for one of the 32 bit executables among all the 64 bit ones).
>> >
>> > But a cpack generated .deb package isn't that smart.
>>
>> This is because CPackRPM uses rpmbuild which usually have a builtin step
>> for auot-discovering basic dependencies. At least if you build it on the
>> same platform/distro you'll be installing it.
>>
>> > Is there any way to fix
>> > this, either in cpack or in my cpack config?
>>
>> You can try to set CPACK_DEBIAN_PACKAGE_SHLIBDEPS to ON.
>> Read the doc to see why it is not on by default:
>> cpack --help-variable CPACK_DEBIAN_PACKAGE_SHLIBDEPS
>
> There is a typo in that help.  It has the word "toi"

I'll fix this, but patch are always welcome :-]

> Ok, I'm running into that probably of not finding dependencies within my own
> package.  In the package, there are some 3rd party plugins without rpaths
> (these plugins don't need them), but it complains about not finding dependent
> libraries.
> Do you know if there is some what to give it the path?
>
> I'm hoping for something like this in my cpack config (which doesn't work):
> set(ENV{LD_LIBRARY_PATH} "$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/lib")

unfortunately I don't know.

> I'm curious why rpmbuild didn't have this problem, do you know?

Wild guess: DEB generator does not use the full suite of "dpkg-..."
tools to create a .deb
the side effect being that you can create a .deb even on a host
without dpkg* tools.
The drawback being that:
   - Generated .deb are not fully compliant with dpkg / debian
requirement (but almost)
     try lintian on a CPackDeb generated deb and you'll see.

   - Some possibly automatic feature like auto-dep may be flawed.

CPack is a bare wrapping around rpmbuild and rpm tools you would use if you
did build RPM yourself without CPack. CPackRPM is "only" easing the
writing of RPM spec
file with some tweaks (shortcutted spec file) in order cope with the
fact that CPack
is already be doing what rpmbuild does when used standalone.

> And why would automatic dependencies be ON by default for RPM but not for DEB?

Because last time I tried I was unable to make it work 100% of the time with DEB
whereas I did face very seldom breakage with RPM.

My opinion at that time was to avoid to release a "feature" that may
break a fair amount
of the time you try use it.
The best way would have been to fix it for good, the fact is I was
unable to do it in
my available free time :-[

Last time I tried I end-up telling me that may be re-writing the DEB
generator and
only use "pure" dpkg tool suite may be more valuable than trying to
fix current DEB generator.


-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org


More information about the CMake mailing list