[Fixed] Compile error LE 8.0.1, xz: (stdin): File format not recognized

  • Get the following error while compiling a LE 8.0.1 image.

    Last lines of the output:

    Code
    UNPACK   bcm2835-driver
      UNPACK   dtc
    xz: (stdin): File format not recognized
    tar: Child returned status 1
    tar: Error is not recoverable: exiting now
    Makefile:12: recipe for target 'image' failed
    make: *** [image] Error 2
    @libreelec:~/LibreELEC.tv$

    Based on the output I get that the unpack of dtc fails.
    But don't see an issue with the file.


    Compiled on a newly created VM with Ubuntu 16.04
    Commands used.

    Code
    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install gcc make git
    sudo dpkg-reconfigure dash
    cd ~
    git clone [url]https://github.com/LibreELEC/LibreELEC.tv.git[/url]
    cd ~/LibreELEC.tv
    git checkout 8.0.1
    PREFER_PACKAGE_MIRROR=yes PROJECT=RPi2 ARCH=arm tools/download-tool
    PROJECT=RPi2 ARCH=arm make image


    Link to last ~2000 lines output.
    https://pastebin.com/AMjnZCrq

    Edited once, last by RomMon (April 30, 2017 at 12:40 PM).

  • Hi RomMon,

    I'm not sure if you're seeing the same problem as me, but I'm getting the same error when building for the Raspberry Pi and it's stopping at: UNPACK kernel-firmware

    When I trace back the output I can see that the build is attempting to download an xz file, and gets redirected to a gz file instead.
    It saves the file as an xz file and try's to decompress it as an xz file.

    I couldn't see any downloads happening in your log but the issue seems similar.
    If you can check the file by running the file command on it, it'll tell you the file type (I'm getting "gzip compressed data" which is causing the problem).
    Unfortunately this only diagnoses the problem, I'm unsure how to fix it, it only surfaced for me yesterday when I kicked off a new build.

    Hopefully it'll simply 'go away', but if I find a fix I'll pass it on.
    Regards,
    B.

  • Buzzthebuzzsaw,

    You are right it is not a tar.xz compressed file but tar.gz.

    Code
    $ file dtc-1.4.2.tar.xz  
    dtc-1.4.2.tar.xz: gzip compressed data, from Unix  
      
    $ file bcm2835-driver-2ef9cb6.tar.xz  
    bcm2835-driver-2ef9cb6.tar.xz: XZ compressed data

    On the site I also only see tar.gz sources available: dtc/dtc.git - The Device Tree Compiler

    Changing it to a tar.gz makes it continue:

    Code
    vi ~/LibreELEC.tv/packages/tools/dtc/package.mk  
     change PKG_URL="[url]https://git.kernel.org/cgit/utils/dtc/dtc.git/snapshot/$PKG_VERSION.tar.xz[/url]"
     to PKG_URL="[url]https://git.kernel.org/cgit/utils/dtc/dtc.git/snapshot/$PKG_VERSION.tar.gz[/url]"
    rm ~/LibreELEC.tv/sources/dtc/dtc-1.4.2.tar.xz*
    cd ~/LibreELEC.tv
    PROJECT=RPi2 ARCH=arm make image

    The md5sum is still the same, but now for the correct filetype:

    Code
    $ cat ~/LibreELEC.tv/sources/dtc/dtc-1.4.2.tar.gz.md5
    04891daf4544da49958b60109ed4beb1  sources/dtc/dtc-1.4.2.tar.gz


    make output:

  • Buzzthebuzzsaw, vpeter,

    With your combined advice I finished my first image.

    Code
    $ ls -la ~/LibreELEC.tv/target/
    <snip>
    -rw-rw-r--  1 <user> <group> 131687220 Apr 30 04:34 LibreELEC-RPi2.arm-8.0.1.img.gz
    -rw-r--r--  1 <user> <group>   5932496 Apr 30 04:31 LibreELEC-RPi2.arm-8.0.1.kernel
    -rw-r--r--  1 <user> <group> 134369280 Apr 30 04:32 LibreELEC-RPi2.arm-8.0.1.system
    -rw-rw-r--  1 <user> <group> 145111040 Apr 30 04:33 LibreELEC-RPi2.arm-8.0.1.tar
    $

    The only change I made was with ~/http://LibreELEC.tv/packages/tools/dtc/package.mk changing the download from a xz compressed file to a gzip compressed file.