Image Builder - WRT1900ACS - libdevmapper error


I'm trying to use the image builder to generate a new image for my router.

I do a echo $(opkg list-installed | sed -e "s/\s.*$//") to get a list of all installed pakages and try to build a new image:
make image PROFILE="linksys_wrt1900ac-v2" PACKAGES="attr avahi-dbus-daemon base-files block-mount btrfs-progs busybox ca-bundle ca-certificates cgi-io collectd collectd-mod-cpu collectd-mod-interface collectd-mod-iwinfo collectd-mod-load collectd-mod-memory collectd-mod-network collectd-mod-rrdtool containerd dbus dnsmasq docker dockerd dropbear e2fsprogs fdisk firewall fstools fwtool getrandom hostapd-common ip6tables iptables iptables-mod-extra iw iwinfo jshn jsonfilter kernel kmod-br-netfilter kmod-cfg80211 kmod-crypto-acompress kmod-crypto-aead kmod-crypto-arc4 kmod-crypto-cbc kmod-crypto-crc32c kmod-crypto-cts kmod-crypto-des kmod-crypto-ecb kmod-crypto-hash kmod-crypto-hmac kmod-crypto-manager kmod-crypto-md5 kmod-crypto-null kmod-crypto-pcompress kmod-crypto-sha1 kmod-dax kmod-dm kmod-dnsresolver kmod-fs-btrfs kmod-fs-exportfs kmod-fs-ext4 kmod-fs-nfs kmod-fs-nfs-common kmod-fs-nfs-common-rpcsec kmod-fs-nfs-v4 kmod-fs-nfsd kmod-gpio-button-hotplug kmod-ikconfig kmod-ip6tables kmod-ipt-conntrack kmod-ipt-core kmod-ipt-extra kmod-ipt-nat kmod-ipt-offload kmod-lib-crc-ccitt kmod-lib-crc16 kmod-lib-crc32c kmod-lib-lzo kmod-lib-raid6 kmod-lib-xor kmod-lib-zlib-deflate kmod-lib-zlib-inflate kmod-lib-zstd kmod-mac80211 kmod-mwlwifi kmod-nf-conntrack kmod-nf-conntrack-netlink kmod-nf-conntrack6 kmod-nf-flow kmod-nf-ipt kmod-nf-ipt6 kmod-nf-ipvs kmod-nf-nat kmod-nf-reject kmod-nf-reject6 kmod-nfnetlink kmod-nls-base kmod-ppp kmod-pppoe kmod-pppox kmod-scsi-core kmod-slhc kmod-usb-core kmod-usb-ohci kmod-usb-storage kmod-usb-uhci kmod-veth libatomic1 libattr libavahi-client libavahi-dbus-support libblkid1 libblobmsg-json20210516 libc libcap libcomerr0 libdaemon libdbus libdevmapper-selinux libexpat libext2fs2 libfdisk1 libgcc1 libgmp10 libgnutls libip4tc2 libip6tc2 libiwinfo-data libiwinfo-lua libiwinfo20210430 libjson-c5 libjson-script20210516 libkeyutils1 libltdl7 liblua5.1.5 liblucihttp-lua liblucihttp0 liblzo2 libmount1 libncurses6 libnettle8 libnetwork libnl-tiny1 libopenssl1.1 libpam libpcre libpopt0 libpthread libreadline8 librrd1 librt libseccomp libselinux libsepol libsmartcols1 libss2 libtasn1 libtirpc libubox20210516 libubus-lua libubus20210630 libuci20130104 libuclient20201210 liburing libustream-wolfssl20201210 libuuid1 libuv1 libwebsockets-full libwolfssl4.7.0.66253b90 libwrap libxtables12 logd lua luci luci-app-advanced-reboot luci-app-dockerman luci-app-firewall luci-app-opkg luci-app-samba4 luci-app-statistics luci-base luci-compat luci-i18n-samba4-en luci-lib-base luci-lib-docker luci-lib-ip luci-lib-jsonc luci-lib-nixio luci-mod-admin-full luci-mod-network luci-mod-status luci-mod-system luci-proto-ipv6 luci-proto-ppp luci-ssl luci-theme-bootstrap mtd musl-fts mwlwifi-firmware-88w8864 netifd nfs-kernel-server nfs-utils-libs odhcp6c odhcpd-ipv6only openwrt-keyring opkg ppp ppp-mod-pppoe procd px5g-wolfssl rpcbind rpcd rpcd-mod-file rpcd-mod-iwinfo rpcd-mod-luci rpcd-mod-rrdns rrdcgi1 rrdtool1 runc samba4-libs samba4-server samba4-utils sysstat terminfo tini ttyd ubi-utils uboot-envtools ubox ubus ubusd uci uclient-fetch uhttpd uhttpd-mod-ubus urandom-seed urngd usign wireless-regdb wpad-basic-wolfssl zlib -libdevmapper"

I get the error:

Collected errors:
 * opkg_install_cmd: Cannot install package kmod-crypto-pcompress.
 * opkg_install_cmd: Cannot install package libblobmsg-json20210516.
 * check_data_file_clashes: Package libdevmapper-selinux wants to install file /home/frank/openwrt-imagebuilder-mvebu-cortexa9.Linux-x86_64/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/root-mvebu/usr/lib/
        But that file is already provided by package  * libdevmapper
 * opkg_install_cmd: Cannot install package libdevmapper-selinux.
 * opkg_install_cmd: Cannot install package libjson-script20210516.
 * opkg_install_cmd: Cannot install package libubox20210516.
 * opkg_install_cmd: Cannot 
install package libwolfssl4.7.0.66253b90.
make[2]: *** [Makefile:167: package_install] Error 255
make[1]: *** [Makefile:122: _call_image] Error 2
make: *** [Makefile:240: image] Fejl 2

I have tried with and without "-libdevmapper" in the pakage list.

Any pointers?

Frank Rasmussen

Your huge package list makes absolutely no sense. You are listing also all default packages like netifd, ubox, etc.

And you are wrongly specifying the ABI versions to some, like e.g. libubox20210516 instead of libubox.

Prune the list and only include the top level add-on packages that you want. All their dependencies will get pulled in automatically.

Thanks for the help.
Got further.

Frank Rasmussen