xbmc / inputstream.ffmpegdirect

Supports streams opened by FFmpeg's libavformat or Kodi's cURL such as plain TS, HLS and DASH (non-DRM) as well as many others. There is support for Archive/Catchup services where there is a replay window and can timeshift across that span. Also provides timeshift for live streams where rewind/pause and fast-forward would not have been available.
GNU General Public License v2.0
57 stars 40 forks source link

Compilation error caused by nettle #263

Closed XJIOP closed 4 months ago

XJIOP commented 5 months ago

I'm trying to compile ffmpegdirect for the Nexus branch.

First I got the Libnettle not found error, then I installed apt install nettle-dev

 apt policy nettle-dev
 nettle-dev:
   Installed: 3.8.1-2
   Candidate: 3.8.1-2
   Version table:
*** 3.8.1-2 500

and continue to compile

 Making all in gl
 Making all in .
 Making all in tests
 Making all in .
 Making all in lib
 Making all in includes
 Making all in x509
 Making all in auth
 Making all in ext
 Making all in algorithms
 Making all in extras
 Making all in accelerated
 Making all in aarch64
 Making all in minitasn1
 Making all in unistring
 Making all in nettle
   CC       mac.lo
 /mnt/ssd/temp/inputstream.ffmpegdirect/build/build/gnutls/src/gnutls/lib/nettle/mac.c:98:40: error: field 'streebog256' has incomplete type
    98 |                 struct streebog256_ctx streebog256;
       |                                        ^~~~~~~~~~~
 /mnt/ssd/temp/inputstream.ffmpegdirect/build/build/gnutls/src/gnutls/lib/nettle/mac.c:99:40: error: field 'streebog512' has incomplete type
    99 |                 struct streebog512_ctx streebog512;
       |                                        ^~~~~~~~~~~
 /mnt/ssd/temp/inputstream.ffmpegdirect/build/build/gnutls/src/gnutls/lib/nettle/mac.c:119:45: error: field 'streebog256' has incomplete type
   119 |                 struct hmac_streebog256_ctx streebog256;
       |                                             ^~~~~~~~~~~
 /mnt/ssd/temp/inputstream.ffmpegdirect/build/build/gnutls/src/gnutls/lib/nettle/mac.c:120:45: error: field 'streebog512' has incomplete type
   120 |                 struct hmac_streebog512_ctx streebog512;
       |                                             ^~~~~~~~~~~
 /mnt/ssd/temp/inputstream.ffmpegdirect/build/build/gnutls/src/gnutls/lib/nettle/mac.c: In function '_mac_ctx_init':
 /mnt/ssd/temp/inputstream.ffmpegdirect/build/build/gnutls/src/gnutls/lib/nettle/mac.c:321:45: error: 'hmac_streebog256_update' undeclared (first use in this function); did you mean 'hmac_streebog256_ctx'?
   321 |                 ctx->update = (update_func) hmac_streebog256_update;
       |                                             ^~~~~~~~~~~~~~~~~~~~~~~
       |                                             hmac_streebog256_ctx
 /mnt/ssd/temp/inputstream.ffmpegdirect/build/build/gnutls/src/gnutls/lib/nettle/mac.c:321:45: note: each undeclared identifier is reported only once for each function it appears in
 /mnt/ssd/temp/inputstream.ffmpegdirect/build/build/gnutls/src/gnutls/lib/nettle/mac.c:322:45: error: 'hmac_streebog256_digest' undeclared (first use in this function); did you mean 'hmac_streebog256_ctx'?
   322 |                 ctx->digest = (digest_func) hmac_streebog256_digest;
       |                                             ^~~~~~~~~~~~~~~~~~~~~~~
       |                                             hmac_streebog256_ctx
 /mnt/ssd/temp/inputstream.ffmpegdirect/build/build/gnutls/src/gnutls/lib/nettle/mac.c:323:47: error: 'hmac_streebog256_set_key' undeclared (first use in this function); did you mean 'hmac_streebog256_ctx'?
   323 |                 ctx->set_key = (set_key_func) hmac_streebog256_set_key;
       |                                               ^~~~~~~~~~~~~~~~~~~~~~~~
       |                                               hmac_streebog256_ctx
 /mnt/ssd/temp/inputstream.ffmpegdirect/build/build/gnutls/src/gnutls/lib/nettle/mac.c:325:31: error: 'STREEBOG256_DIGEST_SIZE' undeclared (first use in this function); did you mean 'SHA256_DIGEST_SIZE'?
   325 |                 ctx->length = STREEBOG256_DIGEST_SIZE;
       |                               ^~~~~~~~~~~~~~~~~~~~~~~
       |                               SHA256_DIGEST_SIZE
 /mnt/ssd/temp/inputstream.ffmpegdirect/build/build/gnutls/src/gnutls/lib/nettle/mac.c:328:45: error: 'hmac_streebog512_update' undeclared (first use in this function); did you mean 'hmac_streebog512_ctx'?
   328 |                 ctx->update = (update_func) hmac_streebog512_update;
       |                                             ^~~~~~~~~~~~~~~~~~~~~~~
       |                                             hmac_streebog512_ctx
 /mnt/ssd/temp/inputstream.ffmpegdirect/build/build/gnutls/src/gnutls/lib/nettle/mac.c:329:45: error: 'hmac_streebog512_digest' undeclared (first use in this function); did you mean 'hmac_streebog512_ctx'?
   329 |                 ctx->digest = (digest_func) hmac_streebog512_digest;
       |                                             ^~~~~~~~~~~~~~~~~~~~~~~
       |                                             hmac_streebog512_ctx
 /mnt/ssd/temp/inputstream.ffmpegdirect/build/build/gnutls/src/gnutls/lib/nettle/mac.c:330:47: error: 'hmac_streebog512_set_key' undeclared (first use in this function); did you mean 'hmac_streebog512_ctx'?
   330 |                 ctx->set_key = (set_key_func) hmac_streebog512_set_key;
       |                                               ^~~~~~~~~~~~~~~~~~~~~~~~
       |                                               hmac_streebog512_ctx
 /mnt/ssd/temp/inputstream.ffmpegdirect/build/build/gnutls/src/gnutls/lib/nettle/mac.c:332:31: error: 'STREEBOG512_DIGEST_SIZE' undeclared (first use in this function); did you mean 'SHA512_DIGEST_SIZE'?
   332 |                 ctx->length = STREEBOG512_DIGEST_SIZE;
       |                               ^~~~~~~~~~~~~~~~~~~~~~~
       |                               SHA512_DIGEST_SIZE
 /mnt/ssd/temp/inputstream.ffmpegdirect/build/build/gnutls/src/gnutls/lib/nettle/mac.c: In function '_ctx_init':
 /mnt/ssd/temp/inputstream.ffmpegdirect/build/build/gnutls/src/gnutls/lib/nettle/mac.c:734:17: warning: implicit declaration of function 'streebog256_init' [-Wimplicit-function-declaration]
   734 |                 streebog256_init(&ctx->ctx.streebog256);
       |                 ^~~~~~~~~~~~~~~~
 /mnt/ssd/temp/inputstream.ffmpegdirect/build/build/gnutls/src/gnutls/lib/nettle/mac.c:734:17: warning: nested extern declaration of 'streebog256_init' [-Wnested-externs]
 /mnt/ssd/temp/inputstream.ffmpegdirect/build/build/gnutls/src/gnutls/lib/nettle/mac.c:735:45: error: 'streebog256_update' undeclared (first use in this function); did you mean 'streebog256_ctx'?
   735 |                 ctx->update = (update_func) streebog256_update;
       |                                             ^~~~~~~~~~~~~~~~~~
       |                                             streebog256_ctx
 /mnt/ssd/temp/inputstream.ffmpegdirect/build/build/gnutls/src/gnutls/lib/nettle/mac.c:736:45: error: 'streebog256_digest' undeclared (first use in this function); did you mean 'streebog256_ctx'?
   736 |                 ctx->digest = (digest_func) streebog256_digest;
       |                                             ^~~~~~~~~~~~~~~~~~
       |                                             streebog256_ctx
 /mnt/ssd/temp/inputstream.ffmpegdirect/build/build/gnutls/src/gnutls/lib/nettle/mac.c:738:31: error: 'STREEBOG256_DIGEST_SIZE' undeclared (first use in this function); did you mean 'SHA256_DIGEST_SIZE'?
   738 |                 ctx->length = STREEBOG256_DIGEST_SIZE;
       |                               ^~~~~~~~~~~~~~~~~~~~~~~
       |                               SHA256_DIGEST_SIZE
 /mnt/ssd/temp/inputstream.ffmpegdirect/build/build/gnutls/src/gnutls/lib/nettle/mac.c:741:17: warning: implicit declaration of function 'streebog512_init' [-Wimplicit-function-declaration]
   741 |                 streebog512_init(&ctx->ctx.streebog512);
       |                 ^~~~~~~~~~~~~~~~
 /mnt/ssd/temp/inputstream.ffmpegdirect/build/build/gnutls/src/gnutls/lib/nettle/mac.c:741:17: warning: nested extern declaration of 'streebog512_init' [-Wnested-externs]
 /mnt/ssd/temp/inputstream.ffmpegdirect/build/build/gnutls/src/gnutls/lib/nettle/mac.c:742:45: error: 'streebog512_update' undeclared (first use in this function); did you mean 'streebog512_ctx'?
   742 |                 ctx->update = (update_func) streebog512_update;
       |                                             ^~~~~~~~~~~~~~~~~~
       |                                             streebog512_ctx
 /mnt/ssd/temp/inputstream.ffmpegdirect/build/build/gnutls/src/gnutls/lib/nettle/mac.c:743:45: error: 'streebog512_digest' undeclared (first use in this function); did you mean 'streebog512_ctx'?
   743 |                 ctx->digest = (digest_func) streebog512_digest;
       |                                             ^~~~~~~~~~~~~~~~~~
       |                                             streebog512_ctx
 /mnt/ssd/temp/inputstream.ffmpegdirect/build/build/gnutls/src/gnutls/lib/nettle/mac.c:745:31: error: 'STREEBOG512_DIGEST_SIZE' undeclared (first use in this function); did you mean 'SHA512_DIGEST_SIZE'?
   745 |                 ctx->length = STREEBOG512_DIGEST_SIZE;
       |                               ^~~~~~~~~~~~~~~~~~~~~~~
       |                               SHA512_DIGEST_SIZE
 make[11]: *** [Makefile:2276: mac.lo] Error 1
 make[10]: *** [Makefile:1906: all] Error 2
 make[9]: *** [Makefile:2371: all-recursive] Error 1
 make[8]: *** [Makefile:1994: all] Error 2
 make[7]: *** [Makefile:1764: all-recursive] Error 1
 make[6]: *** [Makefile:1689: all] Error 2
 make[5]: *** [CMakeFiles/gnutls.dir/build.make:86: gnutls-prefix/src/gnutls-stamp/gnutls-build] Error 2
 make[4]: *** [CMakeFiles/Makefile2:83: CMakeFiles/gnutls.dir/all] Error 2
 make[3]: *** [Makefile:136: all] Error 2
 make[2]: *** [CMakeFiles/gnutls.dir/build.make:86: build/gnutls/src/gnutls-stamp/gnutls-build] Error 2
 make[1]: *** [CMakeFiles/Makefile2:300: CMakeFiles/gnutls.dir/all] Error 2
 make: *** [Makefile:91: all] Error 2
