• cmake: compat 11 vs 13 (-indep)

    From Mathieu Malaterre@21:1/5 to All on Fri Jan 14 13:40:01 2022
    [cc me please]

    Symptoms:

    I've recently discovered the following change in behavior for
    dh_missing + cmake + -indep. Basically using compat 13 it is now an
    error when build-indep rule install stuff other than just the -indep
    files (1).

    This means that the following d/rules is going to fails when using compat=13:

    https://salsa.debian.org/multimedia-team/openvdb/-/blob/master/debian/rules

    As you can see, during debuild -A I only build one target (not 'all'):

    https://salsa.debian.org/multimedia-team/openvdb/-/blob/master/debian/rules#L94

    In compat 13 I was able to take advantage of `make -C`:

    https://salsa.debian.org/debian-phototools-team/imath/-/blob/master/debian/rules#L35-37

    This 'trick' will fail if someone switch from --buildsystem=cmake into --buildsystem=cmake+ninja.

    ---

    Root issue. As far as I understand cmake install() command (2)
    documentation, there is a single 'install' for the entire project. In
    other words, it is not possible using regular cmake logic to do:

    $ cmake . && make doc && make install_doc_related_stuff_only

    Could someone with better understanding of dh_missing + cmake please
    review the above and suggest a potential better solution than my
    correct "hack" of using `-C docs`. I could also remove stuff installed
    in debian/tmp just before `dh_missing` is run, but this is also a
    hack.

    Thanks much in advance,

    (1) https://buildd.debian.org/status/fetch.php?pkg=imath&arch=amd64&ver=3.1.3-7&stamp=1642087594&raw=0
    (2) https://cmake.org/cmake/help/latest/command/install.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Niels Thykier@21:1/5 to All on Sat Jan 15 12:50:01 2022
    Mathieu Malaterre:
    [cc me please]

    Symptoms:

    I've recently discovered the following change in behavior for
    dh_missing + cmake + -indep. Basically using compat 13 it is now an
    error when build-indep rule install stuff other than just the -indep
    files (1).


    The error is not specifically caused by compat 13 but dh_missing --fail-missing. This happens to be default in compat 13. However, you
    can use "dh_missing --list-missing" in compat 13 to avoid the error (or
    use --fail-missing in compat 12 or earlier to reproduce the error there).

    Depending on what you are going for, this may be sufficient. You are
    not required to use debhelper at its default if they do not suit you.

    Obviously, that does not solve the underlying issue with cmake/install.
    I do not have an answer for that.

    Thanks,
    ~Niels

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Niels Thykier@21:1/5 to All on Sat Jan 15 14:00:01 2022
    Niels Thykier:
    Mathieu Malaterre:
    [cc me please]

    Symptoms:

    I've recently discovered the following change in behavior for
    dh_missing + cmake + -indep. Basically using compat 13 it is now an
    error when build-indep rule install stuff other than just the -indep
    files (1).


    The error is not specifically caused by compat 13 but dh_missing --fail-missing. This happens to be default in compat 13. However, you
    can use "dh_missing --list-missing" in compat 13 to avoid the error (or
    use --fail-missing in compat 12 or earlier to reproduce the error there).

    Depending on what you are going for, this may be sufficient. You are
    not required to use debhelper at its default if they do not suit you.

    Obviously, that does not solve the underlying issue with cmake/install.
    I do not have an answer for that.

    Thanks,
    ~Niels


    Having looked a bit more at the packaging involved, perhaps you can
    solve this by replacing all the

    dh_install -p$(X) [...]

    calls by moving the content into debian/X.install. In compat 13, you
    can do substitutions in debian/X.install now without relying on dh-exec.

    This should enable dh_install to record what would have been installed
    more reliably and maybe resolve the dh_missing issue you are seeing.

    Thanks,
    ~Niels

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)