Open mladenb opened 1 year ago
It looks like the situation is that the FFMPEG development libraries on the machine are static, but libavio requires dynamic linking. Normally, Ubuntu will install both the static and dynamic FFMPEG development libraries when using apt install. It may be that you have a custom FFMPEG installation that has only the static files.
You can find the libraries in the /usr/lib/x86_64-linux-gnu directory. The libraries are libavcodec, libavfilter, libavformat, libavutil, libswscale and libswresample. In your case there will probably only be '.a' extension files, what the program is looking for are the '.so' extensions.
Re-installing the FFMPEG libraries is probably the best option, with a caveat.
If there is a custom installation of FFMPEG on the machine, simply running the apt install utility may overwrite the existing files. This might cause other programs to stop working, so you might want to preserve those existing '.a' libraries before attempting to re-install the FFMPEG development libraries, then copy the old '.a' files back.
Thank you for your patience, your feedback is greatly appreciated
You're absolutely right. As soon as you mentioned static ffmpeg libraries, I immediately realized that I recently downloaded those static ffmpeg binaries to just test something with some media files. Thank you a lot for this explanation, really appreciated.
actually, I have to correct myself here.. even after I removed ffmpeg entirely from my system and installed libav*-dev, I had to intervene a bit in order to get this built. Here are the changes I had to make. In the build/ folder:
Hope this helps.
cmake will cache values when it runs, and it may preserve settings that are not useful if the machine configuration has been changed. This can often lead to confusing results if cmake is run multiple times with configuration changes in between runs. It's a good idea to delete the build folder and start from scratch if you don't get the expected result after a configuration change.
In your case the .a file is likely a vestige from a previous cmake run made prior to installing the .so files. If the build folder is deleted and a fresh build folder is created to run cmake, you will probably get a clean build without having to go into the cmake internal files. The command 'sudo rm -R build' from the libonvif directory will remove the build folder entirely. For windows, use the command 'rmdir /q /s build'
i thought that too, but when i did make uninstall or make clean/distclean, something, I also later removed the entire source folder and redownloaded git repo again, and the .a file was still there, weirdly enough.. anyway, like i said, after manually fixing those 3 files, i've managed to actually build everything, so it works now :) thank you :)
Hi,
I can't build the source code on Ubuntu 22.04. Here's the log output: