Open an-npt17 opened 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
.
@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 "
Where does this issue come from?
@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?
@dbogdanov here is my config.log file config.log
Apparently libessentia.so is missing, how could I configure it?
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/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?