I'm getting the following error when building out and using internal $(call) lines..
Basically, when $(RUST_BINARY) is true, it shells out to the $(RUST_INSTALL_BINARIES) (which is a script file to install the binaries), or, if not, it'll create said binary file
This is the Host/Install
and the corresponding error output.
define Host/Install
[ $(RUST_BINARY) = true ] && ( sh $(RUST_INSTALL_BINARIES) ) || \
( cd $(HOST_BUILD_DIR)/build/dist && \
$(RM) *.gz && \
$(call dl_tar_pack,$(DL_DIR)/$(RUST_INSTALL_FILE_NAME),.) && \
cd $(RUST_TMP_DIR) && \
$(TAR) -xJf $(DL_DIR)/$(RUST_INSTALL_FILE_NAME) && \
find -iname "*.xz" -exec $(TAR) -x -J -f {} ";" && \
find ./* -type f -name install.sh -execdir sh {} --prefix=$(CARGO_HOME) --disable-ldconfig \; && \
$(RM) -rf $(RUST_TMP_DIR))
endef
Output
[ true = true ] && ( sh /home/grommish/openwrt/feeds/packages/lang/rust/install_binaries.sh /home/grommish/openwrt/tmp/rust-install /home/grommish/openwrt/dl/rust-1.49.0-x86_64-unknown-linux-gnu_mips64-openwrt-linux-musl-install.tar.xz /home/grommish/openwrt/staging_dir/hostpkg ) || ( cd /home/grommish/openwrt/build_dir/hostpkg/rust-1.49.0/build/dist && rm -f *.gz && tar --numeric-owner --owner=0 --group=0 --mode=a-s --sort=name ${TAR_TIMESTAMP:+--mtime="$TAR_TIMESTAMP"} -c . | xz -zc -7e > /home/grommish/openwrt/dl/rust-1.49.0-x86_64-unknown-linux-gnu_mips64-openwrt-linux-musl-install.tar.xz && cd /home/grommish/openwrt/tmp/rust-install && tar -xJf /home/grommish/openwrt/dl/rust-1.49.0-x86_64-unknown-linux-gnu_mips64-openwrt-linux-musl-install.tar.xz && find -iname "*.xz" -exec tar -x -J -f {} ";" && find ./* -type f -name install.sh -execdir sh {} --prefix=/home/grommish/openwrt/staging_dir/hostpkg --disable-ldconfig \; && rm -f -rf /home/grommish/openwrt/tmp/rust-install)
xz: (stdin): Unexpected end of input
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
xz: (stdin): Unexpected end of input
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
install: uninstalling component 'rust-dev'
install: creating uninstall script at /home/grommish/openwrt/staging_dir/hostpkg/lib/rustlib/uninstall.sh
install: installing component 'rust-dev'
rust dev installed.
install: creating uninstall script at /home/grommish/openwrt/staging_dir/hostpkg/lib/rustlib/uninstall.sh
install: installing component 'rust-src'
Awesome Source.
mkdir -p /home/grommish/openwrt/staging_dir/hostpkg/stamp
touch /home/grommish/openwrt/build_dir/hostpkg/rust-1.49.0/.built
touch /home/grommish/openwrt/staging_dir/hostpkg/stamp/.rust_installed
make[2]: Leaving directory '/home/grommish/openwrt/feeds/packages/lang/rust'
time: package/feeds/packages/rust/host-compile#68.37#24.73#74.52
make[1]: Leaving directory '/home/grommish/openwrt'
It seems to be $(call dl_tar_pack,$(DL_DIR)/$(RUST_INSTALL_FILE_NAME),.)
, which is designed to tar.xz
(its in ./include/download.mk
) files. In this case, it's going to .tar.xz
everything left in the directory (Which are other *.tar.xz files).
It installs the generated .tar.xz
distro binaries I create, but the dl_tar_pack()
shouldn't be running at all, at that point.
Suggestions?