Docker build environment for LibreELEC

  • As I do not have a dedicated linux machine I thought I'd try setting up a Docker build environment and run it on my QNAP. There were a few extra packages required to be installed, here is the Dockerfile if anyone else wants to setup a similar environment:

    and then to build:

    Code
    docker build -f Dockerfile -t ubuntu-bionic-dev .

    Only issue is the QNAP is an Arm64 device and the Generic x86 build fails compiling pixman:

    Code
    ../pixman/pixman-x86.c: In function 'detect_cpu_features':                                                                                                                                                                                                            
    ../pixman/pixman-x86.c:90:5: error: unknown register name '%ecx' in 'asm' 

    As far as I can tell it is a cross-compiling issue as it expects an x86 cpu (similar issue), I couldn't find anything relevant on the forum on extra settings for cross-compiling. Does anyone have any suggestions?

    Edited 3 times, last by drc38 (January 3, 2021 at 11:04 AM).

  • Looks like there is an issue with the pixman meson.build logic to detect the host/build architecture, I don't fully understand how it works but setting the mmx and sse2 flags to false after their respective detection logic has provided a workaround to continue with the libreelec build.

  • Does it fail on compiling pixman:host or pixman:target? Please always provide full logs from the failing package.

    Meson may be part of the problem, the package is only configured for configure.

  • You can just rebuild the package:

    Code
    PROJECT=Generic ARCH=x86_64 scripts/clean pixman
    PROJECT=Generic ARCH=x86_64 scripts/build pixman:host

    Or using MT build with generated log:

    Code
    PROJECT=Generic ARCH=x86_64 scripts/clean pixman
    PROJECT=Generic ARCH=x86_64 scripts/buildmt pixman:host

    After changing the package contents the clean step is not needed.

    Use a pastebin site for posting logs. Please add build.LibreELEC-Generic.x86_64-9.80-devel/build/pixman-0.40.0/.x86_64-linux-gnu/build.ninja

    To test configure build type add PKG_TOOLCHAIN="configure" to package.mk.

  • Thanks mglae for the suggestions above, it turns out the QNAP was too slow and had insufficient memory to be a suitable build environment. I have setup a WSL2 environment on my laptop instead which has completed the build without issues.