A second 'make' always rebuilds something
rdiezmail-openwrt at yahoo.com
Wed Jan 30 02:17:50 PST 2019
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:
[ 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,
More information about the openwrt-devel