MTG / essentia

C++ library for audio and music analysis, description and synthesis, including Python bindings
http://essentia.upf.edu
GNU Affero General Public License v3.0
2.81k stars 525 forks source link

Waf configure with tensorflow fail #1308

Open an-npt17 opened 1 year ago

an-npt17 commented 1 year ago

I'm having some troubles while building essentia on Ubuntu 20.04. While configuring with tensorflow there are some warnings and then after build successfully, the Tensorflow models are not defined

../src/essentia/utils/audiocontext.cpp: In constructor ‘essentia::AudioContext::AudioContext()’: ../src/essentia/utils/audiocontext.cpp:33:19: warning: ‘void av_register_all()’ is deprecated [-Wdeprecated-declarations] 33 | av_register_all(); // this should be done once only.. | ^ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/essentia/utils/audiocontext.h:26, from ../src/essentia/utils/audiocontext.cpp:20: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:2050:6: note: declared here 2050 | void av_register_all(void); | ^~~~~~~ ../src/essentia/utils/audiocontext.cpp:33:19: warning: ‘void av_register_all()’ is deprecated [-Wdeprecated-declarations] 33 | av_register_all(); // this should be done once only.. | ^ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/essentia/utils/audiocontext.h:26, from ../src/essentia/utils/audiocontext.cpp:20: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:2050:6: note: declared here 2050 | void av_register_all(void); | ^~~~~~~ ../src/essentia/utils/audiocontext.cpp: In member function ‘int essentia::AudioContext::create(const string&, const string&, int, int, int)’: ../src/essentia/utils/audiocontext.cpp:67:42: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations] 67 | _codecCtx = _avStream->codec; | ^~~~~ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/essentia/utils/audiocontext.h:26, from ../src/essentia/utils/audiocontext.cpp:20: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:885:21: note: declared here 885 | AVCodecContext codec; | ^~~~~ ../src/essentia/utils/audiocontext.cpp:67:42: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations] 67 | _codecCtx = _avStream->codec; | ^~~~~ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/essentia/utils/audiocontext.h:26, from ../src/essentia/utils/audiocontext.cpp:20: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:885:21: note: declared here 885 | AVCodecContext codec; | ^~~~~ ../src/essentia/utils/audiocontext.cpp:67:42: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations] 67 | _codecCtx = _avStream->codec; | ^~~~~ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/essentia/utils/audiocontext.h:26, from ../src/essentia/utils/audiocontext.cpp:20: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:885:21: note: declared here 885 | AVCodecContext codec; | ^~~~~ ../src/essentia/utils/audiocontext.cpp:145:20: warning: ‘AVFormatContext::filename’ is deprecated [-Wdeprecated-declarations] 145 | strncpy(_muxCtx->filename, _filename.c_str(), sizeof(_muxCtx->filename)); | ^~~~ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/essentia/utils/audiocontext.h:26, from ../src/essentia/utils/audiocontext.cpp:20: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:1424:10: note: declared here 1424 | char filename[1024]; | ^~~~ ../src/essentia/utils/audiocontext.cpp:145:20: warning: ‘AVFormatContext::filename’ is deprecated [-Wdeprecated-declarations] 145 | strncpy(_muxCtx->filename, _filename.c_str(), sizeof(_muxCtx->filename)); | ^~~~ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/essentia/utils/audiocontext.h:26, from ../src/essentia/utils/audiocontext.cpp:20: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:1424:10: note: declared here 1424 | char filename[1024]; | ^~~~ ../src/essentia/utils/audiocontext.cpp:145:20: warning: ‘AVFormatContext::filename’ is deprecated [-Wdeprecated-declarations] 145 | strncpy(_muxCtx->filename, _filename.c_str(), sizeof(_muxCtx->filename)); | ^~~~ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/essentia/utils/audiocontext.h:26, from ../src/essentia/utils/audiocontext.cpp:20: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:1424:10: note: declared here 1424 | char filename[1024]; | ^~~~ ../src/essentia/utils/audiocontext.cpp:145:65: warning: ‘AVFormatContext::filename’ is deprecated [-Wdeprecated-declarations] 145 | strncpy(_muxCtx->filename, _filename.c_str(), sizeof(_muxCtx->filename)); | ^~~~ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/essentia/utils/audiocontext.h:26, from ../src/essentia/utils/audiocontext.cpp:20: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:1424:10: note: declared here 1424 | char filename[1024]; | ^~~~ ../src/essentia/utils/audiocontext.cpp:145:65: warning: ‘AVFormatContext::filename’ is deprecated [-Wdeprecated-declarations] 145 | strncpy(_muxCtx->filename, _filename.c_str(), sizeof(_muxCtx->filename)); | ^~~~ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/essentia/utils/audiocontext.h:26, from ../src/essentia/utils/audiocontext.cpp:20: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:1424:10: note: declared here 1424 | char filename[1024]; | ^~~~ ../src/essentia/utils/audiocontext.cpp:145:65: warning: ‘AVFormatContext::filename’ is deprecated [-Wdeprecated-declarations] 145 | strncpy(_muxCtx->filename, _filename.c_str(), sizeof(_muxCtx->filename)); | ^~~~ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/essentia/utils/audiocontext.h:26, from ../src/essentia/utils/audiocontext.cpp:20: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:1424:10: note: declared here 1424 | char filename[1024]; | ^~~~ ../src/essentia/utils/audiocontext.cpp: In member function ‘void essentia::AudioContext::close()’: ../src/essentia/utils/audiocontext.cpp:194:28: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations] 194 | avcodec_close(_avStream->codec); | ^~~~~ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/essentia/utils/audiocontext.h:26, from ../src/essentia/utils/audiocontext.cpp:20: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:885:21: note: declared here 885 | AVCodecContext codec; | ^~~~~ ../src/essentia/utils/audiocontext.cpp:194:28: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations] 194 | avcodec_close(_avStream->codec); | ^~~~~ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/essentia/utils/audiocontext.h:26, from ../src/essentia/utils/audiocontext.cpp:20: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:885:21: note: declared here 885 | AVCodecContext codec; | ^~~~~ ../src/essentia/utils/audiocontext.cpp:194:28: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations] 194 | avcodec_close(_avStream->codec); | ^~~~~ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/essentia/utils/audiocontext.h:26, from ../src/essentia/utils/audiocontext.cpp:20: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:885:21: note: declared here 885 | AVCodecContext codec; | ^~~~~ ../src/essentia/utils/audiocontext.cpp:198:24: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations] 198 | av_freep(&_avStream->codec); | ^~~~~ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/essentia/utils/audiocontext.h:26, from ../src/essentia/utils/audiocontext.cpp:20: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:885:21: note: declared here 885 | AVCodecContext codec; | ^~~~~ ../src/essentia/utils/audiocontext.cpp:198:24: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations] 198 | av_freep(&_avStream->codec); | ^~~~~ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/essentia/utils/audiocontext.h:26, from ../src/essentia/utils/audiocontext.cpp:20: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:885:21: note: declared here 885 | AVCodecContext codec; | ^~~~~ ../src/essentia/utils/audiocontext.cpp:198:24: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations] 198 | av_freep(&_avStream->codec); | ^~~~~ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/essentia/utils/audiocontext.h:26, from ../src/essentia/utils/audiocontext.cpp:20: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:885:21: note: declared here 885 | AVCodecContext codec; | ^~~~~ ../src/essentia/utils/audiocontext.cpp: In member function ‘void essentia::AudioContext::encodePacket(int)’: ../src/essentia/utils/audiocontext.cpp:331:67: warning: ‘int avcodec_encode_audio2(AVCodecContext, AVPacket, const AVFrame, int)’ is deprecated [-Wdeprecated-declarations] 331 | if (avcodec_encode_audio2(_codecCtx, &packet, frame, &got_output) < 0) { | ^ In file included from ../src/essentia/utils/ffmpegapi.h:24, from ../src/essentia/utils/audiocontext.h:26, from ../src/essentia/utils/audiocontext.cpp:20: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:5423:5: note: declared here 5423 | int avcodec_encode_audio2(AVCodecContext avctx, AVPacket avpkt, | ^~~~~ ../src/essentia/utils/audiocontext.cpp:331:67: warning: ‘int avcodec_encode_audio2(AVCodecContext, AVPacket, const AVFrame, int)’ is deprecated [-Wdeprecated-declarations] 331 | if (avcodec_encode_audio2(_codecCtx, &packet, frame, &got_output) < 0) { | ^ In file included from ../src/essentia/utils/ffmpegapi.h:24, from ../src/essentia/utils/audiocontext.h:26, from ../src/essentia/utils/audiocontext.cpp:20: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:5423:5: note: declared here 5423 | int avcodec_encode_audio2(AVCodecContext avctx, AVPacket avpkt, | ^~~~~ ../src/essentia/utils/audiocontext.cpp:339:27: warning: ‘void av_free_packet(AVPacket)’ is deprecated [-Wdeprecated-declarations] 339 | av_free_packet(&packet); | ^ In file included from ../src/essentia/utils/ffmpegapi.h:24, from ../src/essentia/utils/audiocontext.h:26, from ../src/essentia/utils/audiocontext.cpp:20: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:4473:6: note: declared here 4473 | void av_free_packet(AVPacket pkt); | ^~~~~~ ../src/essentia/utils/audiocontext.cpp:339:27: warning: ‘void av_free_packet(AVPacket)’ is deprecated [-Wdeprecated-declarations] 339 | av_free_packet(&packet); | ^ In file included from ../src/essentia/utils/ffmpegapi.h:24, from ../src/essentia/utils/audiocontext.h:26, from ../src/essentia/utils/audiocontext.cpp:20: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:4473:6: note: declared here 4473 | void av_free_packet(AVPacket pkt); | ^~~~~~ ../src/essentia/utils/audiocontext.cpp:274:7: warning: unused variable ‘inputPlaneSize’ [-Wunused-variable] 274 | int inputPlaneSize = av_samples_get_buffer_size(NULL, | ^~~~~~ ../src/essentia/utils/audiocontext.cpp: In member function ‘void essentia::AudioContext::writeEOF()’: ../src/essentia/utils/audiocontext.cpp:355:68: warning: ‘int avcodec_encode_audio2(AVCodecContext, AVPacket, const AVFrame, int)’ is deprecated [-Wdeprecated-declarations] 355 | if (avcodec_encode_audio2(_codecCtx, &packet, NULL, &got_output) < 0) { | ^ In file included from ../src/essentia/utils/ffmpegapi.h:24, from ../src/essentia/utils/audiocontext.h:26, from ../src/essentia/utils/audiocontext.cpp:20: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:5423:5: note: declared here 5423 | int avcodec_encode_audio2(AVCodecContext avctx, AVPacket avpkt, | ^~~~~ ../src/essentia/utils/audiocontext.cpp:355:68: warning: ‘int avcodec_encode_audio2(AVCodecContext, AVPacket, const AVFrame, int)’ is deprecated [-Wdeprecated-declarations] 355 | if (avcodec_encode_audio2(_codecCtx, &packet, NULL, &got_output) < 0) { | ^ In file included from ../src/essentia/utils/ffmpegapi.h:24, from ../src/essentia/utils/audiocontext.h:26, from ../src/essentia/utils/audiocontext.cpp:20: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:5423:5: note: declared here 5423 | int avcodec_encode_audio2(AVCodecContext avctx, AVPacket avpkt, | ^~~~~ ../src/essentia/utils/audiocontext.cpp:362:29: warning: ‘void av_free_packet(AVPacket)’ is deprecated [-Wdeprecated-declarations] 362 | av_free_packet(&packet); | ^ In file included from ../src/essentia/utils/ffmpegapi.h:24, from ../src/essentia/utils/audiocontext.h:26, from ../src/essentia/utils/audiocontext.cpp:20: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:4473:6: note: declared here 4473 | void av_free_packet(AVPacket pkt); | ^~~~~~ ../src/essentia/utils/audiocontext.cpp:362:29: warning: ‘void av_free_packet(AVPacket)’ is deprecated [-Wdeprecated-declarations] 362 | av_free_packet(&packet); | ^ In file included from ../src/essentia/utils/ffmpegapi.h:24, from ../src/essentia/utils/audiocontext.h:26, from ../src/essentia/utils/audiocontext.cpp:20: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:4473:6: note: declared here 4473 | void av_free_packet(AVPacket pkt); | ^~~~~~ ../src/essentia/utils/audiocontext.cpp: In member function ‘void essentia::AudioContext::open()’: ../src/essentia/utils/audiocontext.cpp:176:24: warning: ignoring return value of ‘int avformat_write_header(AVFormatContext, AVDictionary*)’, declared with attribute warn_unused_result [-Wunused-result] 176 | avformat_write_header(_muxCtx, / AVDictionary *options / NULL); | ~~~~~^~~~~~~~~~~~ In file included from /usr/include/string.h:495, from ../src/essentia/types.h:29, from ../src/essentia/utils/audiocontext.h:25, from ../src/essentia/utils/audiocontext.cpp:20: In function ‘char strncpy(char, const char, size_t)’, inlined from ‘int essentia::AudioContext::create(const string&, const string&, int, int, int)’ at ../src/essentia/utils/audiocontext.cpp:145:10: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:34: warning: ‘char builtin_strncpy(char, const char, long unsigned int)’ specified bound 1024 equals destination size [-Wstringop-truncation] 106 | return _builtinstrncpy_chk (dest, src, len, bos (__dest)); | ~~~~~~^~~~~~~~

