openwrt / openwrt/asu

Build fails for some packages that replace busybox apps

Open
#153 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
450
Forks
111
PR merge metrics
No merged PRs in 30d

Description

When trying to build an OpenWRT image where some busybox apps are replaced by standalone utilities from different packages, sometimes the build fails.

Example: Building for "TP-Link TL-WDR4300 v1" with the "OpenWRT default packes only" list plus the "diffutils" package will fail.

The relevant part of the build logs:

Collected errors:
 * check_data_file_clashes: Package busybox wants to install file /home/aparcar/worker/imagebuilder/openwrt/18.06.2/ar71xx/generic/build_dir/target-mips_24kc_musl/root-ar71xx/usr/bin/cmp
	But that file is already provided by package  * diffutils
 * opkg_install_cmd: Cannot install package busybox.
 * check_data_file_clashes: Package busybox wants to install file /home/aparcar/worker/imagebuilder/openwrt/18.06.2/ar71xx/generic/build_dir/target-mips_24kc_musl/root-ar71xx/usr/bin/cmp
	But that file is already provided by package  * diffutils
 * opkg_install_cmd: Cannot install package busybox.

The cause of this error seems to be the ordering of the packages for building. From the start of the build log:

### BUILD COMMAND:

DEFAULTS_HASH=""
REQUEST_HASH="05c83dd416f8"
REQUEST_ID="140"
PROFILE="tl-wdr4300-v1"
PACKAGES="kmod-usb-ledtrig-usbport firewall fstools odhcp6c netifd uboot-envtools kmod-ath9k swconfig iptables dropbear kmod-gpio-button-hotplug kmod-usb2 uci libgcc mtd diffutils ip6tables ppp-mod-pppoe dnsmasq busybox uclient-fetch logd -libc wpad-mini base-files ppp opkg kmod-usb-core odhcpd-ipv6only"
VERSION="18.06.2"
DISTRO="openwrt"
TARGET="ar71xx/generic"
IMAGE_HASH="None"
PACKAGES_HASH="f49592ba1aa6"
./meta image

Relevant here is that "busybox" comes after "diffutils" in the PACKAGES list, which will cause the build to fail. A test build with a PACKAGES list where "busybox" is listed before "diffutils" (e.g. from a package list that contains only "busybox" and "diffutils"), the build will succeed.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the TL-WDR4300 v1 image build with the listed default packages plus diffutils, using the shown ./meta image entry point and PACKAGES ordering. Compare builds with busybox before and after diffutils. Done means the package combination builds successfully regardless of the order in PACKAGES, without the reported file-clash errors.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.