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.94k stars 242 forks source link

Compile on Debian #203

Closed lefevred closed 6 months ago

lefevred commented 6 months ago
                       /!\ Not an issue /!\

Just a quick note on source compile on debian, that may help. This worked on Debian 11.

first the packages : apt install cmake libboost-all-dev libid3tag0-dev libmad0-dev libsndfile1-dev libgd-dev

then clone repo/get the zip

go inside the cloned repo : $ cd audiowaveform-master/

grab google test tool : $ wget https://github.com/google/googletest/archive/release-1.12.1.tar.gz $ tar xzf release-1.12.1.tar.gz $ ln -s googletest-release-1.12.1 googletest

create dir : $ mkdir build

go and compile $ cd build $ cmake ..

it should give something like :

-- Building version 1.10.1 -- Build type not specified: default is Release -- Build type: Release -- CMAKE_MODULE_PATH='/path/audiowaveform-master/cmake/modules' -- Architecture: amd64 -- LIBGD_INCLUDE_DIRS='/usr/include' -- LIBGD_LIBRARIES=/usr/lib/x86_64-linux-gnu/libgd.so -- LIBSNDFILE_INCLUDE_DIRS='/usr/include' -- LIBSNDFILE_LIBRARIES=/usr/lib/x86_64-linux-gnu/libsndfile.so -- LIBMAD_INCLUDE_DIRS='/usr/include' -- LIBMAD_LIBRARIES=/usr/lib/x86_64-linux-gnu/libmad.so -- LIBID3TAG_INCLUDE_DIRS='/usr/include' -- LIBID3TAG_LIBRARIES=/usr/lib/x86_64-linux-gnu/libid3tag.so -- Boost_INCLUDE_DIRS='/usr/include' -- Boost_LIBRARIES='Boost::program_options;Boost::filesystem;Boost::regex;Boost::system' -- CMAKE_CXX_COMPILER_VERSION='10.2.1' -- CMAKE_CXX_FLAGS='-std=c++11 -Wall -Wextra -Wconversion -pedantic -DBOOST_FILESYSTEM_NO_DEPRECATED' -- CMAKE_CXX_FLAGS_DEBUG='-g' -- CMAKE_CXX_FLAGS_RELEASE='-O3 -DNDEBUG' -- CMAKE_CXX_COMPILE_OBJECT=' -o -c ' -- Found Python: /usr/bin/python3.9 (found version "3.9.2") found components: Interpreter -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE
-- CMAKE_INSTALL_PREFIX='/usr/local' -- Configuring done -- Generating done -- Build files have been written to: /path/audiowaveform-master/build

just compile it now
$ make Scanning dependencies of target gtest [ 1%] Building CXX object googletest/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o [ 2%] Linking CXX static library ../../lib/libgtest.a [ 2%] Built target gtest .... [ 97%] Building C object CMakeFiles/audiowaveform.dir/src/madlld-1.1p1/bstdfile.c.o [ 98%] Building C object CMakeFiles/audiowaveform.dir/src/pdjson/pdjson.c.o [100%] Linking CXX executable audiowaveform [100%] Built target audiowaveform

Now you have the audiowaveform binary usable on your debian.

chrisn commented 6 months ago

Thanks! Also note that binary packages for Debian 10, 11, and 12 are available on the Releases page.

lefevred commented 6 months ago

Indeed, but testing the packages, it was looking for some other version of GlibC, so instead of messing with my system, I've restarted from the sources. And just make some doc, if anyone needs it.