Issues building CoreELEC from source

Ubuntu 20.04…

PROJECT=Amlogic ARCH=arm tools/download-tool

PROJECT=Amlogic ARCH=arm make image 
=================================================================================
 End Configuration for CoreELEC
 =================================================================================

config/functions: line 328: [: too many arguments
config/functions: line 281: [: too many arguments
fatal: not a git repository (or any of the parent directories): .git
make: *** [Makefile:9: release] Error 128

I moved your post here, since the other topics are meant for supporting users that are using the official builds, so building CoreELEC yourself is off topic in those threads.

To build CoreELEC 9.2 Amlogic-ng

git clone https://github.com/CoreELEC/CoreELEC.git
cd CoreELEC
git checkout coreelec-9.2
PROJECT=Amlogic-ng ARCH=arm make image

To build CoreELEC 9.2 Amlogic

git clone https://github.com/CoreELEC/CoreELEC.git
cd CoreELEC
git checkout coreelec-9.2
PROJECT=Amlogic ARCH=arm make image

To build CoreELEC 19

git clone https://github.com/CoreELEC/CoreELEC.git
cd CoreELEC
git checkout coreelec-19
PROJECT=Amlogic-ce ARCH=arm make image

Thanks!!! :slight_smile:
This my tvbox
x96s905x 2GB / 16gb
Good build?

git clone https://github.com/CoreELEC/CoreELEC.git
cd CoreELEC
git checkout coreelec-19
PROJECT=Amlogic-ce ARCH=arm make image

We will see when you will actually build it.

FAILURE: scripts/build CoreELEC-settings:target during make_target (default)
*********** FAILED COMMAND ***********
make ${PKG_MAKE_OPTS_TARGET}
**************************************
*********** FAILED COMMAND ***********
${SCRIPTS}/build "${1}" "${PARENT_PKG}"
**************************************
FAILURE: scripts/install CoreELEC-settings:target has failed!

I’m almost sure there was something more on screen at the end with some log file reference where you can see where the issue is.

But I think maybe building CoreELEC is just not for you :thinking:

Error here when compiling 19

e[1;33mBUILDe[0m      linux e[1;37m(target)e[0m
    e[1;35mTOOLCHAINe[0m      make (auto-detect)
make[1]: Entering directory '/home/frank/CoreELEC/build.CoreELEC-Amlogic-ng.arm-19/build/linux-821dcbd92b24d9fa1e3361c957ec481cc0a63aaf'
scripts/kconfig/conf  --oldconfig Kconfig
#
# configuration written to .config
#
make[1]: Leaving directory '/home/frank/CoreELEC/build.CoreELEC-Amlogic-ng.arm-19/build/linux-821dcbd92b24d9fa1e3361c957ec481cc0a63aaf'
make[1]: Entering directory '/home/frank/CoreELEC/build.CoreELEC-Amlogic-ng.arm-19/build/linux-821dcbd92b24d9fa1e3361c957ec481cc0a63aaf'
scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config/kernel.release
  CHK     include/config/kernel.release_full
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  HOSTLD  scripts/dtc/dtc
  CHK     scripts/mod/devicetable-offsets.h
/usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x10): múltiplas definições de "yylloc"; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): definido primeiro aqui
collect2: error: ld returned 1 exit status
make[3]: *** [scripts/Makefile.host:110: scripts/dtc/dtc] Erro 1
make[2]: *** [scripts/Makefile.build:648: scripts/dtc] Erro 2
make[1]: *** [Makefile:564: scripts] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/frank/CoreELEC/build.CoreELEC-Amlogic-ng.arm-19/build/linux-821dcbd92b24d9fa1e3361c957ec481cc0a63aaf'
e[1;31mFAILURE: scripts/build linux:target during make_target (package.mk)e[0m
*********** FAILED COMMAND ***********
kernel_make modules
**************************************
*********** FAILED COMMAND ***********
${SCRIPTS}/build "${1}" "${PARENT_PKG}"
**************************************
e[1;31mFAILURE: scripts/install linux:target has failed!e[0m

sudo apt update && sudo apt upgrade
sudo apt install gcc make git unzip wget xz-utils

cd ~
git clone https://github.com/CoreELEC/CoreELEC.git
cd ~/CoreELEC
git checkout 63f44225b09b8f7c2296754c7598cb0286fa8bc7
PROJECT=Amlogic-ce ARCH=arm DEVICE=Amlogic-ng make image

1 Like

frank@Frank-X99-TF:~/CoreELEC$ git checkout 63f44225b09b8f7c2296754c7598cb0286fa8bc7

Note: switching to '63f44225b09b8f7c2296754c7598cb0286fa8bc7'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 63f44225b0 gobject-introspecion: fix building for host
frank@Frank-X99-TF:~/CoreELEC$

git checkout coreelec-19

1 Like

Hi, I’m currently on the latest corelec-19 branch. Try to compile under Gentoo Linux (gcc 10.3.0) with

PROJECT=Amlogic-ce ARCH=arm DEVICE=Amlogic-ng make image

but still get this error:

^[[1;33mBUILD^[[0m      linux ^[[1;37m(target)^[[0m
^[[1;35mTOOLCHAIN^[[0m      make (auto-detect)
make[1]: Entering directory '/home/dev/CoreELEC/build.CoreELEC-Amlogic-ng.arm-19/build/linux-aca1667086a48951c16a17603c30ea9d7e0704dc'
scripts/kconfig/conf  --oldconfig Kconfig
#
# configuration written to .config
#
make[1]: Leaving directory '/home/dev/CoreELEC/build.CoreELEC-Amlogic-ng.arm-19/build/linux-aca1667086a48951c16a17603c30ea9d7e0704dc'
make[1]: Entering directory '/home/dev/CoreELEC/build.CoreELEC-Amlogic-ng.arm-19/build/linux-aca1667086a48951c16a17603c30ea9d7e0704dc'
scripts/kconfig/conf  --silentoldconfig Kconfig
CHK     include/config/kernel.release
CHK     include/config/kernel.release_full
CHK     include/generated/uapi/linux/version.h
CHK     include/generated/utsrelease.h
HOSTLD  scripts/dtc/dtc
/usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x10): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first >
collect2: Fehler: ld gab 1 als Ende-Status zurück
make[3]: *** [scripts/Makefile.host:110: scripts/dtc/dtc] Fehler 1
make[2]: *** [scripts/Makefile.build:648: scripts/dtc] Fehler 2
make[1]: *** [Makefile:564: scripts] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/dev/CoreELEC/build.CoreELEC-Amlogic-ng.arm-19/build/linux-aca1667086a48951c16a17603c30ea9d7e0704dc'
^[[1;31mFAILURE: scripts/build linux:target during make_target (package.mk)^[[0m
*********** FAILED COMMAND ***********
kernel_make modules
**************************************
*********** FAILED COMMAND ***********
${SCRIPTS}/build "${1}" "${PARENT_PKG}"
**************************************
^[[1;31mFAILURE: scripts/install linux:target has failed!^[[0m

Can you explain what the problem is? Maybe something is wrong build the build tools, wrong version, missing package or what ever…
Thanks!

this it’s a issue about a wrong gcc version. I have installed gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)

You can try to put this patch in folder projects/Amlogic-ce/devices/Amlogic-ng/patches/linux

https://github.com/Tomoms/android_kernel_oppo_msm8974/commit/11647f99b4de6bc460e106e876f72fc7af3e54a6.patch

Thank you!

  1. I switched to gcc 8.5.0 and the build finished successfully.
  2. Also tried the patch and build again with gcc 10.3.0. This also resolved in a successful image.

But for general understanding: If I recognized correctly, some packages are built by the system wide gcc and others are built with a gcc which is downloaded by the build process itself. Is that correct and if so why is there a difference?

About | FAQ | Terms of Service | Privacy Policy | Legal Notice