Hello,
I am trying to compile a package for OpenWRT; I have already done that before (managed to create a couple of packages for small software) ,but this one seems to be harder.
It is Chicken Scheme (call-cc.org). The method for compiling it from sources is
make PLATFORM=linux
make PLATFORM=linux install
So I created this OpenWRT Makefile:
include $(TOPDIR)/rules.mk
PKG_NAME:=chicken-scheme
PKG_VERSION=5.0.0
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/chicken-$(PKG_VERSION)
PKG_SOURCE:=chicken-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://code.call-cc.org/releases/5.0.0/
PKG_MD5SUM:=de22ded475766fceaec3f9db2238ad76
include $(INCLUDE_DIR)/package.mk
define Package/chicken-scheme
SECTION:=lang
CATEGORY:=Languages
TITLE:=Chicken Scheme
URL:=http://call-cc.org
MAINTAINER:=Jeronimo Pellegrini <j_p@aleph0.info>
endef
MAKE_FLAGS += PLATFORM=linux
define Package/chicken-scheme/description
chicken Scheme is a Scheme implementation.
endef
define Package/chicken-scheme/install
$(MAKE) DESTDIR=$(1) PLATFORM=linux install
endef
$(eval $(call BuildPackage,chicken-scheme))
So, during compilation (using the OpenWRT 18.06.2 sources) for a MIPS target (a TP-Link Archer C7) I get the following error .
rm -rf /home/jeronimo/pkg/openwrt-18.06.2/build_dir/target-mips_24kc_musl/chicken-5.0.0/.pkgdir/chicken-scheme.installed /home/jeronimo/pkg/openwrt-18.06.2/build_dir/target-mips_24kc_musl/chicken-5.0.0/.pkgdir/chicken-scheme
mkdir -p /home/jeronimo/pkg/openwrt-18.06.2/build_dir/target-mips_24kc_musl/chicken-5.0.0/.pkgdir/chicken-scheme
make DESTDIR=/home/jeronimo/pkg/openwrt-18.06.2/build_dir/target-mips_24kc_musl/chicken-5.0.0/.pkgdir/chicken-scheme PLATFORM=linux install
make[587]: Entering directory '/home/jeronimo/pkg/openwrt-18.06.2/package/chicken-scheme'
rm -rf /home/jeronimo/pkg/openwrt-18.06.2/build_dir/target-mips_24kc_musl/chicken-5.0.0/.pkgdir/chicken-scheme.installed /home/jeronimo/pkg/openwrt-18.06.2/build_dir/target-mips_24kc_musl/chicken-5.0.0/.pkgdir/chicken-scheme
mkdir -p /home/jeronimo/pkg/openwrt-18.06.2/build_dir/target-mips_24kc_musl/chicken-5.0.0/.pkgdir/chicken-scheme
make DESTDIR=/home/jeronimo/pkg/openwrt-18.06.2/build_dir/target-mips_24kc_musl/chicken-5.0.0/.pkgdir/chicken-scheme PLATFORM=linux install
make[588]: Entering directory '/home/jeronimo/pkg/openwrt-18.06.2/package/chicken-scheme'
make[588]: execvp: /usr/bin/env: Argument list too long
make[588]: *** [Makefile:34: /home/jeronimo/pkg/openwrt-18.06.2/build_dir/target-mips_24kc_musl/chicken-5.0.0/.prepared_bd5cc8bb4dee95857b84eb0685d605f3_6664517399ebbbc92a37c5bb081b5c53_check] Error 127
make[588]: Leaving directory '/home/jeronimo/pkg/openwrt-18.06.2/package/chicken-scheme'
make[587]: *** [Makefile:36: /home/jeronimo/pkg/openwrt-18.06.2/build_dir/target-mips_24kc_musl/chicken-5.0.0/.pkgdir/chicken-scheme.installed] Error 2
make[587]: Leaving directory '/home/jeronimo/pkg/openwrt-18.06.2/package/chicken-scheme'
make[586]: *** [Makefile:36: /home/jeronimo/pkg/openwrt-18.06.2/build_dir/target-mips_24kc_musl/chicken-5.0.0/.pkgdir/chicken-scheme.installed] Error 2
make[586]: Leaving directory '/home/jeronimo/pkg/openwrt-18.06.2/package/chicken-scheme'
make[585]: *** [Makefile:36: /home/jeronimo/pkg/openwrt-18.06.2/build_dir/target-mips_24kc_musl/chicken-5.0.0/.pkgdir/chicken-scheme.installed] Error 2
make[585]: Leaving directory '/home/jeronimo/pkg/openwrt-18.06.2/package/chicken-scheme'
So it looks like the cause is here: execvp: /usr/bin/env: Argument list too long
. So maybe the cross-compiling toolchain is adding lots to an already long argument list? Has this happened with other packages before? Is there an easy way to fix this?
Thank you!
-- J