[Bug 1647868] Re: CPack DEB generator shlibdeps fails silently if /usr/bin/file is not installed

Bug Watch Updater 1647868 at bugs.launchpad.net
Sun Apr 16 11:30:45 UTC 2017


** Changed in: cmake (Debian)
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to cmake in Ubuntu.
https://bugs.launchpad.net/bugs/1647868

Title:
  CPack DEB generator shlibdeps fails silently if /usr/bin/file is not
  installed

Status in cmake package in Ubuntu:
  Confirmed
Status in cmake package in Debian:
  Fix Released

Bug description:
  I use CPack to build a debian package

  I use CPACK_DEBIAN_PACKAGE_SHLIBDEPS to let dpkg-shlibdeps figure out
  shared library dependencies

  this only works when the package "file" is installed and fails
  silently otherwise

  "file" is not a package dependency of the cmake package

  this bug report is about the packaging dependency, not that cpack
  silently fails, which should be fixed upstream

  How to reproduce

  Source File: main.cxx

  #include <iostream>
  int main(int,char**) {
  std::cout << "Hello\n";
  return 0;
  }

  CMakeList.txt:
  cmake_minimum_required(VERSION 2.6)
   
  PROJECT(Hello)
   
  ADD_EXECUTABLE(hello main.cxx)
  INSTALL(TARGETS hello DESTINATION hello)
   
  SET(CPACK_GENERATOR "DEB")
  SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Hello Kitty") #required
  SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) 
  INCLUDE(CPack)

  
  commands to trigger
  apt install cmake
  cmake .
  make package
  dpkg -I Hello-0.1.1-Linux.deb | grep Depends

  expected output:
  Depends: libc6 (>= 2.2.5), libstdc++6 (>= 4.1.1)

  actual output of grep if /usr/bin/file is not installed is empty
  (missing Depends line)

  affects Ubuntu version: Ubuntu 16.04 (probably all others too)
  affects cmake version: 3.5.1-1ubuntu1

  Work-around: apt install file (almost everyone has that installed, but
  minimal docker containers for package building do not)

  suggested solution: make the cmake package depend on the file package

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cmake/+bug/1647868/+subscriptions



More information about the foundations-bugs mailing list