Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 560196 - media-tv/kodi fails to cross-compile while configuring
Summary: media-tv/kodi fails to cross-compile while configuring
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-11 10:16 UTC by Vince C.
Modified: 2017-01-02 19:09 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Kodi-15.1 config log (config.log,135.48 KB, text/plain)
2015-09-11 10:16 UTC, Vince C.
Details
kodi-15.1 build environment (environment,170.78 KB, text/plain)
2015-09-11 10:17 UTC, Vince C.
Details
kodi-15.1.ebuild cross compile patch (kodi-15.1.ebuild.cross-patch,4.41 KB, patch)
2015-10-04 20:44 UTC, Atman Sense
Details | Diff
Cross compile support for kodi-16.{0,1} (kodi-16.x.patch,1.14 KB, patch)
2016-08-06 14:51 UTC, Gerhard Bräunlich
Details | Diff
Taking into account texturepacker use flag (kodi-16.x.patch,1.22 KB, patch)
2016-08-06 15:02 UTC, Gerhard Bräunlich
Details | Diff
Cross compile support for kodi-16.{0,1} (kodi-16.x.patch,1.22 KB, patch)
2016-08-06 15:04 UTC, Gerhard Bräunlich
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vince C. 2015-09-11 10:16:42 UTC
Created attachment 411598 [details]
Kodi-15.1 config log

Cross-compiling Kodi-15.1 for ARM fails during the configure phase with the following error:

checking consistency of all components of python development environment... no
configure: error: in `/portage/tmp/portage/media-tv/kodi-15.1/work/xbmc-15.1-Isengard':
configure: error:
  Could not link test program to Python. Maybe the main Python library has been
  installed in some non-standard library path. If so, pass it to configure,
  via the LDFLAGS environment variable.
  Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
  ============================================================================
   ERROR!
   You probably have to install the development version of the Python package
   for your distribution.  The exact name of this package varies among them.
  ============================================================================

See `config.log' for more details

From viewing `config.log` it appears to me that the tests involved do link to files from the host system (x86) instead of the target system (ARM):

configure:22786: armv7a-hardfloat-linux-gnueabi-gcc -o conftest -DNDEBUG=1 -O2 -pipe -fomit-frame-pointer -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -I/usr/include/python2.7 -Wl,-O1 -Wl,--as-needed conftest.c  -L/usr/lib64 -lpython2.7 -Xlinker -export-dynamic -lpthread -ldl  -lutil -lm >&5
cc1: warning: include location "/usr/include/python2.7" is unsafe for cross-compilation [-Wpoison-system-directories]
In file included from /usr/include/python2.7/Python.h:8:0,
                 from conftest.c:107:
/usr/include/python2.7/pyconfig.h:1034:0: warning: "SIZEOF_SIZE_T" redefined [enabled by default]
 #define SIZEOF_SIZE_T 8
 ^
conftest.c:94:0: note: this is the location of the previous definition
 #define SIZEOF_SIZE_T 4
 ^
In file included from /usr/include/python2.7/Python.h:58:0,
                 from conftest.c:107:
/usr/include/python2.7/pyport.h:886:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
 #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."


I am attaching the config.log in question.
Comment 1 Vince C. 2015-09-11 10:17:44 UTC
Created attachment 411600 [details]
kodi-15.1 build environment
Comment 2 Vince C. 2015-09-11 10:24:46 UTC
I know Kodi for ARM is but a piece of cake but I am willing to cooperate and devote my time on this. So any suggestion is warmly welcome :-) .
Comment 3 Atman Sense 2015-10-04 20:44:37 UTC
Created attachment 413746 [details, diff]
kodi-15.1.ebuild cross compile patch

try this patch against kodi-15.1.ebuild
Comment 4 Gerhard Bräunlich 2016-08-06 14:51:00 UTC
Created attachment 442682 [details, diff]
Cross compile support for kodi-16.{0,1}

I successfully cross-comiled kodi-16.1 with this patch for armv6j-hardfloat-linux-gnueabi (raspberry pi).
I also had to use the raspberry pi related changes from #471200.
This is only the cross-compile part.
It could be applied to kodi independently from rpi.
Comment 5 Gerhard Bräunlich 2016-08-06 15:02:34 UTC
Created attachment 442684 [details, diff]
Taking into account texturepacker use flag
Comment 6 Gerhard Bräunlich 2016-08-06 15:04:06 UTC
Created attachment 442686 [details, diff]
Cross compile support for kodi-16.{0,1}

Taking into account texturepacker use flag (Description <-> Comment)
Comment 7 Gerhard Bräunlich 2016-09-24 07:03:22 UTC
Also filed a pull request:
https://github.com/gentoo/gentoo/pull/2392