On 6/8/20 3:28 AM, Denis Efremov wrote: > > > On 6/8/20 7:59 AM, Masahiro Yamada wrote: >> On Mon, Jun 8, 2020 at 10:30 AM Guenter Roeck <linux@xxxxxxxxxxxx> wrote: >>> >>> Hi, >>> >>> On Fri, Jun 05, 2020 at 10:39:55AM +0300, Denis Efremov wrote: >>>> Allow user to use alternative implementations of compression tools, >>>> such as pigz, pbzip2, pxz. For example, multi-threaded tools to >>>> speed up the build: >>>> $ make GZIP=pigz BZIP2=pbzip2 >>>> >>>> Variables _GZIP, _BZIP2, _LZOP are used internally because original env >>>> vars are reserved by the tools. The use of GZIP in gzip tool is obsolete >>>> since 2015. However, alternative implementations (e.g., pigz) still rely >>>> on it. BZIP2, BZIP, LZOP vars are not obsolescent. >>>> >>> >>> When building mips:defconfig, this patch results in: >>> >>> Building mips:defconfig ... failed >>> -------------- >>> Error log: >>> /bin/sh: -n: command not found >>> make[3]: *** [kernel/config_data.gz] Error 127 >>> make[3]: *** Deleting file 'kernel/config_data.gz' >>> make[3]: *** Waiting for unfinished jobs.... >>> make[2]: *** [kernel] Error 2 >>> make[2]: *** Waiting for unfinished jobs.... >>> make[1]: *** [autoksyms_recursive] Error 2 >>> make: *** [__sub-make] Error 2 >>> >>> Reverting this patch fixes the problem. Bisect log is attached. >>> >>> Guenter >> > > I tried to reproduce it with cross-compilation on Fedora32. > $ export ARCH=mips > $ export CROSS_COMPILE=mips64-linux-gnu- > $ make defconfig > $ make -j12 > > And the kernel builds successfully. Could you please provide details about your > compilation steps and environment, esp. what "env | grep ZIP" shows, > "gzip --version", "sh --version", "bash --version"? This will be very helpful. > > Additionally: > $ make GZIP=gzip -j12 # works > $ make GZIP=pigz -j12 # works > $ make GZIP=nosuchcommand -j12 # fails, as expected > I use make -j30 ARCH=mips CROSS_COMPILE=mips64-linux- ... ie I don't use environment variables. Using environment variables indeed makes the problem "disappear". Also, it is important to run "make mrproper" first to ensure that the generated file does not already exist. make -j30 ARCH=mips CROSS_COMPILE=mips64-linux- GZIP=gzip ... does not work for me. Guenter