Building fails with "make[2]: *** [package/install] Error 1"


I'm trying to port OpenWrt to a new device, and now I'm in the building stage. Everything went right until it stopped with the following error, which I couldn't solve. Any ideas of what is causing it?

Searching for similar errors only gave some results about Windows Linux Subsystem, which is not my case. I'm using Lubuntu normally installed.

rm -rf /home/username/Desktop/openwrt/openwrt/build_dir/target-mips_mips32_musl/root-bcm63xx /home/username/Desktop/openwrt/openwrt/build_dir/target-mips_mips32_musl/root.orig-bcm63xx
mkdir -p /home/username/Desktop/openwrt/openwrt/build_dir/target-mips_mips32_musl/root-bcm63xx/tmp
IPKG_NO_SCRIPT=1 IPKG_INSTROOT=/home/username/Desktop/openwrt/openwrt/build_dir/target-mips_mips32_musl/root-bcm63xx TMPDIR=/home/username/Desktop/openwrt/openwrt/build_dir/target-mips_mips32_musl/root-bcm63xx/tmp /home/username/Desktop/openwrt/openwrt/staging_dir/host/bin/opkg --offline-root /home/username/Desktop/openwrt/openwrt/build_dir/target-mips_mips32_musl/root-bcm63xx --force-postinstall --add-dest root:/ --add-arch all:100 --add-arch mips_mips32:200 install $(cat /home/username/Desktop/openwrt/openwrt/tmp/opkg_install_list)
cat: /home/username/Desktop/openwrt/openwrt/tmp/opkg_install_list: No such file or directory
/home/username/Desktop/openwrt/openwrt/staging_dir/host/bin/opkg: the ``install'' command requires at least one argument
usage: opkg [options...] sub-command [arguments...]
where sub-command is one of:

Package Manipulation:
	update			Update list of available packages
	upgrade <pkgs>		Upgrade packages
	install <pkgs>		Install package(s)
	configure <pkgs>	Configure unpacked package(s)
	remove <pkgs|regexp>	Remove package(s)
	flag <flag> <pkgs>	Flag package(s)
	 <flag>=hold|noprune|user|ok|installed|unpacked (one per invocation)

Informational Commands:
	list			List available packages
	list-installed		List installed packages
	list-upgradable		List installed and upgradable packages
	list-changed-conffiles	List user modified configuration files
	files <pkg>		List files belonging to <pkg>
	search <file|regexp>	List package providing <file>
	find <regexp>		List packages whose name or description matches <regexp>
	info [pkg|regexp]	Display all info for <pkg>
	status [pkg|regexp]	Display all status for <pkg>
	download <pkg>		Download <pkg> to current directory
	compare-versions <v1> <op> <v2>
	                    compare versions using <= < > >= = << >>
	print-architecture	List installable package architectures
	depends [-A] [pkgname|pat]+
	whatdepends [-A] [pkgname|pat]+
	whatdependsrec [-A] [pkgname|pat]+
	whatrecommends[-A] [pkgname|pat]+
	whatsuggests[-A] [pkgname|pat]+
	whatprovides [-A] [pkgname|pat]+
	whatconflicts [-A] [pkgname|pat]+
	whatreplaces [-A] [pkgname|pat]+

	-A			Query all packages not just those installed
	-V[<level>]		Set verbosity level to <level>.
	--verbosity[=<level>]	Verbosity levels:
					0 errors only
					1 normal messages (default)
					2 informative messages
					3 debug
					4 debug level 2
	-f <conf_file>		Use <conf_file> as the opkg configuration file
	--conf <conf_file>
	--cache <directory>	Use a package cache
	-d <dest_name>		Use <dest_name> as the the root directory for
	--dest <dest_name>	package installation, removal, upgrading.
				<dest_name> should be a defined dest name from
				the configuration file, (but can also be a
				directory name in a pinch).
	-o <dir>		Use <dir> as the root directory for
	--offline-root <dir>	offline installation of packages.
	--verify-program <path>	Use the given program to verify usign signatures
	--add-arch <arch>:<prio>	Register architecture with given priority
	--add-dest <name>:<path>	Register destination with given path

Force Options:
	--force-depends		Install/remove despite failed dependencies
	--force-maintainer	Overwrite preexisting config files
	--force-reinstall	Reinstall package(s)
	--force-overwrite	Overwrite files from other package(s)
	--force-downgrade	Allow opkg to downgrade packages
	--force-space		Disable free space checks
	--force-postinstall	Run postinstall scripts even in offline mode
	--force-remove	Remove package even if prerm script fails
	--force-checksum	Don't fail on checksum mismatches
	--no-check-certificate Don't validate SSL certificates
	--noaction		No action -- test only
	--download-only	No action -- download only
	--nodeps		Do not follow dependencies
	--nocase		Perform case insensitive pattern matching
	--size			Print package size when listing available packages
	--strip-abi		Print package name without appended ABI version
				Remove package and all dependencies
	--autoremove		Remove packages that were installed
				automatically to satisfy dependencies
	-t			Specify tmp-dir.
	--tmp-dir		Specify tmp-dir.
	-l			Specify lists-dir.
	--lists-dir		Specify lists-dir.

 regexp could be something like 'pkgname*' '*file*' or similar
 e.g. opkg info 'libstd*' or opkg search '*libop*' or opkg remove 'libncur*'
make[2]: *** [package/install] Error 1
make[2]: Leaving directory `/home/username/Desktop/openwrt/openwrt'
make[1]: *** [/home/username/Desktop/openwrt/openwrt/staging_dir/target-mips_mips32_musl/stamp/.package_install] Error 2
make[1]: Leaving directory `/home/username/Desktop/openwrt/openwrt'
make: *** [world] Error 2

Thanks in advance

Looks like your building system had a brain fart, and is confused about where all the files are supposed to be placed... perhaps you have configured a wrong path somewhere, perhaps you moved things around and forgot to update something.

Finally seems like it was a problem with make version.

I tried starting a new build and I noticed that the build process complained about a wrong make version. After running "type -a make" I found that I had two copies of make in my system:

  • one from the repositories , 4.1.
  • another one outdated, probably installed manually long ago. 3.8x
    The one that was executed was this last one. After deleting it manually and running "hash -d make", now make version is 4.1.

I tried resuming the build and now it stops in another point related with the files that I had edited for adding my device, so it seems that the issue was caused only by the make version.

Thanks for your help

1 Like