Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/kodi: needs .py modules
Date: Sat, 15 Oct 2016 19:38:57 +0200	[thread overview]
Message-ID: <20161015173857.GJ3668@free.fr> (raw)
In-Reply-To: <1476547851-30531-1-git-send-email-thomas.petazzoni@free-electrons.com>

Thomas, All,

On 2016-10-15 18:10 +0200, Thomas Petazzoni spake thusly:
> From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> 
> Kodi segfaults as soon as it tries to load a python module:
> 
>     Could not find platform independent libraries <prefix>
>     Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
>     ImportError: No module named site
>     Segmentation fault
> 
> Turns out that keeping .py modules (with or without .pyc) fixes the
> issue.
> 
> Currently, Kodi selects python, but since the format of modules is a
> choice, we can not select it.
> 
> Fix that by inverting the dependency on python from Kodi:
>   - turn it into a depends rather than a select,
>   - add the dependency to ! pyc-only
>   - update the comment accordingly.
> 
> In addition, the !MMU and !static dependencies are updated since they
> are no longer needed for Python (we now depend on it rather than
> selecting it), but for other packages. The !MMU dependency is moved to
> the _ARCH_SUPPORTS symbol as well.
> 
> Also, we can no longer "select BR2_PACKAGE_SAMBA4", because samba4
> selects python, and we can no longer select python. Therefore, we switch
> to a "depends on" dependency for samba4, which is fine as a user willing
> to use Kodi with Samba will certainly realize that Samba should be
> enabled.
> 
> Fixes bug #9221.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> [Thomas:
>  - update on latest master
>  - take care of the !MMU/!static dependencies.
>  - take care of the samba4 problem.]
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

[yann.morin.1998 at free.fr: reviewed the samba fix]
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
>  package/kodi/Config.in | 23 +++++++++--------------
>  1 file changed, 9 insertions(+), 14 deletions(-)
> 
> diff --git a/package/kodi/Config.in b/package/kodi/Config.in
> index f388a72..4174c6b 100644
> --- a/package/kodi/Config.in
> +++ b/package/kodi/Config.in
> @@ -1,17 +1,19 @@
>  config BR2_PACKAGE_KODI_ARCH_SUPPORTS
>  	bool
> +	depends on BR2_USE_MMU # libcdio, and others
>  	default y if (BR2_arm || (BR2_mipsel && BR2_TOOLCHAIN_USES_GLIBC) || BR2_i386 || BR2_x86_64) \
>  		&& BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS \
>  		&& BR2_TOOLCHAIN_HAS_SYNC_8
>  
> -comment "kodi needs a uClibc or glibc toolchain w/ C++, threads, wchar, dynamic library, gcc >= 4.7, host gcc >= 4.6"
> +comment "kodi needs python w/ .py modules, a uClibc or glibc toolchain w/ C++, threads, wchar, dynamic library, gcc >= 4.7, host gcc >= 4.6"
>  	depends on BR2_PACKAGE_KODI_ARCH_SUPPORTS
>  	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \
>  		|| !BR2_USE_WCHAR || BR2_STATIC_LIBS \
>  		|| !BR2_HOST_GCC_AT_LEAST_4_6 \
>  		|| !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 \
> -		|| BR2_TOOLCHAIN_USES_MUSL
> -	depends on BR2_USE_MMU
> +		|| BR2_TOOLCHAIN_USES_MUSL \
> +		|| !BR2_PACKAGE_PYTHON \
> +		|| BR2_PACKAGE_PYTHON_PYC_ONLY
>  
>  config BR2_PACKAGE_KODI_EGL_GLES
>  	bool
> @@ -42,10 +44,11 @@ menuconfig BR2_PACKAGE_KODI
>  	depends on BR2_TOOLCHAIN_HAS_THREADS
>  	depends on !BR2_TOOLCHAIN_USES_MUSL
>  	depends on BR2_PACKAGE_KODI_EGL_GLES || BR2_PACKAGE_KODI_GL
> -	depends on BR2_USE_MMU # python
>  	depends on BR2_USE_WCHAR
> -	depends on !BR2_STATIC_LIBS # python
> +	depends on !BR2_STATIC_LIBS # libsquish, and others
>  	depends on BR2_PACKAGE_KODI_ARCH_SUPPORTS
> +	depends on BR2_PACKAGE_PYTHON
> +	depends on !BR2_PACKAGE_PYTHON_PYC_ONLY
>  	select BR2_NEEDS_HOST_JAVA
>  	select BR2_PACKAGE_BOOST
>  	select BR2_PACKAGE_BOOST_THREAD
> @@ -83,7 +86,6 @@ menuconfig BR2_PACKAGE_KODI
>  	select BR2_PACKAGE_OPENSSL
>  	select BR2_PACKAGE_PCRE
>  	select BR2_PACKAGE_PCRE_UCP
> -	select BR2_PACKAGE_PYTHON
>  	select BR2_PACKAGE_PYTHON_BSDDB
>  	select BR2_PACKAGE_PYTHON_BZIP2
>  	select BR2_PACKAGE_PYTHON_CURSES
> @@ -200,16 +202,9 @@ config BR2_PACKAGE_KODI_LIBSHAIRPLAY
>  	  Enable Shairport support.
>  	  Select this if you want to stream content from an Apple device.
>  
> -comment "samba support needs a glibc or uClibc toolchain w/ RPC"
> -	depends on (!BR2_TOOLCHAIN_USES_GLIBC && \
> -		!BR2_TOOLCHAIN_USES_UCLIBC) || !BR2_TOOLCHAIN_HAS_NATIVE_RPC
> -
>  config BR2_PACKAGE_KODI_LIBSMBCLIENT
>  	bool "samba"
> -	depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_UCLIBC
> -	depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC
> -	depends on BR2_TOOLCHAIN_HAS_SYNC_4
> -	select BR2_PACKAGE_SAMBA4
> +	depends on BR2_PACKAGE_SAMBA4
>  	help
>  	  Enable Samba support
>  
> -- 
> 2.7.4
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2016-10-15 17:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-15 16:10 [Buildroot] [PATCH] package/kodi: needs .py modules Thomas Petazzoni
2016-10-15 17:38 ` Yann E. MORIN [this message]
2016-10-15 17:48 ` Peter Korsgaard
  -- strict thread matches above, loose matches on Subject: below --
2015-09-13 21:11 Yann E. MORIN

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=20161015173857.GJ3668@free.fr \
    --to=yann.morin.1998@free.fr \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox