Re: Error: kernelrelease not valid - run 'make prepare' to update it

Randy Dunlap
2021-08-13T15:21:56Z

On 8/13/21 3:18 AM, Masahiro Yamada wrote:
> On Wed, Aug 11, 2021 at 12:19 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>>
>> On 8/10/21 8:16 PM, kernel test robot wrote:
>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>>> head: 9e723c5380c6e14fb91a8b6950563d040674afdb
>>> commit: ba64beb17493a4bfec563100c86a462a15926f24 kbuild: check the minimum assembler version in Kconfig
>>> date: 4 months ago
>>> config: riscv-randconfig-r025-20210810 (attached as .config)
>>> compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d39ebdae674c8efc84ebe8dc32716ec353220530)
>>> reproduce (this is a W=1 build):
>>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>> chmod +x ~/bin/make.cross
>>> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ba64beb17493a4bfec563100c86a462a15926f24
>>> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>> git fetch --no-tags linus master
>>> git checkout ba64beb17493a4bfec563100c86a462a15926f24
>>> # save the attached .config to linux build tree
>>> mkdir build_dir
>>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=riscv prepare
>>>
>>> If you fix the issue, kindly add following tag as appropriate
>>> Reported-by: kernel test robot <lkp@intel.com>
>>>
>>> All errors (new ones prefixed by >>):
>>>
>>>>> Error: kernelrelease not valid - run 'make prepare' to update it
>>> --
>>> clang --target=riscv64-linux-gnu -no-integrated-as --prefix=riscv64-linux-gnu- -Werror=unknown-warning-option: unknown assembler invoked
>>> scripts/Kconfig.include:50: Sorry, this assembler is not supported.
>>> make[3]: *** [scripts/kconfig/Makefile:63: syncconfig] Error 1
>>> make[2]: *** [Makefile:617: syncconfig] Error 2
>>> make[1]: *** [Makefile:726: include/config/auto.conf.cmd] Error 2
>>> make[1]: Failed to remake makefile 'include/config/auto.conf.cmd'.
>>> make[1]: Failed to remake makefile 'include/config/auto.conf'.
>>>>> Error: kernelrelease not valid - run 'make prepare' to update it
>>> make[1]: Target 'prepare' not remade because of errors.
>>> make: *** [Makefile:215: __sub-make] Error 2
>>> make: Target 'prepare' not remade because of errors.
>>
>> Yes, I have noticed this one and a few other ('static') make targets that
>> should not need a .config file. I have a note to myself to ask about these,
>> so thanks for bringing it up.
>
>
> I think it is unrelated.
>
>
>
> The 0-day bot has already shown the real reason
> of the error:
>
> clang --target=riscv64-linux-gnu -no-integrated-as
> --prefix=riscv64-linux-gnu- -Werror=unknown-warning-option: unknown
> assembler invoked
> scripts/Kconfig.include:50: Sorry, this assembler is not supported.
>
>
>
>
> This happens when the proper toolchains are not found.
>
> That is, make.cross passed CROSS_COMPILE=riscv64-linux-gnu-
> to the make command line, but riscv64-linux-gnu binutils
> are not installed on the system.
>
>
>
> Without installing binutils-riscv64-linux-gnu,
> I can see a similar error log.

Hi,

Thanks for the detailed info. I get it.

--
~Randy