Thank you for this. I will give it a try.
Have a great day.
P.
Thank you for this. I will give it a try.
Have a great day.
P.
Good afternoon,
In trying to compile the latest source for LibreElec, I run into an issue. When I try to compile for the Raspberry Pi 4, the compile stops at glib with an error.
I thought it was a problem with the machine I was building on so I started from a fresh install of Ubuntu 21.10. - the machine is a VM so it's not a big deal to setup. The error still occurs.
The error I get seems to imply that too few parameters are passed to the function "close_range" so I did a "Apt update" and "apt upgrade" but it seems to make no difference. The system is already up to date in terms of software or so it tells me.
Here's a bit of the logs of the error:
FAILED: glib/libglib-2.0.a.p/gspawn.c.o
/home/pierre/http://LibreELEC.tv/build.LibreELEC-RPi4.arm-11.0-devel/toolchain/bin/host-gcc -Iglib/libglib-2.0.a.p -Iglib -I../glib -I. -I.. -I/home/pierre/http://LibreELEC.tv/build.LibreELEC-RPi4.arm-11.0-devel/toolchain/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -D_GNU_SOURCE -fno-strict-aliasing -Wduplicated-branches -Wimplicit-fallthrough -Wmisleading-indentation -Wstrict-prototypes -Wunused -Wno-unused-parameter -Wno-bad-function-cast -Wno-cast-function-type -Wno-pedantic -Wno-format-zero-length -Werror=declaration-after-statement -Werror=format=2 -Werror=implicit-function-declaration -Werror=init-self -Werror=missing-include-dirs -Werror=missing-prototypes -Werror=pointer-arith -march=native -O2 -Wall -pipe -Wno-format-security -fPIC -pthread '-DG_LOG_DOMAIN="GLib"' -DGLIB_COMPILATION -MD -MQ glib/libglib-2.0.a.p/gspawn.c.o -MF glib/libglib-2.0.a.p/gspawn.c.o.d -o glib/libglib-2.0.a.p/gspawn.c.o -c ../glib/gspawn.c
../glib/gspawn.c: In function 'safe_closefrom':
../glib/gspawn.c:1497:7: error: too few arguments to function 'close_range'
1497 | if (close_range (lowfd, G_MAXUINT) != 0 && errno == ENOSYS)
| ^~~~~~~~~~~
In file included from /usr/include/unistd.h:1204,
from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24,
from /usr/include/signal.h:328,
from /usr/include/x86_64-linux-gnu/sys/wait.h:36,
from ../glib/gspawn.c:25:
/usr/include/x86_64-linux-gnu/bits/unistd_ext.h:56:12: note: declared here
56 | extern int close_range (unsigned int __fd, unsigned int __max_fd,
| ^~~~~~~~~~~
ninja: build stopped: subcommand failed.
^[[1;31mFAILURE: scripts/build glib:host during make_host (default)^[[0m
*********** FAILED COMMAND ***********
ninja ${NINJA_OPTS} ${PKG_MAKE_OPTS_HOST}
**************************************
^[[1;31mFAILURE: scripts/build glib:host has failed!^[[0m
If anyone has any tips they can share on how to get past that, please let me know. This is by no means urgent.
Thank you.
Pierre
P.S.: I have attached the whole log file in case the error comes from somewhere else.
Milhouse,
Your information was useful. I first tried to build for the Raspberry Pi 3 (using the RPi2 build) and it built perfectly. I'm trying the imx6 build now. Your scripts are very well done and useful. Cheers!
Pierre
Display More
The following post on the Kodi forum gives details of how to run my build scripts:My scripts might work for you as per the instructions in the thread, or you might need to tweak some of the dependencies depending on your OS. If you're already building LibreELEC using the standard build instructions ("PROJECT=imx6 ARCH=arm make release" etc.) then you shouldn't have too many issues - just make sure you install the dependencies required by my scripts (pv pxz pigz pastebinit patchutils).
Once you're setup (don't skip any steps in the post!) you can try "PROFILE=imx6 ./autobuild.sh" although I don't build the IMX6 project myself so have no idea if it will build successfully from LibreELEC master (in theory, it should). If you want to build from the libreelec-8.0 branch (with Kodi 17 final) then use "PROFILE=imx6-stable ./autobuild.sh"
Note that with my scripts when building with "PROFILE=imx6" you're basically building multiple moving targets - you're building latest LE master, latest Kodi master, and the latest masters for over a dozen different addons and libraries (libnfs/libcec), all of which are being updated daily (sometimes several times a day) with changes that can break your build. I update (at least once a day) oebuild.tar.gz with the latest commits and configuration changes to achieve a successful build but of course I'm only building for RPi/RPi2/Generic so you may need to resolve any IMX6-specific breakages yourself.
With "PROFILE=imx6-stable" you're building the LibreELEC/Kodi/addon/libnfs/libcec/etc. versions that are configured in LibreELEC branch libreelec-8.0, which should result in a more stable/predictable/reliable build environment.
Thank you for this valuable information. I will follow the thread and see if I can make it work.
Are you saying you download same sources every day?
VPeter,
Sorry about the long delays in getting back to you.
No, it's just that from time to time, I clean out the source tree to build from a clean source tree to remove old stuff that shouldn't be there anymore. I guess that I cleaned out the tree at the wrong time. It's working great now. (It may be overkill on my part to wipe the tree and rebuild it all - I'm not the be all and end all of software development, it's more of a hobby than anything)
Thanks
P.
Good evening,
I routinely download the latest Milhouse build for my Raspberry Pi 3 and I love the builds. Would someone be able to point me in the right direction on how to compile the same build but for the imx6? I like to keep my boxes on the same build.
If this is something that was asked before, feel free to point me to the thread, I didn't find it while searching.
Thank you
Pierre
vpeter,
As always, thank you for taking the time. This is by no means urgent, I can live a few days with the build I have right now.
I just routinely compile it every night and noticed that it had stopped for some reason and decided to look into it.
Have a great weekend.
P.
Good afternoon,
I'm doing a daily build of LibreELEC and it was working fine but over the last day or two, it looks like my build process is encountering a problem downloading source tarballs from sources.libreelec.tv. It seems that the server is either down or not responding. I thought that maybe something had changed in the source tree and for some reason, my "git pull" wasn't fetching it so I started from a clean source directory to eliminate that possibility but this hasn't helped. I've also checked that the DNS is able to resolve the name to an IP and it does.
Has anyone else encountered this problem? Anyone know how to get around this (minor) issue?
Thanks
P.
vpeter,
Your solution is perfect. It fixes my build. I will modify the script and rebuild for all platforms. Thank you so much for finding the problem.
P.
Good evening,
If someone figures this out, I'd love to hear how this got solved. I poked around trying to find what could be causing this but my knowledge of the code for LibreELEC is very limited. I tried to compile for the three platforms I have here (RPi2, Imx6 and Odroid C2) and they all seem to end with the same error as well. I got the source out of git, if that helps.
For the time being, it's not s showstopper as I use the tar file to update an existing install.
Thanks
P.