A second 'make' always rebuilds something

R. Diez rdiezmail-openwrt at yahoo.com
Wed Jan 30 02:17:50 PST 2019


Hi all:

I am helping build Freifunk images (based on Gluon, which is based on 
OpenWrt) and we have very long build times. That is the reason why I am 
taking a closer look.

I just checked out OpenWrt HEAD and built a standard x86_64 image with 
the following command:

make NO_COLOR=1 IS_TTY=0 V=s --output-sync=recurse -j 5 </dev/null

But I do not think that the exact build flags matter.

The first build tool 51 minutes.

If I run the same command again, without touching anything, it takes 5 
minutes. I would not expect anything to get rebuilt at all.

It is hard to know from the very long log file what files have been 
overwritten, or why something is being rebuilt. These 2 lines from the 
build log are an indication that something is being modified or recompiled:

touch 
/home/rdiez/rdiez/temp/freifunk/openwrt/git-repo/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.96/.configured

[  5%] Building C object CMakeFiles/uci.dir/libuci.c.o

Before I dig anymore in this issue:

1) Is this a known limitation in the build logic?

2) Would something like "repeatable builds" help? For example, I wonder 
if each build embeds the current timestamp, and therefore running 'make' 
always ends up rebuilding the final image.

Thanks in advance,
   rdiez



More information about the openwrt-devel mailing list