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

Can't build on Debian 3.2.60-1+deb7u1 i686 GNU/Linux #17

Closed deepsystm closed 9 years ago

deepsystm commented 9 years ago

Hi all!

/home/ds/audiowaveform/src/Main.cpp:33:1: error: static_assert expression is not an integral constant expression
static_assert(std::numeric_limits<int>::max() >= 2147483647L, "size of int");
^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/audiowaveform.dir/src/Main.cpp.o] Ошибка 1
make[1]: *** [CMakeFiles/audiowaveform.dir/all] Ошибка 2
make: *** [all] Ошибка 2
Debian clang version 3.0-6.2 (tags/RELEASE_30/final) (based on LLVM 3.0)
Target: i386-pc-linux-gnu
Thread model: posix
g++ (Debian 4.7.2-5) 4.7.2
gcc (Debian 4.7.2-5) 4.7.2

cmake ..
-- Build type not specified: default is Release
-- CMAKE_VERSION=2.8.9
-- Build type: Release
-- CMAKE_MODULE_PATH='/home/ds/audiowaveform/cmake/modules'
-- Building version 1.0.9
-- Boost version: 1.49.0
-- Found the following Boost libraries:
--   program_options
--   filesystem
--   regex
--   system
-- Boost_INCLUDE_DIRS='/usr/include'
-- Boost_LIBRARIES='/usr/lib/libboost_program_options-mt.so;/usr/lib/libboost_filesystem-mt.so;/usr/lib/libboost_regex-mt.so;/usr/lib/libboost_system-mt.so'
-- LIBSNDFILE_LIBRARY=/usr/lib/i386-linux-gnu/libsndfile.so
-- LIBGD_LIBRARY=/usr/lib/i386-linux-gnu/libgd.so
-- LIBMAD_LIBRARY=/usr/lib/libmad.so
-- CMAKE_CXX_COMPILER_VERSION='Debian clang version 3.0-6.2 (tags/RELEASE_30/final) (based on LLVM 3.0)
Target: i386-pc-linux-gnu
Thread model: posix'
-- CMAKE_CXX_FLAGS='-std=c++0x -DGTEST_LANG_CXX11=0 -Wall -Wextra -Wconversion -pedantic -DBOOST_FILESYSTEM_NO_DEPRECATED'
-- CMAKE_CXX_FLAGS_DEBUG='-g'
-- CMAKE_CXX_FLAGS_RELEASE='-O3 -DNDEBUG'
-- CMAKE_CXX_COMPILE_OBJECT='<CMAKE_CXX_COMPILER>  <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>'
-- Unit tests disabled
-- CMAKE_INSTALL_PREFIX='/usr/local'
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ds/audiowaveform/build
ds@flat:~/audiowaveform/build$ make
[ 15%] Built target doc
[ 15%] Building CXX object CMakeFiles/audiowaveform.dir/src/Main.cpp.o
/home/ds/audiowaveform/src/Main.cpp:33:1: error: static_assert expression is not an integral constant expression
static_assert(std::numeric_limits<int>::max() >= 2147483647L, "size of int");
^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/audiowaveform.dir/src/Main.cpp.o] Ошибка 1
make[1]: *** [CMakeFiles/audiowaveform.dir/all] Ошибка 2
make: *** [all] Ошибка 2

why it can happens?

ds@flat:~/audiowaveform/build$ uname -a
Linux flat 3.2.0-4-486 #1 Debian 3.2.60-1+deb7u1 i686 GNU/Linux
chrisn commented 9 years ago

Hi @deepsystm,

I was able to reproduce the error you posted on Debian with clang 3.0. The audiowaveform code uses C++11 features, so needs a reasonably up-to-date compiler. The software builds OK with g++ 4.7.2, and also with more recent versions of clang. I was able to build successfully using clang 3.5, which I installed from the LLVM repository.

Chris

deepsystm commented 9 years ago

Thanks Chris,i do some tricky things to build it on debian 7 x32 and x64but with you answer next time i hope it will be less difficult than now 05.01.2015, 14:48, "Chris Needham" notifications@github.com:Hi @deepsystm,I was able to reproduce the error you posted on Debian with clang 3.0. The audiowaveform code uses C++11 features, so needs a reasonably up-to-date compiler. The software builds OK with g++ 4.7.2, and also with more recent versions of clang. I was able to build successfully using clang 3.5, which I installed from the LLVM repository.Chris—Reply to this email directly or view it on GitHub.