../src/algorithms/machinelearning/tensorflowpredict.cpp: In member function ‘void essentia::standard::TensorflowPredict::openGraph()’: ../src/algorithms/machinelearning/tensorflowpredict.cpp:188:10: warning: ignoring return value of ‘size_t fread(void, size_t, size_t, FILE)’, declared with attribute warn_unused_result [-Wunused-result] 188 | fread(data, fsize, 1, f); | ~^~~~~~~

../src/algorithms/standard/vectorrealtotensor.cpp: In member function ‘virtual essentia::streaming::AlgorithmStatus essentia::streaming::VectorRealToTensor::process()’: ../src/algorithms/standard/vectorrealtotensor.cpp:221:45: warning: comparison of integer expressions of different signedness: ‘std::vector<std::vector<std::vector > >::size_type’ {aka ‘long unsigned int’} and ‘__gnu_cxx::__alloc_traits<std::allocator, int>::value_type’ {aka ‘int’} [-Wsign-compare] 221 | } else if (shouldStop() and _acc.size() < _shape[0]) {

In file included from ../src/algorithms/io/audioloader.cpp:20: ../src/algorithms/io/audioloader.h: In constructor ‘essentia::streaming::AudioLoader::AudioLoader()’: ../src/algorithms/io/audioloader.h:98:21: warning: ‘void av_register_all()’ is deprecated [-Wdeprecated-declarations] 98 | av_register_all(); | ^ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/algorithms/io/audioloader.h:25, from ../src/algorithms/io/audioloader.cpp:20: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:2050:6: note: declared here 2050 | void av_register_all(void); | ^~~~~~~ In file included from ../src/algorithms/io/audioloader.cpp:20: ../src/algorithms/io/audioloader.h:98:21: warning: ‘void av_register_all()’ is deprecated [-Wdeprecated-declarations] 98 | av_register_all(); | ^ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/algorithms/io/audioloader.h:25, from ../src/algorithms/io/audioloader.cpp:20: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:2050:6: note: declared here 2050 | void av_register_all(void); | ^~~~~~~ ../src/algorithms/io/audioloader.cpp: In member function ‘void essentia::streaming::AudioLoader::openAudioFile(const string&)’: ../src/algorithms/io/audioloader.cpp:81:36: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations] 81 | if (_demuxCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO) { | ^~~~~ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/algorithms/io/audioloader.h:25, from ../src/algorithms/io/audioloader.cpp:20: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:885:21: note: declared here 885 | AVCodecContext codec; | ^~~~~ ../src/algorithms/io/audioloader.cpp:81:36: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations] 81 | if (_demuxCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO) { | ^~~~~ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/algorithms/io/audioloader.h:25, from ../src/algorithms/io/audioloader.cpp:20: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:885:21: note: declared here 885 | AVCodecContext codec; | ^~~~~ ../src/algorithms/io/audioloader.cpp:81:36: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations] 81 | if (_demuxCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO) { | ^~~~~ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/algorithms/io/audioloader.h:25, from ../src/algorithms/io/audioloader.cpp:20: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:885:21: note: declared here 885 | AVCodecContext codec; | ^~~~~ ../src/algorithms/io/audioloader.cpp:102:49: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations] 102 | _audioCtx = _demuxCtx->streams[_streamIdx]->codec; | ^~~~~ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/algorithms/io/audioloader.h:25, from ../src/algorithms/io/audioloader.cpp:20: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:885:21: note: declared here 885 | AVCodecContext codec; | ^~~~~ ../src/algorithms/io/audioloader.cpp:102:49: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations] 102 | _audioCtx = _demuxCtx->streams[_streamIdx]->codec; | ^~~~~ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/algorithms/io/audioloader.h:25, from ../src/algorithms/io/audioloader.cpp:20: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:885:21: note: declared here 885 | AVCodecContext codec; | ^~~~~ ../src/algorithms/io/audioloader.cpp:102:49: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations] 102 | _audioCtx = _demuxCtx->streams[_streamIdx]->codec; | ^~~~~ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/algorithms/io/audioloader.h:25, from ../src/algorithms/io/audioloader.cpp:20: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:885:21: note: declared here 885 | AVCodecContext codec; | ^~~~~ ../src/algorithms/io/audioloader.cpp: In member function ‘void essentia::streaming::AudioLoader::closeAudioFile()’: ../src/algorithms/io/audioloader.cpp:164:28: warning: ‘void av_free_packet(AVPacket)’ is deprecated [-Wdeprecated-declarations] 164 | av_free_packet(&_packet); | ^ In file included from ../src/essentia/utils/ffmpegapi.h:24, from ../src/algorithms/io/audioloader.h:25, from ../src/algorithms/io/audioloader.cpp:20: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:4473:6: note: declared here 4473 | void av_free_packet(AVPacket pkt); | ^~~~~~ ../src/algorithms/io/audioloader.cpp:164:28: warning: ‘void av_free_packet(AVPacket)’ is deprecated [-Wdeprecated-declarations] 164 | av_free_packet(&_packet); | ^ In file included from ../src/essentia/utils/ffmpegapi.h:24, from ../src/algorithms/io/audioloader.h:25, from ../src/algorithms/io/audioloader.cpp:20: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:4473:6: note: declared here 4473 | void av_free_packet(AVPacket pkt); | ^~~~~~ ../src/algorithms/io/audioloader.cpp: In member function ‘virtual essentia::streaming::AlgorithmStatus essentia::streaming::AudioLoader::process()’: ../src/algorithms/io/audioloader.cpp:247:28: warning: ‘void av_free_packet(AVPacket)’ is deprecated [-Wdeprecated-declarations] 247 | av_free_packet(&_packet); | ^ In file included from ../src/essentia/utils/ffmpegapi.h:24, from ../src/algorithms/io/audioloader.h:25, from ../src/algorithms/io/audioloader.cpp:20: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:4473:6: note: declared here 4473 | void av_free_packet(AVPacket pkt); | ^~~~~~ ../src/algorithms/io/audioloader.cpp:247:28: warning: ‘void av_free_packet(AVPacket)’ is deprecated [-Wdeprecated-declarations] 247 | av_free_packet(&_packet); | ^ In file included from ../src/essentia/utils/ffmpegapi.h:24, from ../src/algorithms/io/audioloader.h:25, from ../src/algorithms/io/audioloader.cpp:20: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:4473:6: note: declared here 4473 | void av_free_packet(AVPacket pkt); | ^~~~~~ ../src/algorithms/io/audioloader.cpp: In member function ‘int essentia::streaming::AudioLoader::decode_audio_frame(AVCodecContext, float, int, AVPacket)’: ../src/algorithms/io/audioloader.cpp:264:79: warning: ‘int avcodec_decode_audio4(AVCodecContext, AVFrame, int, const AVPacket)’ is deprecated [-Wdeprecated-declarations] 264 | int len = avcodec_decode_audio4(audioCtx, _decodedFrame, &gotFrame, packet); | ^ In file included from ../src/essentia/utils/ffmpegapi.h:24, from ../src/algorithms/io/audioloader.h:25, from ../src/algorithms/io/audioloader.cpp:20: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:4779:5: note: declared here 4779 | int avcodec_decode_audio4(AVCodecContext avctx, AVFrame frame, | ^~~~~ ../src/algorithms/io/audioloader.cpp:264:79: warning: ‘int avcodec_decode_audio4(AVCodecContext, AVFrame, int, const AVPacket)’ is deprecated [-Wdeprecated-declarations] 264 | int len = avcodec_decode_audio4(audioCtx, _decodedFrame, &gotFrame, packet); | ^ In file included from ../src/essentia/utils/ffmpegapi.h:24, from ../src/algorithms/io/audioloader.h:25, from ../src/algorithms/io/audioloader.cpp:20: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:4779:5: note: declared here 4779 | int avcodec_decode_audio4(AVCodecContext avctx, AVFrame frame, | ^~~~~

In file included from ../src/algorithms/essentia_algorithms_reg.cpp:125: ../src/algorithms/io/audioloader.h: In constructor ‘essentia::streaming::AudioLoader::AudioLoader()’: ../src/algorithms/io/audioloader.h:98:21: warning: ‘void av_register_all()’ is deprecated [-Wdeprecated-declarations] 98 | av_register_all(); | ^ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/essentia/utils/audiocontext.h:26, from ../src/algorithms/io/monowriter.h:24, from ../src/algorithms/essentia_algorithms_reg.cpp:116: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:2050:6: note: declared here 2050 | void av_register_all(void); | ^~~~~~~

In file included from ../src/algorithms/essentia_algorithms_reg.cpp:125: ../src/algorithms/io/audioloader.h:98:21: warning: ‘void av_register_all()’ is deprecated [-Wdeprecated-declarations] 98 | av_register_all(); | ^ In file included from ../src/essentia/utils/ffmpegapi.h:25, from ../src/essentia/utils/audiocontext.h:26, from ../src/algorithms/io/monowriter.h:24, from ../src/algorithms/essentia_algorithms_reg.cpp:116: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:2050:6: note: declared here 2050 | void av_register_all(void); | ^~~~~~~

config.txt

How should I fix these issues?

dbogdanov commented 1 year ago

Hi @an-npt17, According to your config.txt log, TensorFlow-related algorithms are included in the build and are compiled successfully.

If you are using the Python extension, is it possible that you have multiple essentia Python packages on your system and a different one is being imported? You can double check the file path for the imported package to see if it corresponds to your manual installation from source: import essentia; print(essentia.__file__). The manual installation is located at /usr/local/lib/python3.10/dist-packages/essentia/ by default (replace with your Python version).

Also, if this is a default build (without static dependencies), you can check if the Python extension therein is linking to the TensorFlow library with ldd /usr/local/lib/python3.10/dist-packages/essentia/_essentia.cpython-310-x86_64-linux-gnu.so | grep tensorflow.

an-npt17 commented 1 year ago

@dbogdanov thank you so much for your response.

In my issue, it seems like my essentia path is imported from /home/admin/.local/lib/python3.x/site-packages. However, when i switch the python path into dist-packages and import essentia, another issue appears:

Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.8/dist-packages/essentia/init.py", line 1, in from . import _essentia ImportError: /usr/local/lib/python3.8/dist-packages/essentia/_essentia.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZTIN8essentia9streaming10SourceBaseE

Where does this issue come from?

dbogdanov commented 1 year ago

@an-npt17 Which options did you use to build with waf? (You can share the complete waf log is located in build/config.log).

You can check with ldd /usr/local/lib/python3.8/dist-packages/essentia/_essentia.cpython-38-x86_64-linux-gnu.so to see missing shared libraries. Waf build scripts install libessentia.so to /usr/local/lib/libessentia.so by default. Is it missing?

an-npt17 commented 1 year ago

@dbogdanov here is my config.log file config.log

Apparently libessentia.so is missing, how could I configure it?