[cmake-developers] CPackComponentsDEB-components-depend2 test fails

Raffi Enficiaud raffi.enficiaud at free.fr
Thu Jul 4 13:55:50 EDT 2019



On 04.07.19 12:59, Rolf Eike Beer wrote:
> I have a Gentoo and an openSUSE system, that both have various dpkg* tools 
> installed for $reasons.
>
> I know that I need to disable the CPackDEB tests, they create a dynamic 
> executable and check the deb afterwards. Since this is no Debian like system 
> the libc this links to is not covered by any dep.
Hi,

I wrote those tests quite some time ago. They are basically checking if
CPackDEB is handling the options that were passed to it properly.
> When running the CPackComponentsDEB-components-depend2 test I get this output:
> [...]
>
> Is this the same reason and I should just filter this test out (in contrast to 
> the other CPackComponentsDEB tests, which work fine), do we need some sort 
> of automatic detection, or what?
This failure indicates that:

- the default CPACK_DEBIAN_PACKAGE_SHLIBDEPS is on: it activates the
automatic detection of the dependencies with shlibdeps. This is a Debian
tool.
- for all components but the application one, the shlibdeps is disabled
- the application component should inherit from the default one
- since the application points to the shared library, then it should
have this dependency while it does not according to shlibdeps.

Here the test assumes that there is a shared library the application
component links to.

I do not know much about Gentoo. Maybe the line

------ Tests/CPackComponentsDEB/CMakeLists.txt:13

# Create the mylib library
add_library(mylib mylib.cpp)

-------

is not creating a shared library by default on this distribution or is
interacting with other options you may have passed?
What if you explicitly write those lines like this:

add_library(mylib SHARED mylib.cpp)

Best,
Raffi


More information about the cmake-developers mailing list