[mythtv] Switching to cmake: how to add extra ffmpeg params at configure?

Piotr Oniszczuk piotr.oniszczuk at gmail.com
Sat Apr 5 08:55:24 UTC 2025


Ah - forget my last email!
It looks like 

-DCMAKE_INSTALL_PREFIX=/home/piotro/minimyth2-aarch64-next/images/main/usr
-DCMAKE_INSTALL_LIBDIR=/usr/lib

not works

but 

-DCMAKE_INSTALL_PREFIX=/home/piotro/minimyth2-aarch64-next/images/main/usr
-DCMAKE_INSTALL_LIBDIR=lib

works :-)

I see there is kind of safety checks so my mistake in original setup (where i wrongly declared lib install as /home/piotro/minimyth2-aarch64-next/images/main/usr/usr/lib) was hidden by it and corrected to  /usr/lib

sorry for this false alarm

btw: your cmake work is really great!

i see build speedup (compared to automake) something like 15%

btw2: i have come patches related to linunx cross - so if you want to discuss this e.g here - i’ll be more that happy to put some details here….
   
 

> -DCMAKE_INSTALL_PREFIX=/home/piotro/minimyth2-aarch64-next/images/main/usr -DCMAKE_INSTALL_LIBDIR=/usr/libWiadomość napisana przez Piotr Oniszczuk <piotr.oniszczuk at gmail.com> w dniu 5 kwi 2025, o godz. 10:26:
> 
> 
> 
>> Wiadomość napisana przez David Hampton <mythtv at love2code.net> w dniu 4 kwi 2025, o godz. 20:37:
>> 
>>> 
>>> 
>>> i see i have -DMYTH_RUN_PREFIX=/usr
>>> Indeed, it is properly recognised as frontend log says:
>>> 2025-04-01 16:35:06.146787 N  Using runtime prefix = /usr
>>> 
>>> it looks to me like MYTH_RUN_PREFIX works ok for mythtv but not for
>>> mythplugins?
>> 
>> Hi Piotr,
>> 
>> Its your invocation.  The CMAKE_INSTALL_LIBDIR variable is relative to
>> the CMAKE_INSTALL_PREFIX variable, so it should just be set to 'lib'. 
>> You can try leaving it out and see if it gets assigned properly, or you
>> can set it to 'lib' or 'lib64' as needed.
>> 
>> David
>> 
>> 
> 
> Ah - CMAKE_INSTALL_LIBDIR as relative to CMAKE_INSTALL_PREFIX was my initial assumption when i started to play with cmake based build.
> 
> Result was error in install as install process was trying to install libs into /ust/lib (see below)
> To my surprise i discovered: declaring CMAKE_INSTALL_LIBDIR as absolute fixes issue
> (But only for mythtv. it looks like it creates issue for mythplugins)
> 
> So i think there is bug in cmake install script….
> 
> 
> 
> 
> 
> building with CMAKE_INSTALL_LIBDIR as relative to CMAKE_INSTALL_PREFIX:
> 
> config:
> 
> CMAKE configure will be invoked with: -DCMAKE_VERBOSE_MAKEFILE="OFF" --preset qt5 -DCMAKE_INSTALL_PREFIX=/home/piotro/minimyth2-aarch64-next/images/main/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib -DCMAKE_BUILD_TYPE=Release -DPLATFORM_CONFIGURE_ENV=" -fPIC -fuse-linker-plugin" -DQt5_DIR=/home/piotro/minimyth2-aarch64-next/images/main/usr/lib/qt5/lib/cmake/Qt5 -DCMAKE_SYSTEM_PROCESSOR=arm64 -DFF_USER_OPTS=' --arch=arm64 --cross_prefix=aarch64-minimyth-linux-gnu- --sysroot=/home/piotro/minimyth2-aarch64-next/images/main --sysinclude=/home/piotro/minimyth2-aarch64-next/images/main/usr/include --cc=aarch64-minimyth-linux-gnu-gcc --cxx=aarch64-minimyth-linux-gnu-g++ --ld=aarch64-minimyth-linux-gnu-gcc --as=aarch64-minimyth-linux-gnu-gcc --objcc=aarch64-minimyth-linux-gnu-gcc --dep_cc=aarch64-minimyth-linux-gnu-gcc --ar=aarch64-minimyth-linux-gnu-ar --nm=aarch64-minimyth-linux-gnu-nm --ranlib=aarch64-minimyth-linux-gnu-ranlib --host_cc=gcc --host_ld=gcc --cpu=generic --target_os=linux --pkg_config=//home/piotro/minimyth2-aarch64-next/images/build/usr/bin/pkg-config --prefix=/home/piotro/minimyth2-aarch64-next/images/main/usr --libdir=/home/piotro/minimyth2-aarch64-next/images/main/usr/lib --enable-cross-compile --disable-libmp3lame --disable-libx264 --disable-libx265 --disable-libvpx --disable-libxvid --enable-libdav1d --enable-libxml2 --enable-libass --disable-dxva2 --enable-libbluray --disable-libfontconfig --disable-libfreetype --disable-libiec61883 --enable-sdl2 --enable-ffplay --enable-vaapi --enable-libdav1d  --enable-lto --extra-cflags=-flto=auto --extra-ldflags=-flto=auto --enable-v4l2_request --enable-vdpau --enable-libdrm --enable-libudev --disable-stripping --disable-manpages --disable-podpages --disable-doc --disable-nvenc --enable-shared --disable-static --enable-gpl --enable-pic --disable-demuxer=mpegtsraw --disable-indev=dshow' -DPERL_EXECUTABLE=//home/piotro/minimyth2-aarch64-next/images/build/usr/bin/perl -DPython3_EXECUTABLE=//home/piotro/minimyth2-aarch64-next/images/build/usr/bin/python3 -DCMAKE_C_FLAGS='-pipe  -pipe -march=armv8-a+fp+simd -O3 -flto=auto -Wl,-O1 -Wl,--sort-common -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs -Wno-incompatible-pointer-types -Wno-implicit-function-declaration -Wno-null-dereference -Wno-switch-outside-range' -DCMAKE_CXX_FLAGS='-pipe  -pipe -march=armv8-a+fp+simd -O3 -flto=auto -Wl,-O1 -Wl,--sort-common -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs -Wno-null-dereference -Wno-switch-outside-range' -DOPENGL_opengl_LIBRARY=/home/piotro/minimyth2-aarch64-next/images/main/usr/lib/libGL.so <http://libgl.so/> -DENABLE_AUDIO_JACK="OFF" -DENABLE_AUDIO_PULSE="OFF" -DENABLE_ASI="OFF" -DENABLE_MMAL="OFF" -DENABLE_FIREWIRE="OFF" -DENABLE_SYSTEMD_NOTIFY="OFF" -DENABLE_SYSTEMD_JOURNAL="OFF" -DUSING_BINDINGS_PHP="OFF" -DMYTH_RUN_PREFIX=/usr -DMYTH_BINDINGS_INSTALL_ROOT=/ -DFF_PLATFORM_ARGS='--disable-ffplay' -DMYTHTV_SOURCE_BRANCH="master" -DMAKE_EXECUTABLE=//home/piotro/minimyth2-aarch64-next/images/build/usr/bin/make -DPATCH_EXECUTABLE=//home/piotro/minimyth2-aarch64-next/images/build/usr/bin/patch -DMESON_EXECUTABLE=//home/piotro/minimyth2-aarch64-next/images/build/usr/bin/meson -DNINJA_EXECUTABLE=//home/piotro/minimyth2-aarch64-next/images/build/usr/bin/ninja  -D_QTGUI_CONFIG=/home/piotro/minimyth2-aarch64-next/images/main/usr/lib/qt5/include/QtGui/qtgui-config.h
> 
> 
> output:
> 
> -- Install configuration: "Release"
> -- Installing: /usr/lib/libmythdvdnav-36.so <http://libmythdvdnav-36.so/>.36.0
> CMake Error at external/libmythdvdnav/cmake_install.cmake:65 (file):
>  file INSTALL cannot copy file
>  "/home/piotro/minimyth2-aarch64-next/script/myth-master/mythtv.test/work/main.d/mythtv-e1f9afea2d0f9f65193dc554e88b9c9ce5295273/build-qt5/MythTV-prefix/src/MythTV-build/external/libmythdvdnav/libmythdvdnav-36.so <http://libmythdvdnav-36.so/>.36.0"
>  to "/usr/lib/libmythdvdnav-36.so <http://libmythdvdnav-36.so/>.36.0": Permission denied.
> Call Stack (most recent call first):
>  external/cmake_install.cmake:47 (include)
>  cmake_install.cmake:47 (include)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20250405/8c8823dd/attachment.htm>


More information about the mythtv-dev mailing list