phunkyfish commented 5 months ago

Please don’t post logs in issues. Use a past3 aite please.

As it’s Debian @basilgello fyi

basilgello commented 5 months ago

@XJIOP Let me understand the issue: you decided to build ffmpegdirect 20.x for bookworm and the libnettle oackaged in Debian gives you undefined Streebog ciphersuite implementation? Or you built libnettle yourself first?

XJIOP commented 5 months ago

@basilgello Yes, I want to build ffmpegdirect 20.x for bookworm arm64 on Raspberry Pi 4, when compiling I got "Libnettle not found" after that I installed the package "apt install nettle-dev" further compilation gives errors related to nettle.

Installing "apt install kodi-inputstream-ffmpegdirect" in debian results in an error, so I'm trying to compile it myself

The following packages have unmet dependencies:
 kodi-inputstream-ffmpegdirect : Depends: kodi-api-inputstream (>= 3.2.0)
                                 Depends: kodi-api-inputstream (< 3.3.0)
basilgello commented 5 months ago

Can you please show output of apt policy ?

XJIOP commented 5 months ago

apt policy

Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://archive.raspberrypi.com/debian bookworm/main armhf Packages
     release o=Raspberry Pi Foundation,a=stable,n=bookworm,l=Raspberry Pi Foundation,c=main,b=armhf
     origin archive.raspberrypi.com
 500 http://archive.raspberrypi.com/debian bookworm/main arm64 Packages
     release o=Raspberry Pi Foundation,a=stable,n=bookworm,l=Raspberry Pi Foundation,c=main,b=arm64
     origin archive.raspberrypi.com
 500 http://deb.debian.org/debian bookworm-updates/main armhf Packages
     release v=12-updates,o=Debian,a=stable-updates,n=bookworm-updates,l=Debian,c=main,b=armhf
     origin deb.debian.org
 500 http://deb.debian.org/debian bookworm-updates/main arm64 Packages
     release v=12-updates,o=Debian,a=stable-updates,n=bookworm-updates,l=Debian,c=main,b=arm64
     origin deb.debian.org
 500 http://deb.debian.org/debian-security bookworm-security/main armhf Packages
     release v=12,o=Debian,a=stable-security,n=bookworm-security,l=Debian-Security,c=main,b=armhf
     origin deb.debian.org
 500 http://deb.debian.org/debian-security bookworm-security/main arm64 Packages
     release v=12,o=Debian,a=stable-security,n=bookworm-security,l=Debian-Security,c=main,b=arm64
     origin deb.debian.org
 500 http://deb.debian.org/debian bookworm/non-free-firmware armhf Packages
     release v=12.4,o=Debian,a=stable,n=bookworm,l=Debian,c=non-free-firmware,b=armhf
     origin deb.debian.org
 500 http://deb.debian.org/debian bookworm/non-free-firmware arm64 Packages
     release v=12.4,o=Debian,a=stable,n=bookworm,l=Debian,c=non-free-firmware,b=arm64
     origin deb.debian.org
 500 http://deb.debian.org/debian bookworm/non-free armhf Packages
     release v=12.4,o=Debian,a=stable,n=bookworm,l=Debian,c=non-free,b=armhf
     origin deb.debian.org
 500 http://deb.debian.org/debian bookworm/non-free arm64 Packages
     release v=12.4,o=Debian,a=stable,n=bookworm,l=Debian,c=non-free,b=arm64
     origin deb.debian.org
 500 http://deb.debian.org/debian bookworm/contrib armhf Packages
     release v=12.4,o=Debian,a=stable,n=bookworm,l=Debian,c=contrib,b=armhf
     origin deb.debian.org
 500 http://deb.debian.org/debian bookworm/contrib arm64 Packages
     release v=12.4,o=Debian,a=stable,n=bookworm,l=Debian,c=contrib,b=arm64
     origin deb.debian.org
 500 http://deb.debian.org/debian bookworm/main armhf Packages
     release v=12.4,o=Debian,a=stable,n=bookworm,l=Debian,c=main,b=armhf
     origin deb.debian.org
 500 http://deb.debian.org/debian bookworm/main arm64 Packages
     release v=12.4,o=Debian,a=stable,n=bookworm,l=Debian,c=main,b=arm64
     origin deb.debian.org
Pinned packages:
basilgello commented 5 months ago

Thanks. I thought it is from raspberrypi.com repo but now I am not sure. Let me build the package and check if I can reproduce with plain Debian.

XJIOP commented 5 months ago

I have this fresh installed

Raspberry Pi OS Lite
Release date: December 11th 2023
System: 64-bit
Kernel version: 6.1
Debian version: 12 (bookworm)
Size: 433MB
XJIOP commented 4 months ago

I cloned from git with depth=1 param and compiled it as a non-root user and it completed without errors.