Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build from source for Kodi 21 on Arch #250

Open
cg00001 opened this issue Sep 6, 2023 · 18 comments
Open

Can't build from source for Kodi 21 on Arch #250

cg00001 opened this issue Sep 6, 2023 · 18 comments

Comments

@cg00001
Copy link

cg00001 commented Sep 6, 2023

See partial cli.log below.
partial.cli.log

@mcDevnagh
Copy link

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"

@cg00001
Copy link
Author

cg00001 commented Sep 9, 2023

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"

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.

@cg00001
Copy link
Author

cg00001 commented Sep 19, 2023

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

@daiaji
Copy link

daiaji commented Sep 29, 2023

MythTV/mythtv#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?

@daiaji
Copy link

daiaji commented Oct 7, 2023

#253 (comment)

@cg00001
Copy link
Author

cg00001 commented Oct 7, 2023

#253 (comment)

Can you make a PKGBUILD for Omega?|
I'll be happy to test it.

@daiaji
Copy link

daiaji commented Oct 7, 2023

#253 (comment)

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?

@cg00001
Copy link
Author

cg00001 commented Oct 7, 2023

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/

@opengk
Copy link

opengk commented Jan 5, 2024

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.

@cg00001
Copy link
Author

cg00001 commented Jan 7, 2024

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...

@opengk
Copy link

opengk commented Jan 7, 2024

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..

@cg00001
Copy link
Author

cg00001 commented Jan 7, 2024

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:
ter

@ilikenwf
Copy link

I tend to downgrade binutils, build, then you can upgrade it again.

@thepasto
Copy link

This is what i have now building for Omega on Arch, any way to fix the issue?

config.log

Thanks

@phunkyfish
Copy link
Collaborator

Are you trying to build the latest version of this addon?

@thepasto
Copy link

thepasto commented Apr 16, 2024

Yes, 21.3.5 this is the
PKGBUILD i used, anything changed if i take the master branch version

Fixed by this

Thanks

@coffeinflash
Copy link

This is what i have now building for Omega on Arch, any way to fix the issue?

config.log

Thanks

same issue: #299

@cg00001
Copy link
Author

cg00001 commented May 18, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants