bbc / audiowaveform

C++ program to generate waveform data and render waveform images from audio files
https://waveform.prototyping.bbc.co.uk
GNU General Public License v3.0
1.93k stars 242 forks source link

make package does not create Debian package #167

Closed riban-bw closed 2 years ago

riban-bw commented 2 years ago

Running cmake -D ENABLE_TESTS=0 .. then make then make package on a Debian based system, e.g. raspbian does not create .deb pacakge. Instead it creates:

riban-bw commented 2 years ago

If I remove the condition within CMakeLists.txt to force it to build the deb package, subsequent attempt to install give errors:

Unpacking audiowaveform (1.6.0) over (1.6.0) ...
dpkg: dependency problems prevent configuration of audiowaveform:
 audiowaveform depends on libboost-program-options (>= 1.54.0); however:
  Package libboost-program-options is not installed.
 audiowaveform depends on libboost-filesystem (>= 1.54.0); however:
  Package libboost-filesystem is not installed.
 audiowaveform depends on libboost-regex (>= 1.54.0); however:
  Package libboost-regex is not installed.

I don't think these are dependencies as I have it running without these packages installed. (The packages do not actually exist hence the errors / warnings.)

chrisn commented 2 years ago

It's creating the wrong files because the SystemInfo.cmake script doesn't recognise Raspbian (or Debian actually). That should be easy to fix.

The Debian libboost packages include the version number, so libboost-program-options should possibly be libboost-program-options1.74.0 (or whatever the actual version is). This probably means CPACK_DEBIAN_PACKAGE_DEPENDS in CMakeLists.txt needs adjusting.

riban-bw commented 2 years ago

OF_DISTRO_IS_DEBIAN is being set but make package is still not creating .deb package.

chrisn commented 2 years ago

I've just pushed a change that updates CPACK_DEBIAN_PACKAGE_DEPENDS. Please let me know if this works OK for you!

riban-bw commented 2 years ago

It now builds the package but won't install:

dpkg -i audiowaveform_1.6.0-1_armhf.deb 
(Reading database ... 201939 files and directories currently installed.)
Preparing to unpack audiowaveform_1.6.0-1_armhf.deb ...
Unpacking audiowaveform (1.6.0) over (1.6.0) ...
dpkg: dependency problems prevent configuration of audiowaveform:
 audiowaveform depends on libboost-program-options1.67; however:
  Package libboost-program-options1.67 is not installed.
 audiowaveform depends on libboost-filesystem1.67; however:
  Package libboost-filesystem1.67 is not installed.
 audiowaveform depends on libboost-regex1.67; however:
  Package libboost-regex1.67 is not installed.

dpkg: error processing package audiowaveform (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.8.5-2) ...
Errors were encountered while processing:
 audiowaveform

Here are the available versions of libboost-filesystem in the official repository:

apt search libboost-filesystem
Sorting... Done
Full Text Search... Done
libboost-filesystem-dev/oldstable,now 1.67.0.1+b1 armhf [installed]
  filesystem operations (portable paths, iteration over directories, etc) in C++ (default version)

libboost-filesystem1.58-dev/oldstable 1.58.0+dfsg-5.1+rpi1+b4 armhf
  filesystem operations (portable paths, iteration over directories, etc) in C++

libboost-filesystem1.58.0/oldstable 1.58.0+dfsg-5.1+rpi1+b4 armhf
  filesystem operations (portable paths, iteration over directories, etc) in C++

libboost-filesystem1.62-dev/oldstable 1.62.0+dfsg-10+b3 armhf
  filesystem operations (portable paths, iteration over directories, etc) in C++

libboost-filesystem1.62.0/oldstable 1.62.0+dfsg-10+b3 armhf
  filesystem operations (portable paths, iteration over directories, etc) in C++

libboost-filesystem1.67-dev/oldstable,now 1.67.0-13+deb10u1 armhf [installed,automatic]
  filesystem operations (portable paths, iteration over directories, etc) in C++

libboost-filesystem1.67.0/oldstable,now 1.67.0-13+deb10u1 armhf [installed,automatic]
  filesystem operations (portable paths, iteration over directories, etc) in C++
chrisn commented 2 years ago

I've pushed another update. This should be working now.

riban-bw commented 2 years ago

Yep! Thanks!