Python not building
#1
I'm trying to compile a build based on the build scripts from Milhouse, but I'm having some trouble. When the build gets to building python it errors out.

I've building on an ubuntu 64 bit vm and the error I get is in the pybuilddir.txt part. It's erroring out with

Could not find platform independent libraries <prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Could not import runny module
generate-posix-vars failed
make: *** [pybuilddir.txt] Error 1

If I modify the Makefile to use the system python it builds, but this can't be right can it?

I'm stuck! Please help!

(I've built kodi15.0 versions before without many issues... but this is really giving me a hard time!)
Reply
#2
"Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]"

If I had to guess you never installed python, or set its location... so the script can't execute.
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Twitter | Help?
Reply
#3
(2015-08-27, 22:08)stevegal Wrote: I'm trying to compile a build based on the build scripts from Milhouse, but I'm having some trouble. When the build gets to building python it errors out.
...
(I've built kodi15.0 versions before without many issues... but this is really giving me a hard time!)

Did you build Kodi 15.0 using my scripts? My build scripts can build either Kodi 16 (master) or Kodi 15.x (stable), and master will currently build using an updated Python 2.7.10 package.

I'd suggest clean building master without Python 2.7.10 (comment out line 11 in oepull.dat) as this has caused build problems in the past - see PR:4279 for details.

If master with the stock Python 2.7.3 then builds OK it's quite possibly some package installed (or not installed) on your build system that is a problem for 2.7.10.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#4
(2015-08-28, 00:35)Milhouse Wrote:
(2015-08-27, 22:08)stevegal Wrote: I'm trying to compile a build based on the build scripts from Milhouse, but I'm having some trouble. When the build gets to building python it errors out.
...
(I've built kodi15.0 versions before without many issues... but this is really giving me a hard time!)

Did you build Kodi 15.0 using my scripts? My build scripts can build either Kodi 16 (master) or Kodi 15.x (stable), and master will currently build using an updated Python 2.7.10 package.

I'd suggest clean building master without Python 2.7.10 (comment out line 11 in oepull.dat) as this has caused build problems in the past - see PR:4279 for details.

If master with the stock Python 2.7.3 then builds OK it's quite possibly some package installed (or not installed) on your build system that is a problem for 2.7.10.

Yeah. I'm using your scripts. I got a little bit further by taking your suggestion of removing the update to 2.7.10 - but it failed on the next part of the python build.

I'm going to do a reinstall of ubuntu, just in case I messed up something in applying some updates recently. Now to find the list if things I need to install for the build...

Thanks again,
Steve
Reply
#5
Got much much further on a fresh ubuntu install. Now failing on the bcm2385-bootloader install with

find: 'build.OpenELEC-RPi2.arm-6.0-devel/bcm2835-bootloader*': No such file or directory.
scripts/unpack: line 154: build.OpenELEC-RPi2.arm-6.0-devel/bcm2835-bootloader-e1e2823/.openelec-unpack: No such file or directory

Sure enough, its not there. but I can see the tar in sources/bcm2835-bootloader.

Seems close... If I untag it into the expected folder will it just proceed?
Reply
#6
Tried it. It looked like there was an incomplete/invalid tar for the bcm boot loader. I manually wget the tar ball again and the build is now past that bit! Super stuff.

One further question if I may...

after I have it built and want to apply a patch to mediacentre, how can I just add my patch into the patches folder and do a rebuild without clean?

Thanks again,
Steve.
Reply
#7
(2015-08-28, 20:27)stevegal Wrote: after I have it built and want to apply a patch to mediacentre, how can I just add my patch into the patches folder and do a rebuild without clean?

kodi patches are added in ipatches.dat - add either a pull request reference, branch comparison, local github reference, or specific commit/patch url. See existing ipatches.dat for examples. Also read the README files.

To perform an incremental build, run autobuild.sh for a specific profile and this will automatically clean all packages that are being patched as part of the build, re-fetch all patches, and then build only the cleaned packages.

If you want to rebuild only a specific package, ie. kodi (aka mediacenter), you'll need to clean the package, refresh the patches for the project, and then re-build, ie.:
Code:
PROFILE=pi2 ./clean.sh kodi
PROFILE=pi2 ./lsPatches.sh -iq && PROFILE=pi2 ./getPatches.sh -b
PROFILE=pi2 ./build.sh
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#8
Awesome. Thanks.

More issues I could do with some help with unfortunately (thanks for you patience so far)

It seems to pulling down the wrong kodi source(and the bcm-bootloader still needs to be manually downloaded). I think its the wrong kodi source as the patch kodi-100.09 fails to apply as the singleton access in Haddon.cpp has changed from GetInstance() in the patch to Get() in the kodi source. I've made sure I checked out the commit of OpenELEC.tv mentioned in your source, but no matter what I do I can't get it to reference the correct build (keeps referencing kodi-15.1-f4dda26).

No idea what's going on Sad. My guess is something with OpenElec scripts rather than yours.. but not sure.

Thanks again for your help so far
Reply
#9
I have no idea what commands you are even running to build this so can't help without more information - upload a build log somewhere. I presume you've read what information I provide with the build scripts?

If you've set everything up correctly you should just need to run "PROFILE=<profile-name> ./autobuild.sh", eg. "PROFILE=pi2 ./autobuild.sh" will build for a Pi2, using OpenELEC master and latest Kodi, firmware, libcec, libnfs etc. from their respective master branches.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#10
Sorry! You are being so helpful and I'm leaving you guessing.

The command I am running is

PROFILE=pi2 ./autobuild.sh

I've checkecked out the OpenElec.tv repository into the build folder using git clone, tried to checkout both head and the specfic commit (git checkout c06668c5) that you referenced.

It runs through and collects all the patches etc and starts to build just fine. However there are a few issues (different for head and c0668c5) for head I need to remove a hard link that the scripts try to create early in the build... and the bcm2865-bootloader and kodi sources both need to be manually wget to allow the build to proceed.
But either way the last thing it gets to is this when it tries to build kodi


00h54m39s: patching file xbmc/linux/LinuxTimezone.cpp
00h54m39s: ^[[1;32mAPPLY PATCH^[[0m ^[[1;37m(common)^[[0m /home/stephen/development/milhouse.0827/OpenELEC.tv/packages/mediacenter/kodi/patches/kodi-100.09-use-a-wrapper-to-setup-systemd-services.patch
00h54m39s: patching file xbmc/addons/Addon.cpp
00h54m39s: Hunk #2 FAILED at 640.
00h54m39s: Hunk #3 FAILED at 656.
00h54m39s: Hunk #4 FAILED at 679.
00h54m39s: Hunk #5 FAILED at 713.
00h54m39s: 4 out of 5 hunks FAILED -- saving rejects to file xbmc/addons/Addon.cpp.rej
00h54m39s: patching file xbmc/addons/Addon.h
00h54m39s: make: *** [release] Error 1
00h54m39s: ## BUILD FINISHED: Sat Aug 29 10:47:16 BST 2015
00h54m39s: ## BUILD DURATION: 3279 seconds
00h54m39s: 52.63% complete [pi2: log] *

As you can see, its trying to apply that patch that is causing difficultly. If I navigate to...
/OpenELEC.tv/build.OpenELEC-RPi2.arm-6.0-devel/kodi-15.1-f4dda26/xbmc/addons and have a look at Addon.cpp

I can see CAddonMgr::Get() whereas in the patch it refers to CAddonMgr::GetInstance() and hence the patch fails to apply. This has changed in the Kodi src, but the patch has not been modified (well, it has been modified in Openelec.tv HEAD).

Thanks again!!! Your help is awesome!
Reply
#11
(2015-08-29, 12:35)stevegal Wrote: I've checkecked out the OpenElec.tv repository into the build folder using git clone, tried to checkout both head and the specfic commit (git checkout c06668c5) that you referenced.

You don't need to do any checking out yourself, leave that to autobuild.sh to manage - branch selection and setting of HEAD etc. is configured via profiles.dat.

(2015-08-29, 12:35)stevegal Wrote: It runs through and collects all the patches etc and starts to build just fine. However there are a few issues (different for head and c0668c5) for head I need to remove a hard link that the scripts try to create early in the build... and the bcm2865-bootloader and kodi sources both need to be manually wget to allow the build to proceed.

I'd like to see this part of your build log, as autobuild.sh should be automatically packaging the latest kodi and bcm2835-bootloader source for you, but presumably this isn't happening if you're having to wget the source yourself.

(2015-08-29, 12:35)stevegal Wrote: But either way the last thing it gets to is this when it tries to build kodi
...
As you can see, its trying to apply that patch that is causing difficultly. If I navigate to...
/OpenELEC.tv/build.OpenELEC-RPi2.arm-6.0-devel/kodi-15.1-f4dda26/xbmc/addons and have a look at Addon.cpp

Yes, there's a patch in oepull.dat, 00_fix_singleton.txt, that "fixes" kodi-100.09-use-a-wrapper-to-setup-systemd-services.patch but because you haven't pasted the complete build log (or at the very least, the start of the build process where the environment is configured and patches refreshed) I have no idea why it's not working.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#12
thanks again!

I can see the fix being applied in the log... I notice that you have some stuff in OpenElec.tv/projects/RPi2... should this be pasted over the openelec git repo version stuff? Perhaps thats the issue?

I'll give it a go and report back.

Thanks again,
Steve
Reply
#13
You don't need to modify or copy anything into the OpenELEC repo - leave that all to the scripts.

It's working for me here, so if it's not working for you then you've missed out a step (or something) and I need your build log to understand what's going on.

If you're fiddling with the contents of the OpenELEC.tv repo then that could cause things to fall apart pretty quickly so stop doing that, just rely on my scripts to do their thing - they're the only thing that should be updating the contents of your OpenELEC.tv repo.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#14
It's bound to be me! Thanks again for answering my noobie questions.

I've just got the scripts from inside one of your builds. Is that the definitive place for them? or are they on github?

If I try and the scripts straight from your build tarball I get the following

[email protected]:~/development/milhouse.0827$ PROFILE=pi2 ./autobuild.sh
Loading profile: pi2 (./autobuild.sh)
/home/stephen/development/milhouse.0827/functions: line 356: ./config/options: No such file or directory

thats why I though I needed to do the OpenELEC.tv repo clone. With that in place it progresses. So I'm definitely missing a step somewhere!

Sorry for being a pain, and thanks again for being so good!
Reply
#15
(2015-08-29, 15:14)stevegal Wrote: I've just got the scripts from inside one of your builds. Is that the definitive place for them? or are they on github?

In addition to the scripts being included inside each build (a form of version control), they're also uploaded to http://www.nmacleod.com/public/oebuild/oebuild.tar.gz whenever there is a bug fix or configuration change, and you could consider this latter archive to always be the "latest" version.

(2015-08-29, 15:14)stevegal Wrote: If I try and the scripts straight from your build tarball I get the following

[email protected]:~/development/milhouse.0827$ PROFILE=pi2 ./autobuild.sh
Loading profile: pi2 (./autobuild.sh)
/home/stephen/development/milhouse.0827/functions: line 356: ./config/options: No such file or directory

thats why I though I needed to do the OpenELEC.tv repo clone. With that in place it progresses. So I'm definitely missing a step somewhere!

Sorry for being a pain, and thanks again for being so good!

You definitely need to clone the OpenELEC.tv repository, I'm just saying that once the repo has been cloned you don't need to make any further manual changes to it - any changes to the repo will be made by my scripts as they're designed to handle that side of things (switch branches, pull updates etc.).

I've noticed there is a small error in the tar file included in each build - the symlinks in the "packages" folder are not valid, and this will be corrected in the next release.

I'd recommend the following approach to setting up the environment when building with my scripts:

Code:
#Ubuntu 16.04 lacks the following dependencies, so add them:
sudo apt-get install curl g++ gawk gperf xsltproc xfonts-utils default-jre libncurses5-dev texinfo ccache u-boot-tools python python3 lzop libjson-perl

#Milhouse scripts have following dependencies:
sudo apt-get install pv pxz pigz pastebinit patchutils

# Create a working directory ("projects"), clone the LibreELEC repo and install scripts to automate the build
mkdir ~/projects
cd ~/projects
git clone git://github.com/LibreELEC/LibreELEC.tv.git
wget -q www.nmacleod.com/public/oebuild/oebuild.tar.gz -O - | tar xzf -
mv build.conf.sample build.conf

In order to avoid Github API rate limiting of 60 requests/hour, create ~/.git.conf with your Github username and password - this increases the rate limit to a much more reasonable 5000 requests/hour:
Code:
GIT_USERNAME="yourgithubusername"
GIT_PASSWORD="yourgithubpassword"

Without github authentication it is unlikely you will be able to access all patches for a build before being denied further access (until the limit is reset after 60 minutes). You can use a Github Personal Access Token in place of your password if you have enabled two-factor authentication.

Now, once you've completed the above, the following should be sufficient to start a successful RPi2 master build:
Code:
PROFILE=pi2 ./autobuild.sh
(Use PROFILE=x86 to build Generic)

Also read the file README.1ST file which is included in oebuild.tar.gz (and will be included inside future tar releases). Other files you should read: profiles.README and README.

If you want to update your installed copy of the scripts (ie. pulling latest bug fixes etc.), then repeat the above wget statement although note this will overwrite control files such as ipatches.dat, lepull.dat and profiles.dat so if you're modifying those files you'll need to reapply your own changes.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Python not building00