Kconfig.pl warning during "make download"

Hi all:

I have seen this warning a few times over the last years in the "make download" phase:

can't open file '/builder/shared-workdir/build/build_dir/target-x86_64_musl/linux-x86_64/linux-5.4.33/.config' at /builder/shared-workdir/build/scripts/kconfig.pl line 32.

That warning was generated by OpenWrt's on build robot. You will see it here:

https://buildbot.openwrt.org/master/images/builders/x86%2F64/builds/277/steps/dlrun/logs/stdio

I have been trying to hunt this warning down, and learn more about the OpenWrt build system in the process.

In file kernel/linux/Makefile there is this definition:

ifeq ($(DUMP),)
  STAMP_BUILT:=$(STAMP_BUILT)_$(shell $(SCRIPT_DIR)/kconfig.pl $(LINUX_DIR)/.config | mkhash md5)
  -include $(LINUX_DIR)/.config
endif

The problem is that file .config does not exist yet when downloading. I guess the kernel configuration file will be created later on in the build process, if the right makefile target is requested.

I do not understand yet what STAMP_BUILT is about. In any case, it seems strange that the OpenWrt makefile will always run kconfig.pl , even if not needed for the specified makefile target.

I wonder what negative effects could have the fact that STAMP_BUILT has a different value the next time the same makefile is run and the kernel .config file actually exists.

Thanks in advance for any help,
rdiez

You have to run at least a make menuconfig and set the Board Info. that generates the .config file.

Did you read what I wrote above? OpenWrt's own build robot generated the warning. Do you think the robot is not doing all build steps properly?

It's a buildroot bug / sloppy coding.

Thanks for confirming that this is a problem.

Is this "buildroot" an external component? There is actually a project with that name: https://en.wikipedia.org/wiki/Buildroot

Otherwise, how would you fix it?

Bulidroot is the OpenWrt term for the makefiles and scripts making up the build system. Iirc it was forked from or at least influenced by buildroot.net ages ago but nowadays it is something completely different.

Not sure which semicolon you're referring to, I haven't looked at the code in detail.

I'm sorry about the semicolon I mentioned, I got mixed up with another issue.

I'm afraid I do not know enough yet about OpenWrt's build system to try to fix this myself. I would need some help about how STAMP_BUILT works.

The long-term goal is fixing this issue:

https://bugs.openwrt.org/index.php?do=details&task_id=2096
FS#2096 - A second 'make' always rebuilds something

I wonder if the Kconfig.pl error is contributing to FS#2096 .