buildroot failed with errors, what now?

Post Reply
att2
Posts: 153
Joined: Tue Jan 17, 2017 10:56 pm
languages_spoken: english, german
ODROIDs: Odroid C2, Odroid C4 Also : Bananapi, Orangepi, Raspi3
Location: Graz, Austria, Europe
Has thanked: 25 times
Been thanked: 10 times
Contact:

buildroot failed with errors, what now?

Post by att2 »

Hello,
I tried to use buildroot to make a custom image for Odroid c4, but I failed.
I used exactly the instructions from : https://wiki.odroid.com/odroid-c4/softw ... _buildroot
(plus I corrected one typo, it must have been meant "mkdir -p /opt/toolchains" instead of "/opt/toolchain" )

Anyway, after

Code: Select all

"source buildroot/build/setenv.sh odroidc4_release
make "
I got the following errors whilst compiling, after 10-15 minutes or so :

Code: Select all

libtool: install: /usr/bin/install -c tools/kmod /home/arm1/c4_buildroot/output/odroidc4/host/bin/kmod
/usr/bin/make --no-print-directory install-exec-hook
if test "/home/arm1/c4_buildroot/output/odroidc4/host/lib" != "/home/arm1/c4_buildroot/output/odroidc4/host/lib"; then \
	/bin/mkdir -p /home/arm1/c4_buildroot/output/odroidc4/host/lib && \
	so_img_name=$(readlink /home/arm1/c4_buildroot/output/odroidc4/host/lib/libkmod.so) && \
	so_img_rel_target_prefix=$(echo /home/arm1/c4_buildroot/output/odroidc4/host/lib | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
	ln -sf $so_img_rel_target_prefix/home/arm1/c4_buildroot/output/odroidc4/host/lib/$so_img_name /home/arm1/c4_buildroot/output/odroidc4/host/lib/libkmod.so && \
	mv /home/arm1/c4_buildroot/output/odroidc4/host/lib/libkmod.so.* /home/arm1/c4_buildroot/output/odroidc4/host/lib; \
fi
Making install in libkmod/docs
make[4]: Für das Ziel „install-exec-am“ ist nichts zu tun.
make[4]: Für das Ziel „install-data-am“ ist nichts zu tun.
mkdir -p /home/arm1/c4_buildroot/output/odroidc4/host/sbin/
ln -sf ../bin/kmod /home/arm1/c4_buildroot/output/odroidc4/host/sbin/depmod
>>> linux amlogic-4.9-dev Syncing from source dir /home/arm1/c4_buildroot/buildroot/../kernel/aml-4.9
rsync -au --chmod=u=rwX,go=rX --exclude .svn --exclude .git --exclude .hg --exclude .bzr --exclude CVS  /home/arm1/c4_buildroot/buildroot/../kernel/aml-4.9/ /home/arm1/c4_buildroot/output/odroidc4/build/linux-amlogic-4.9-dev
>>> linux amlogic-4.9-dev Patching
test -d /home/arm1/c4_buildroot/buildroot/../kernel/aml-4.9/.git && ln -s /home/arm1/c4_buildroot/buildroot/../kernel/aml-4.9/.git /home/arm1/c4_buildroot/output/odroidc4/build/linux-amlogic-4.9-dev/ || true

Applying 0001-kernel-custom-fix.patch using patch: 
patching file arch/arm64/configs/odroidg12_defconfig
Reversed (or previously applied) patch detected!  Skipping patch.
4 out of 4 hunks ignored -- saving rejects to file arch/arm64/configs/odroidg12_defconfig.rej
patching file drivers/net/wireless/rtl8812au/Makefile
package/pkg-generic.mk:202: recipe for target '/home/arm1/c4_buildroot/output/odroidc4/build/linux-amlogic-4.9-dev/.stamp_patched' failed
make[1]: *** [/home/arm1/c4_buildroot/output/odroidc4/build/linux-amlogic-4.9-dev/.stamp_patched] Error 1
/home/arm1/c4_buildroot/output/odroidc4/Makefile:23: recipe for target '_all' failed
make: *** [_all] Error 2
I am not quite sure how to properly proceed and get a working image file. Any help ?

att2
Posts: 153
Joined: Tue Jan 17, 2017 10:56 pm
languages_spoken: english, german
ODROIDs: Odroid C2, Odroid C4 Also : Bananapi, Orangepi, Raspi3
Location: Graz, Austria, Europe
Has thanked: 25 times
Been thanked: 10 times
Contact:

Re: buildroot failed with errors, what now?

Post by att2 »

Okay, so, I am re-compiling. I found out that "make menuconfig" helps a lot - what I do is I simply remove all options that are problematic to compile.
HOWEVER, some kernal patch seems to go wrong, and I get an "Error 2" when compiling, and there it stops:


[........]

Code: Select all

>>> host-kmod 25 Installing to host directory
PATH="/home/att/c4_buildroot/output/odroidc4/host/bin:/home/att/c4_buildroot/output/odroidc4/host/sbin:/home/att/bin:/home/att/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" PKG_CONFIG="/home/att/c4_buildroot/output/odroidc4/host/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_LIBDIR="/home/att/c4_buildroot/output/odroidc4/host/lib/pkgconfig:/home/att/c4_buildroot/output/odroidc4/host/share/pkgconfig"  /usr/bin/make -j25 install -C /home/att/c4_buildroot/output/odroidc4/build/host-kmod-25/
Making install in .
 /usr/bin/mkdir -p '/home/att/c4_buildroot/output/odroidc4/host/lib'
 /usr/bin/mkdir -p '/home/att/c4_buildroot/output/odroidc4/host/share/bash-completion/completions'
 ./doltlibtool   --mode=install /usr/bin/install -c   libkmod/libkmod.la '/home/att/c4_buildroot/output/odroidc4/host/lib'
 /usr/bin/mkdir -p '/home/att/c4_buildroot/output/odroidc4/host/include'
 /usr/bin/mkdir -p '/home/att/c4_buildroot/output/odroidc4/host/lib/pkgconfig'
 /usr/bin/install -c -m 644 shell-completion/bash/kmod '/home/att/c4_buildroot/output/odroidc4/host/share/bash-completion/completions'
 /usr/bin/install -c -m 644 libkmod/libkmod.h '/home/att/c4_buildroot/output/odroidc4/host/include'
 /usr/bin/install -c -m 644 libkmod/libkmod.pc '/home/att/c4_buildroot/output/odroidc4/host/lib/pkgconfig'
libtool: install: /usr/bin/install -c libkmod/.libs/libkmod.so.2.3.3 /home/att/c4_buildroot/output/odroidc4/host/lib/libkmod.so.2.3.3
libtool: install: (cd /home/att/c4_buildroot/output/odroidc4/host/lib && { ln -s -f libkmod.so.2.3.3 libkmod.so.2 || { rm -f libkmod.so.2 && ln -s libkmod.so.2.3.3 libkmod.so.2; }; })
libtool: install: (cd /home/att/c4_buildroot/output/odroidc4/host/lib && { ln -s -f libkmod.so.2.3.3 libkmod.so || { rm -f libkmod.so && ln -s libkmod.so.2.3.3 libkmod.so; }; })
libtool: install: /usr/bin/install -c libkmod/.libs/libkmod.lai /home/att/c4_buildroot/output/odroidc4/host/lib/libkmod.la
libtool: finish: PATH="/home/att/c4_buildroot/output/odroidc4/host/bin:/home/att/c4_buildroot/output/odroidc4/host/sbin:/home/att/bin:/home/att/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/sbin" ldconfig -n /home/att/c4_buildroot/output/odroidc4/host/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /home/att/c4_buildroot/output/odroidc4/host/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /usr/bin/mkdir -p '/home/att/c4_buildroot/output/odroidc4/host/bin'
  ./doltlibtool   --mode=install /usr/bin/install -c tools/kmod '/home/att/c4_buildroot/output/odroidc4/host/bin'
libtool: install: /usr/bin/install -c tools/kmod /home/att/c4_buildroot/output/odroidc4/host/bin/kmod
/usr/bin/make --no-print-directory install-exec-hook
if test "/home/att/c4_buildroot/output/odroidc4/host/lib" != "/home/att/c4_buildroot/output/odroidc4/host/lib"; then \
        /usr/bin/mkdir -p /home/att/c4_buildroot/output/odroidc4/host/lib && \
        so_img_name=$(readlink /home/att/c4_buildroot/output/odroidc4/host/lib/libkmod.so) && \
        so_img_rel_target_prefix=$(echo /home/att/c4_buildroot/output/odroidc4/host/lib | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
        ln -sf $so_img_rel_target_prefix/home/att/c4_buildroot/output/odroidc4/host/lib/$so_img_name /home/att/c4_buildroot/output/odroidc4/host/lib/libkmod.so && \
        mv /home/att/c4_buildroot/output/odroidc4/host/lib/libkmod.so.* /home/att/c4_buildroot/output/odroidc4/host/lib; \
fi
Making install in libkmod/docs
make[4]: Für das Ziel „install-exec-am“ ist nichts zu tun.
make[4]: Für das Ziel „install-data-am“ ist nichts zu tun.
mkdir -p /home/att/c4_buildroot/output/odroidc4/host/sbin/
ln -sf ../bin/kmod /home/att/c4_buildroot/output/odroidc4/host/sbin/depmod
>>> linux amlogic-4.9-dev Syncing from source dir /home/att/c4_buildroot/buildroot/../kernel/aml-4.9
rsync -au --chmod=u=rwX,go=rX --exclude .svn --exclude .git --exclude .hg --exclude .bzr --exclude CVS  /home/att/c4_buildroot/buildroot/../kernel/aml-4.9/ /home/att/c4_buildroot/output/odroidc4/build/linux-amlogic-4.9-dev
>>> linux amlogic-4.9-dev Patching
test -d /home/att/c4_buildroot/buildroot/../kernel/aml-4.9/.git && ln -s /home/att/c4_buildroot/buildroot/../kernel/aml-4.9/.git /home/att/c4_buildroot/output/odroidc4/build/linux-amlogic-4.9-dev/ || true

Applying 0001-kernel-custom-fix.patch using patch: 
patching file arch/arm64/configs/odroidg12_defconfig
Reversed (or previously applied) patch detected!  Skipping patch.
4 out of 4 hunks ignored -- saving rejects to file arch/arm64/configs/odroidg12_defconfig.rej
patching file drivers/net/wireless/rtl8812au/Makefile
make[1]: *** [package/pkg-generic.mk:206: /home/att/c4_buildroot/output/odroidc4/build/linux-amlogic-4.9-dev/.stamp_patched] Fehler 1
make: *** [/home/att/c4_buildroot/output/odroidc4/Makefile:23: _all] Fehler 2

Can anyone kindly suggest of just what to do to get this right? Any help is greatly appreciated!
Or maybe you know a download link, or you can provide a download link, of just the basic "buildroot" image for Odroid C4? Would be awesome.......
Thanks!

att2
Posts: 153
Joined: Tue Jan 17, 2017 10:56 pm
languages_spoken: english, german
ODROIDs: Odroid C2, Odroid C4 Also : Bananapi, Orangepi, Raspi3
Location: Graz, Austria, Europe
Has thanked: 25 times
Been thanked: 10 times
Contact:

Re: buildroot failed with errors, what now?

Post by att2 »

Oh well, I am getting different errors at different times with different options.....

Latest one:

Code: Select all

>>> alsa-utils 1.1.7 Installing to target
mkdir -p /home/att/c4_buildroot/output/odroidc4/target/var/lib/alsa
for i in usr/sbin/alsaconf usr/sbin/alsactl usr/bin/alsaloop usr/bin/alsamixer usr/bin/alsatplg usr/bin/amixer usr/bin/aplay usr/bin/arecord usr/bin/alsabat usr/bin/iecset usr
/bin/aconnect usr/bin/speaker-test; do /usr/bin/install -D -m 755 /home/att/c4_buildroot/output/odroidc4/host/aarch64-linux-gnu/sysroot/$i /home/att/c4_buildroot/output/odroid
c4/target/$i || exit 1; done
if [ -x "/home/att/c4_buildroot/output/odroidc4/target/usr/bin/speaker-test" ]; then mkdir -p /home/att/c4_buildroot/output/odroidc4/target/usr/share/alsa/speaker-test; mkdir
-p /home/att/c4_buildroot/output/odroidc4/target/usr/share/sounds/alsa; cp -rdpf /home/att/c4_buildroot/output/odroidc4/host/aarch64-linux-gnu/sysroot/usr/share/alsa/speaker-t
est/* /home/att/c4_buildroot/output/odroidc4/target/usr/share/alsa/speaker-test/; cp -rdpf /home/att/c4_buildroot/output/odroidc4/host/aarch64-linux-gnu/sysroot/usr/share/soun
ds/alsa/* /home/att/c4_buildroot/output/odroidc4/target/usr/share/sounds/alsa/; fi
if [ -x "/home/att/c4_buildroot/output/odroidc4/target/usr/sbin/alsactl" ]; then mkdir -p /home/att/c4_buildroot/output/odroidc4/target/usr/share/; rm -rf /home/att/c4_buildro
ot/output/odroidc4/target/usr/share/alsa/; cp -rdpf /home/att/c4_buildroot/output/odroidc4/host/aarch64-linux-gnu/sysroot/usr/share/alsa/ /home/att/c4_buildroot/output/odroidc
4/target/usr/share/alsa/; fi
>>> expat 2.2.6 Downloading
--2022-05-18 12:36:43--  http://downloads.sourceforge.net/project/expat/expat/2.2.6/expat-2.2.6.tar.bz2
Aufl<F6>sen des Hostnamens downloads.sourceforge.net (downloads.sourceforge.net) & 204.68.111.105
Verbindungsaufbau zu downloads.sourceforge.net (downloads.sourceforge.net)|204.68.111.105|:80 & verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet & 404 Not Found
2022-05-18 12:36:44 FEHLER 404: Not Found.

--2022-05-18 12:36:44--  http://openlinux.amlogic.com:8000/download/GPL_code_release/ThirdParty/expat/expat-2.2.6.tar.bz2
Aufl<F6>sen des Hostnamens openlinux.amlogic.com (openlinux.amlogic.com) & 120.25.202.108
Verbindungsaufbau zu openlinux.amlogic.com (openlinux.amlogic.com)|120.25.202.108|:8000 & verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet & 404 Not Found
2022-05-18 12:36:44 FEHLER 404: Not Found.

--2022-05-18 12:36:44--  http://openlinux.amlogic.com:8000/download/GPL_code_release/ThirdParty/expat-2.2.6.tar.bz2
Aufl<F6>sen des Hostnamens openlinux.amlogic.com (openlinux.amlogic.com) & 120.25.202.108
Verbindungsaufbau zu openlinux.amlogic.com (openlinux.amlogic.com)|120.25.202.108|:8000 & verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet & 404 Not Found
2022-05-18 12:36:45 FEHLER 404: Not Found.

make[1]: *** [package/pkg-generic.mk:146: /home/att/c4_buildroot/output/odroidc4/build/expat-2.2.6/.stamp_downloaded] Fehler 1
make: *** [/home/att/c4_buildroot/output/odroidc4/Makefile:23: _all] Fehler 2
So Buildroot cannot find the "expat" code, he cannot download it from anywhere. Why....? How to fix this?

User avatar
rooted
Posts: 9499
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 761 times
Been thanked: 486 times
Contact:

Re: buildroot failed with errors, what now?

Post by rooted »

This is an Amlogic issue, apparently they have moved/removed expat and likely other code from their site.

@tobetter any ideas?

User avatar
tobetter
Posts: 10043
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 640 times
Been thanked: 1714 times
Contact:

Re: buildroot failed with errors, what now?

Post by tobetter »

rooted wrote:
Thu May 19, 2022 4:21 pm
This is an Amlogic issue, apparently they have moved/removed expat and likely other code from their site.

@tobetter any ideas?
Nice timing, I've pushed one commit for the kernel compile issue in the first post but do not have the issue about expat on my test build.

att2
Posts: 153
Joined: Tue Jan 17, 2017 10:56 pm
languages_spoken: english, german
ODROIDs: Odroid C2, Odroid C4 Also : Bananapi, Orangepi, Raspi3
Location: Graz, Austria, Europe
Has thanked: 25 times
Been thanked: 10 times
Contact:

Re: buildroot failed with errors, what now?

Post by att2 »

Oh! Now I see what the problem with "expat" is! They have had a security issue in that version, and they deleted that specific version from the server.
Thus, I was searching in the directory tree for "expat" and I found :
/c4_buildroot/buildroot/package/expat/expat.mk and expat.hash
expat.mk contains the version number, expat.hash the expected hash values, which you can create yourself with the help of md5sum, sha256sum etc.
So in my expat.mk I changed the version number so like:

Code: Select all

EXPAT_VERSION = 2.4.8
and in the expat.hash file :

Code: Select all

# From https://sourceforge.net/projects/expat/files/expat/2.2.6/
md5     0aa62f74c097c96ecbe62e656f352c3b                expat-2.4.8.tar.bz2
sha1    5bc8aed3107a04ba2a35d45646eb079e6abbfe1d        expat-2.4.8.tar.bz2

# Locally calculated
sha256  a247a7f6bbb21cf2ca81ea4cbb916bfb9717ca523631675f99b3d4a5678dcd16        expat-2.4.8.tar.bz2
sha256  8c6b5b6de8fae20b317f4992729abc0e520bfba4c7606cd1e9eeb87418eebdec        COPYING
I had to do the same thing with zlib in order to update it to zlib-1.2.12.tar.xz, but that zlib would still not compile... he said something about missing zlib despite I did install it on the compilation system.

Furthermore, I just tried to re-compile but failed :

Code: Select all

----------------------------------------------------------------------
 /usr/bin/mkdir -p '/home/att/c4_buildroot/output/odroidc4/host/bin'
  ./doltlibtool   --mode=install /usr/bin/install -c tools/kmod '/home/att/c4_buildroot/output/odroidc4/host/bin'
libtool: install: /usr/bin/install -c tools/kmod /home/att/c4_buildroot/output/odroidc4/host/bin/kmod
/usr/bin/make --no-print-directory install-exec-hook
if test "/home/att/c4_buildroot/output/odroidc4/host/lib" != "/home/att/c4_buildroot/output/odroidc4/host/lib"; then \
        /usr/bin/mkdir -p /home/att/c4_buildroot/output/odroidc4/host/lib && \
        so_img_name=$(readlink /home/att/c4_buildroot/output/odroidc4/host/lib/libkmod.so) && \
        so_img_rel_target_prefix=$(echo /home/att/c4_buildroot/output/odroidc4/host/lib | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
        ln -sf $so_img_rel_target_prefix/home/att/c4_buildroot/output/odroidc4/host/lib/$so_img_name /home/att/c4_buildroot/output/odroidc4/host/lib/libkmod.so && \
        mv /home/att/c4_buildroot/output/odroidc4/host/lib/libkmod.so.* /home/att/c4_buildroot/output/odroidc4/host/lib; \
fi
Making install in libkmod/docs
make[4]: Für das Ziel „install-exec-am“ ist nichts zu tun.
make[4]: Für das Ziel „install-data-am“ ist nichts zu tun.
mkdir -p /home/att/c4_buildroot/output/odroidc4/host/sbin/
ln -sf ../bin/kmod /home/att/c4_buildroot/output/odroidc4/host/sbin/depmod
>>> linux amlogic-4.9-dev Syncing from source dir /home/att/c4_buildroot/buildroot/../kernel/aml-4.9
rsync -au --chmod=u=rwX,go=rX --exclude .svn --exclude .git --exclude .hg --exclude .bzr --exclude CVS  /home/att/c4_buildroot/buildroot/../kernel/aml-4.9/ /home/att/c4_buildroot/output/odroidc4/build/linux-amlogic-4.9-dev
>>> linux amlogic-4.9-dev Patching
test -d /home/att/c4_buildroot/buildroot/../kernel/aml-4.9/.git && ln -s /home/att/c4_buildroot/buildroot/../kernel/aml-4.9/.git /home/att/c4_buildroot/output/odroidc4/build/linux-amlogic-4.9-dev/ || true

Applying 0001-kernel-custom-fix.patch using patch: 
patching file arch/arm64/configs/odroidg12_defconfig
Reversed (or previously applied) patch detected!  Skipping patch.
4 out of 4 hunks ignored -- saving rejects to file arch/arm64/configs/odroidg12_defconfig.rej
make[1]: *** [package/pkg-generic.mk:206: /home/att/c4_buildroot/output/odroidc4/build/linux-amlogic-4.9-dev/.stamp_patched] Fehler 1
make: *** [/home/att/c4_buildroot/output/odroidc4/Makefile:23: _all] Fehler 2
.... so I really don't know how to proceed properly.... any help greatly appreciated!!!

kidovate
Posts: 79
Joined: Fri Jun 21, 2013 8:26 am
languages_spoken: english
ODROIDs: All SkiffOS supported
Has thanked: 7 times
Been thanked: 19 times
Contact:

Re: buildroot failed with errors, what now?

Post by kidovate »

SkiffOS supports Odroid C4 using Buildroot, if you

export SKIFF_WORKSPACE=c4
export SKIFF_CONFIG=odroid/c4
make configure

there will be a configured buildroot tree under ./workspaces/c4

https://github.com/skiffos/skiffos

Hope this helps.
These users thanked the author kidovate for the post:
odroid (Wed Jun 08, 2022 9:14 am)

Post Reply

Return to “Other OS”

Who is online

Users browsing this forum: No registered users and 0 guests