inputstream.ffmpegdirect
inputstream.ffmpegdirect copied to clipboard
Can't build from source for Kodi 21 on Arch
How are you compiling the code?
If you're using makepkg, or an AUR helper (which just wraps makepkg; for example, yay), then you need to add -flto to your /etc/makepkg.conf:
--- /tmp/makepkg.conf 2023-05-19 18:45:31.000000000 -0400
+++ /etc/makepkg.conf 2023-09-08 22:19:40.401643967 -0400
@@ -33,21 +33,21 @@
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
CARCH="x86_64"
CHOST="x86_64-pc-linux-gnu"
#-- Compiler and Linker Flags
#CPPFLAGS=""
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \
-Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
- -fstack-clash-protection -fcf-protection"
+ -fstack-clash-protection -fcf-protection -flto"
CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
LTOFLAGS="-flto=auto"
#RUSTFLAGS="-C opt-level=2"
#-- Make Flags: change this for DistCC/SMP systems
#MAKEFLAGS="-j2"
#-- Debugging flags
DEBUG_CFLAGS="-g"
DEBUG_CXXFLAGS="$DEBUG_CFLAGS"
#DEBUG_RUSTFLAGS="-C debuginfo=2"
How are you compiling the code? If you're using makepkg, or an AUR helper (which just wraps makepkg; for example, yay), then you need to add
-fltoto your /etc/makepkg.conf:--- /tmp/makepkg.conf 2023-05-19 18:45:31.000000000 -0400 +++ /etc/makepkg.conf 2023-09-08 22:19:40.401643967 -0400 @@ -33,21 +33,21 @@ # ARCHITECTURE, COMPILE FLAGS ######################################################################### # CARCH="x86_64" CHOST="x86_64-pc-linux-gnu" #-- Compiler and Linker Flags #CPPFLAGS="" CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \ -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \ - -fstack-clash-protection -fcf-protection" + -fstack-clash-protection -fcf-protection -flto" CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS" LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" LTOFLAGS="-flto=auto" #RUSTFLAGS="-C opt-level=2" #-- Make Flags: change this for DistCC/SMP systems #MAKEFLAGS="-j2" #-- Debugging flags DEBUG_CFLAGS="-g" DEBUG_CXXFLAGS="$DEBUG_CFLAGS" #DEBUG_RUSTFLAGS="-C debuginfo=2"
I've tried the AUR package with -fltio as well just before trying building from source. Failed.
partial.cli.log posted above shows building from source failing.
Tried again with Kodi Omega Alpha 3 on Arch. Using -flto with kodi-addon-inputstream-ffmpegdirect, PKGBUILD has wrong Omega link, maintainer messaged. https://aur.archlinux.org/packages/kodi-addon-inputstream-ffmpegdirect
Building from source still has errors -kept -flto just in case: https://bin.disroot.org/?add0d849ec1830d6#3UnEmzv4C3SNYSgMyoyqXnwMvdu9f9xdumxNP2KDRHxG
https://github.com/MythTV/mythtv/issues/765
Essentially, a patch is needed for FFmpeg, or a downgrade for binutils. Developers of binutils argue that this is not a BUG, but a feature of the version. Perhaps the FFmpeg version should be updated?
https://github.com/xbmc/inputstream.ffmpegdirect/issues/253#issuecomment-1749871782
Can you make a PKGBUILD for Omega?| I'll be happy to test it.
It's not particularly difficult, but it requires some time. However, where is the PKGBUILD for the Omega branch of Kodi obtained from?
It's not particularly difficult, but it requires some time. However, where is the PKGBUILD for the Omega branch of Kodi obtained from?
If you have installed kodi-git in Arch, this -if corrected-, should install the Omega version: https://aur.archlinux.org/packages/kodi-addon-inputstream-ffmpegdirect PKGBUILD: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=kodi-addon-inputstream-ffmpegdirect
kodi-git binary available from Chaotic-AUR: https://aur.chaotic.cx/
Hi, I just submited the Omega version package to AUR https://aur.archlinux.org/packages/kodi-addon-inputstream-ffmpegdirect-git
This includes check and comments about broken built for aarch64 architecture, and is for Omega branch. It works well on my system (RPi 4). Please test and tell me if all is well.
Kind regards.
kodi-addon-inputstream-ffmpegdirect-git
Removed all Kodi files, installed just kodi-git from Chaotic-AUR, then kodi-addon-inputstream-ffmpegdirect-git gave me:
CC libavformat/adtsenc.o
src/libavcodec/x86/mathops.h: Assembler messages:
src/libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
src/libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
src/libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
src/libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
src/libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
src/libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
src/libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
src/libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
src/libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
src/libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
src/libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
src/libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
src/libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
src/libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
src/libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
src/libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
src/libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
src/libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
src/libavcodec/x86/mathops.h:125: Error: operand type mismatch for `shr'
make[6]: *** [/home/k/.cache/pikaur/build/kodi-addon-inputstream-ffmpegdirect-git/src/inputstream.ffmpegdirect-21.0b2-Omega/build/build/ffmpeg/src/ffmpeg/ffbuild/common.mak:81: libavformat/adtsenc.o] Error 1
make[5]: *** [CMakeFiles/ffmpeg.dir/build.make:86: ffmpeg-prefix/src/ffmpeg-stamp/ffmpeg-build] Error 2
make[4]: *** [CMakeFiles/Makefile2:83: CMakeFiles/ffmpeg.dir/all] Error 2
make[3]: *** [Makefile:136: all] Error 2
make[2]: *** [CMakeFiles/ffmpeg.dir/build.make:86: build/ffmpeg/src/ffmpeg-stamp/ffmpeg-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:220: CMakeFiles/ffmpeg.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
==> ERROR: A failure occurred in build().
Aborting...
On which system are you building ? Mine is working on aarch64 RPi4, but indeed I got the same issue when building on my x86_64 system.. It seems to be an issue with binutil > 2.41. Let me try to figure out how to fix this..
On which system are you building ? Mine is working on aarch64 RPi4, but indeed I got the same issue when building on my x86_64 system.. It seems to be an issue with binutil > 2.41. Let me try to figure out how to fix this..
Arch Linux:
I tend to downgrade binutils, build, then you can upgrade it again.
Are you trying to build the latest version of this addon?
Yes, 21.3.5 this is the PKGBUILD i used, anything changed if i take the master branch version
Fixed by this
Thanks
This is what i have now building for Omega on Arch, any way to fix the issue?
Thanks
same issue: https://github.com/xbmc/inputstream.ffmpegdirect/issues/299
I forgot to mention that Kodi loving peeps -at least on Arch Linux-, may just use the Flatpak version, binaries are already embedded, everything works ok.
https://flathub.org/apps/tv.kodi.Kodi