From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH/RFC/next 1/1] package/kodi: switch to internal ffmpeg version 3.1.11 build
Date: Sun, 12 Aug 2018 14:30:29 +0200 [thread overview]
Message-ID: <20180812143029.3178d100@windsurf> (raw)
In-Reply-To: <20180811211028.23679-1-bernd.kuhls@t-online.de>
Hello Bernd,
On Sat, 11 Aug 2018 23:10:28 +0200, Bernd Kuhls wrote:
> Kodi 17 is incompatible with ffmpeg-4.x. To prepare the ffmpeg bump we
> switch the current Kodi package to internally build and statically link
> to patched ffmpeg-3.1.11 provided by upstream. Gnutls is added as
> dependency to allow playback of https streams.
>
> Upstream expects Kodi 17 to be used with ffmpeg 3.1.x (see upstream PR
> 12368) so we choose the upstream way to build ffmpeg instead of provi-
> ding a version choice for ffmpeg in buildroot.
>
> This hackish commit can be reverted when Kodi is bumped to version 18,
> currently released as alpha3.
>
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
OK, not nice, but I didn't don't see us having much choice here.
> diff --git a/package/kodi/0004-fix-ffmpeg-internal-cross-build.patch b/package/kodi/0004-fix-ffmpeg-internal-cross-build.patch
> new file mode 100644
> index 0000000000..7f71be3a00
> --- /dev/null
> +++ b/package/kodi/0004-fix-ffmpeg-internal-cross-build.patch
> @@ -0,0 +1,54 @@
> +Fix crosscompiling issues
> +
> +The codepath for KODI_DEPENDSBUILD needs to be used in order to provide
> +the correct crosscompiling options to ffmpeg. The CMake option
> +KODI_DEPENDSBUILD itself can not be enabled because it disables the
> +internal build of libdvd*.
> +
> +To link kodi.bin with the statically built ffmpeg libraries kodi uses
> +a wrapper script which calls pkgconfig. Our pkgconfig is patched to
> +alter paths which breaks the link command in this case. Add a hack
> +to force the usage of unpatched /usr/bin/pkg-config instead.
I don't think you're guaranteed that /usr/bin/pkg-config exists. What
is the problem with our own pkg-config ?
Indeed, our wrapper script only overwrites
PKG_CONFIG_PATH/PKG_CONFIG_LIBDIR if they are not already defined:
DEFAULT_PKG_CONFIG_LIBDIR=${PKGCONFDIR}/../@STAGING_SUBDIR@/usr/lib/pkgconfig:${PKGCONFDIR}/../@STAGING_SUBDIR@/usr/share/pkgconfig
DEFAULT_PKG_CONFIG_SYSROOT_DIR=${PKGCONFDIR}/../@STAGING_SUBDIR@
PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:-${DEFAULT_PKG_CONFIG_LIBDIR}} PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:-${DEFAULT_PKG_CONFIG_SYSROOT_DIR}} exec ${PKGCONFDIR}/pkgconf @STATIC@ "$@"
> +- avformat=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libavcodec`
> +- avcodec=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libavformat`
> +- avfilter=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libavfilter`
> +- avutil=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libavutil`
> +- swscale=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libswscale`
> +- swresample=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libswresample`
> +- gnutls=`PKG_CONFIG_PATH=${DEPENDS_PATH}/lib/pkgconfig/ ${PKG_CONFIG_EXECUTABLE} --libs-only-l --static --silence-errors gnutls`
> ++ avformat=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig /usr/bin/pkg-config --libs --static libavcodec`
> ++ avcodec=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig /usr/bin/pkg-config --libs --static libavformat`
> ++ avfilter=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig /usr/bin/pkg-config --libs --static libavfilter`
> ++ avutil=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig /usr/bin/pkg-config --libs --static libavutil`
> ++ swscale=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig /usr/bin/pkg-config --libs --static libswscale`
> ++ swresample=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig /usr/bin/pkg-config --libs --static libswresample`
> ++ gnutls=`PKG_CONFIG_PATH=${DEPENDS_PATH}/lib/pkgconfig/ /usr/bin/pkg-config --libs-only-l --static --silence-errors gnutls`
Did you try changing PKG_CONFIG_PATH to PKG_CONFIG_LIBDIR ?
PKG_CONFIG_LIBDIR entirely replaces the pkg-config search path, while
PKG_CONFIG_PATH only appends to it. I'd say this should probably fix
your problem, without having to use /usr/bin/pkg-config (and it would
no longer be a hack).
Also, please use a Git-formatted patch, and don't forget your
Signed-off-by, which was missing.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2018-08-12 12:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-11 21:10 [Buildroot] [PATCH/RFC/next 1/1] package/kodi: switch to internal ffmpeg version 3.1.11 build Bernd Kuhls
2018-08-12 12:30 ` Thomas Petazzoni [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180812143029.3178d100@windsurf \
--to=thomas.petazzoni@bootlin.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.