Open dreirund opened 2 months ago
The latest version of ffmpeg isn't currently supported.
The question to resolve this is : which is the (recommended) way to specify the path for ffmpeg 4.4?
I tried messing around in cmake parameters and editing a bunch of files with ffmpeg paths (CMakeLists.txt mostly), but so far to no avail; I don't understand the build system.
On Arch Linux, ffmpeg4.4 installs to /usr/include/ffmpeg4.4/
and /usr/lib/ffmpeg4.4/
instead of /usr/include
and /usr/lib
.
How can I make it so the build message,
-- Found FFmpeg: /usr/lib/libavcodec.so;/usr/lib/libavformat.so;/usr/lib/libavutil.so;/usr/lib/libswscale.so
changes to this?
-- Found FFmpeg: /usr/lib/ffmpeg4.4/libavcodec.so;/usr/lib/ffmpeg4.4/libavformat.so;/usr/lib/ffmpeg4.4/libavutil.so;/usr/lib/ffmpeg4.4/libswscale.so
Running cmake from strace -f
with the option -DPKG_CONFIG_ARGN="--with-path=/usr/lib/ffmpeg4.4/pkgconfig"
it turns out that:
cmake/Modules/FindFFmpeg.cmake
:
read(4, "# vim: ts=2 sw=2\n# - Try to find the required ffmpeg components(default: AVFORMAT, AVUTIL, AVCODEC)\n#\n# Once done this will define\n# FFMPEG_FOUND - System has the all required com"..., 8192) = 5643
write(1, "-- Checking for module 'libavcodec'\n", 36) = 36
[pid 2265598] execve("/usr/bin/pkg-config", ["/usr/bin/pkg-config", "--with-path=/usr/lib/ffmpeg4.4/pkgconfig", "--print-errors", "--short-errors", "--exists", "libavcodec"], 0x5cd73a08ec70 /* 92 vars */ <unfinished ...>
[pid 2265598] openat(AT_FDCWD, "/usr/lib/ffmpeg4.4/pkgconfig/libavcodec.pc", O_RDONLY) = 4
[pid 2265598] read(4, "prefix=/usr\nexec_prefix=${prefix}\nlibdir=/usr/lib/ffmpeg4.4\nincludedir=/usr/include/ffmpeg4.4\n\nName: libavcodec\nDescription: FFmpeg codec library\nVersion: 58.134.100\nRequires: \nRequires.private: libswresample >= 3.9.100, libavutil >= 56.70.100\nConflicts:\nLibs: -L${libdir} -lavcodec \nLibs.private: -lvpx -lm -lvpx -lm -lvpx -lm -lvpx -lm -lwebpmux -pthread -lm -latomic -llzma -ldav1d -lopencore-amrwb -lrsvg-2 -lm -lgio-2.0 -lglib-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lcairo -lz -laom -lgsm -lmp3lame -lm -lopencore-amrnb -lopenjp2 -lopus -lrav1e -lspeex -lSvtAv1Enc -ltheoraenc -ltheoradec -logg -lvorbis -lvorbisenc -lwebp -lx264 -lx265 -lxvidcore -lva -lmfx -lstdc++ -ldl\nCflags: -I${includedir}\n", 4096) = 700
write(1, "-- Found libavcodec, version 58.134.100\n", 42) = 42
access("/usr/lib/ffmpeg4.4/libavcodec.so", R_OK) = 0
$PATH
and more, but (this is a problem) never in the place specified by /usr/lib/ffmpeg4.4/pkgconfig/libavcodec.pc
(which contains includedir=/usr/include/ffmpeg4.4
, and /usr/include/ffmpeg4.4/libavcodec/avcodec.h
exists where it should be):
access("/usr/lib/nx/bin/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/lib/nx/bin/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/sbin/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/sbin/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/bin/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/bin/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/lib/jvm/default/bin/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/lib/jvm/default/bin/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/site_perl/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/site_perl/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/vendor_perl/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/vendor_perl/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/core_perl/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/core_perl/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/opt/qt/bin/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/opt/qt/bin/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/home/calimero/.bin/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/home/calimero/.bin/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/include/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/include/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/include/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/include/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/include/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/include/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/X11R6/include/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/X11R6/include/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/X11R6/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/X11R6/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/pkg/include/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/pkg/include/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/pkg/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/pkg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/opt/include/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/opt/include/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/opt/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/opt/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/include/X11/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/include/X11/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/lib/nx/bin/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/lib/nx/bin/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/sbin/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/sbin/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/bin/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/bin/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/lib/jvm/default/bin/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/lib/jvm/default/bin/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/site_perl/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/site_perl/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/vendor_perl/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/vendor_perl/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/core_perl/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/core_perl/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/opt/qt/bin/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/opt/qt/bin/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/home/calimero/.bin/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/home/calimero/.bin/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/include/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/include/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/include/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/include/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/include/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/include/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/X11R6/include/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/X11R6/include/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/X11R6/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/X11R6/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/pkg/include/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/pkg/include/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/pkg/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/pkg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/opt/include/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/opt/include/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/opt/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/opt/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/include/X11/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/include/X11/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/lib/nx/bin/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/lib/nx/bin/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/sbin/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/sbin/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/bin/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/bin/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/lib/jvm/default/bin/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/lib/jvm/default/bin/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/site_perl/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/site_perl/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/vendor_perl/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/vendor_perl/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/core_perl/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/core_perl/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/opt/qt/bin/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/opt/qt/bin/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/home/calimero/.bin/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/home/calimero/.bin/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/include/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/include/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/include/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/include/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/include/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/include/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/X11R6/include/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/X11R6/include/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/X11R6/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/X11R6/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/pkg/include/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/pkg/include/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/pkg/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/pkg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/opt/include/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/opt/include/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/opt/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/opt/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/include/X11/ffmpeg/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/include/X11/libavcodec/avcodec.h", R_OK) = -1 ENOENT (No such file or directory)
cmake/Modules/FindFFmpeg.cmake
announces that the library was never found:
write(1, "-- Could NOT find FFmpeg (missing: FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIRS AVCODEC_LIBRARIES AVCODEC_INCLUDE_DIRS AVFORMAT_LIBRARIES AVFORMAT_INCLUDE_DIRS AVUTIL_LIBRARIES AVUTIL_INCLUDE_DIRS SWSCALE_LIBRARIES SWSCALE_INCLUDE_DIRS) \n", 230) = 230
I think that sdrangel's cmake/Modules/FindFFmpeg.cmake
is doing something wrong and needs fixing.
[edit] my system has ONLY ffmpeg 4.4 installed presently, I forcefully removed ffmpeg 7 for this debugging attempt.
I had to disable demoddatv
in AUR package, for it to be able to compile
https://aur.archlinux.org/packages/sdrangel-git
Quick solution being
-DENABLE_CHANNELRX_DEMODDATV=OFF \
-DENABLE_CHANNELTX_MODDATV=OFF
for cmake
I build the latest state from this git repository according to this recipe on Artix GNU/Linux, GCC version: 14.1.1.
Build fails for me with
datvideorender.cpp:282:46: error: ‘AVCodecContext’ {aka ‘struct AVCodecContext’} has no member named ‘channels’
:The
$CXXFLAGS
in use are-march=native -mtune=native -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -fstack-clash-protection -fcf-protection -w -Wp,-D_GLIBCXX_ASSERTIONS -fpermissive
.Output of the
cmake
call (cmake
command line arguments:-Wno-dev -DARCH_OPT="" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DLIBDSDCC_INCLUDE_DIR=/usr/include/dsdcc -DCM256CC_INCLUDE_DIR=/usr/include/cm256cc
):Also note that I get the following warning during the build process:
Regards!