Closed rbrueckner closed 3 years ago
It might be that the gcc version on CentOS is too old, see https://github.com/audeering/opensmile/issues/18
Thanks! What minimal version of gcc do you suggest?
Yes, most likely your compiler version is too old. openSMILE requires a C++11-compliant compiler. According to https://en.cppreference.com/w/cpp/compiler_support, gcc versions 5.x and later appear to have basically full support of C++11. In general, I'd recommend to use the latest compiler version available for your operating system, as newer gcc versions also have better code optimization so the binaries built with newer compiler versions tend to run faster.
Closing as it has been confirmed that the compilation error was caused by an outdated compiler version: https://github.com/audeering/opensmile/issues/18#issuecomment-864018498
I'm trying to compile opensmile on Linux CentOS 7 and get the following compilation error:
... [ 20%] Building CXX object CMakeFiles/opensmile.dir/src/core/componentManager.cpp.o [ 20%] Building CXX object CMakeFiles/opensmile.dir/src/core/configManager.cpp.o [ 21%] Building CXX object CMakeFiles/opensmile.dir/src/core/dataProcessor.cpp.o /mnt/users/xxx/repos/opensmile/src/core/configManager.cpp: In member function ‘void cConfigFileBuffer::loadFile(const char, FILE)’: /mnt/users/xxx/repos/opensmile/src/core/configManager.cpp:1722:6: error: use of deleted function ‘std::basic_ifstream& std::basic_ifstream::operator=(const std::basic_ifstream&)’
is = std::ifstream(filename, std::ifstream::in);
^
In file included from /mnt/users/xxx/repos/opensmile/src/include/core/configManager.hpp:27:0,
from /mnt/users/xxx/repos/opensmile/src/core/configManager.cpp:30:
/usr/include/c++/4.8.2/fstream:427:11: note: ‘std::basic_ifstream& std::basic_ifstream::operator=(const std::basic_ifstream&)’ is implicitly deleted because the default definition would be ill-formed:
class basic_ifstream : public basic_istream<_CharT, _Traits>
^
/usr/include/c++/4.8.2/fstream:427:11: error: use of deleted function ‘std::basic_istream& std::basic_istream::operator=(const std::basic_istream&)’
In file included from /usr/include/c++/4.8.2/iterator:65:0,
from /mnt/users/xxx/repos/opensmile/src/include/rapidjson/document.h:56,
from /mnt/users/xxx/repos/opensmile/src/include/core/configManager.hpp:22,
from /mnt/users/xxx/repos/opensmile/src/core/configManager.cpp:30:
/usr/include/c++/4.8.2/istream:58:11: note: ‘std::basic_istream& std::basic_istream::operator=(const std::basic_istream&)’ is implicitly deleted because the default definition would be ill-formed:
class basic_istream : virtual public basic_ios<_CharT, _Traits>
^
/usr/include/c++/4.8.2/istream:58:11: error: use of deleted function ‘std::basic_ios& std::basic_ios::operator=(const std::basic_ios&)’
In file included from /usr/include/c++/4.8.2/ios:44:0,
from /usr/include/c++/4.8.2/ostream:38,
from /usr/include/c++/4.8.2/iterator:64,
from /mnt/users/xxx/repos/opensmile/src/include/rapidjson/document.h:56,
from /mnt/users/xxx/repos/opensmile/src/include/core/configManager.hpp:22,
from /mnt/users/xxx/repos/opensmile/src/core/configManager.cpp:30:
/usr/include/c++/4.8.2/bits/basic_ios.h:66:11: note: ‘std::basic_ios& std::basic_ios::operator=(const std::basic_ios&)’ is implicitly deleted because the default definition would be ill-formed:
class basic_ios : public ios_base
^
In file included from /usr/include/c++/4.8.2/ios:42:0,
from /usr/include/c++/4.8.2/ostream:38,
from /usr/include/c++/4.8.2/iterator:64,
from /mnt/users/xxx/repos/opensmile/src/include/rapidjson/document.h:56,
from /mnt/users/xxx/repos/opensmile/src/include/core/configManager.hpp:22,
from /mnt/users/xxx/repos/opensmile/src/core/configManager.cpp:30:
/usr/include/c++/4.8.2/bits/ios_base.h:789:5: error: ‘std::ios_base& std::ios_base::operator=(const std::ios_base&)’ is private
operator=(const ios_base&);
^
In file included from /usr/include/c++/4.8.2/ios:44:0,
from /usr/include/c++/4.8.2/ostream:38,
from /usr/include/c++/4.8.2/iterator:64,
from /mnt/users/xxx/repos/opensmile/src/include/rapidjson/document.h:56,
from /mnt/users/xxx/repos/opensmile/src/include/core/configManager.hpp:22,
from /mnt/users/xxx/repos/opensmile/src/core/configManager.cpp:30:
/usr/include/c++/4.8.2/bits/basic_ios.h:66:11: error: within this context
class basic_ios : public ios_base
^
In file included from /mnt/users/xxx/repos/opensmile/src/include/core/configManager.hpp:27:0,
from /mnt/users/xxx/repos/opensmile/src/core/configManager.cpp:30:
/usr/include/c++/4.8.2/fstream:427:11: error: use of deleted function ‘std::basic_filebuf& std::basic_filebuf::operator=(const std::basic_filebuf&)’
class basic_ifstream : public basic_istream<_CharT, _Traits>
^
/usr/include/c++/4.8.2/fstream:72:11: note: ‘std::basic_filebuf& std::basic_filebuf::operator=(const std::basic_filebuf&)’ is implicitly deleted because the default definition would be ill-formed:
class basic_filebuf : public basic_streambuf<_CharT, _Traits>
^
In file included from /usr/include/c++/4.8.2/ios:43:0,
from /usr/include/c++/4.8.2/ostream:38,
from /usr/include/c++/4.8.2/iterator:64,
from /mnt/users/xxx/repos/opensmile/src/include/rapidjson/document.h:56,
from /mnt/users/xxx/repos/opensmile/src/include/core/configManager.hpp:22,
from /mnt/users/xxx/repos/opensmile/src/core/configManager.cpp:30:
/usr/include/c++/4.8.2/streambuf:810:7: error: ‘std::basic_streambuf<_CharT, _Traits>& std::basic_streambuf<_CharT, _Traits>::operator=(const std::basic_streambuf<_CharT, _Traits>&) [with _CharT = char; _Traits = std::char_traits]’ is private
operator=(const basic_streambuf& __sb)
^
In file included from /mnt/users/xxx/repos/opensmile/src/include/core/configManager.hpp:27:0,
from /mnt/users/xxx/repos/opensmile/src/core/configManager.cpp:30:
/usr/include/c++/4.8.2/fstream:72:11: error: within this context
class basic_filebuf : public basic_streambuf<_CharT, _Traits>
^
[ 22%] Building CXX object CMakeFiles/opensmile.dir/src/core/dataReader.cpp.o
gmake[2]: [CMakeFiles/opensmile.dir/src/core/configManager.cpp.o] Error 1
gmake[2]: Waiting for unfinished jobs....
gmake[1]: [CMakeFiles/opensmile.dir/all] Error 2
gmake: [all] Error 2
My build_flags.sh says:
!/bin/bash
This file is part of openSMILE.
#
Copyright (c) audEERING. All rights reserved.
See the file COPYING for details on license terms.
build_flags=(
libsvm and dependent components (cLibsvmLiveSink)
)
cmake_flags=(
switches between release and debug builds
)
build_flags="${build_flags[@]}"