Package: libzip-dev
Version: 1.7.3-1

Dear maintainer,

I'm investigating #973069 (mgba FTBFS). The root cause is that the newly added CMake files for libzip require zipcmp, zipmerge, and zipinfo to be installed. The following CMakeLists.txt demonstrates it:

cmake_minimum_required(VERSION 3.1)
project(test)
find_package(libzip)

Without the tools installed, running "cmake ." fails like this:

CMake Error at /usr/lib/x86_64-linux-gnu/cmake/libzip/libzip-targets.cmake:93 
(message):
 The imported target "libzip::zipcmp" references the file

    "/usr/bin/zipcmp"

 but this file does not exist.  Possible reasons include:

 * The file was deleted, renamed, or moved to another location.

 * An install or uninstall procedure did not complete successfully.

 * The installation package was faulty and contained

    "/usr/lib/x86_64-linux-gnu/cmake/libzip/libzip-targets.cmake"

 but not all the files it references.

Call Stack (most recent call first):
 /usr/lib/x86_64-linux-gnu/cmake/libzip/libzip-config.cmake:42 (include)
 CMakeLists.txt:3 (find_package)


-- Configuring incomplete, errors occurred!

The code responsible is in libzip-targets.cmake, which has the code for checking the required files are there, and libzip-targets-none.cmake, which has the actual paths it checks for.

Should libzip-dev Depend on these tools? They're only needed when using the cmake files, and not otherwise. But I'm not enthusiastic to add "Build-Depends: zipcmp, zipmerge, ziptool" to mgba (and presumably to any other package that might try find_package(libzip)).

You may respond that the cmake files are newly added and this isn't a regression. That's true; mgba FTBFS because it tries find_package() first and falls back to pkg_search_module() second. So previously it picked up via libzip from pkg-config, but now that the cmake files are installed it is trying to use them.

I'm open to any suggestions from your side about the best solution, whether in libzip or in mgba.

thanks,
Ryan

Reply via email to