-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Makefile.include: building in docker should be done after clean #10461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Makefile.include: building in docker should be done after clean #10461
Conversation
jcarrano
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested:
Without this fix:
RIOT/examples/gnrc_networking $BUILD_IN_DOCKER=1 DOCKER="sudo docker" make -j clean all
sleep 2
Launching build container using image "riot/riotbuild:latest".
sudo docker run --rm -t -u "$(id -u)" \
-v '/home/jcarrano/source/masterRIOT:/data/riotbuild/riotbase' \
-v '/home/jcarrano/source/masterRIOT/cpu:/data/riotbuild/riotcpu' \
-v '/home/jcarrano/source/masterRIOT/boards:/data/riotbuild/riotboard' \
-v '/home/jcarrano/source/masterRIOT/makefiles:/data/riotbuild/riotmake' \
-v '/home/jcarrano/source/masterRIOT:/data/riotbuild/riotproject' \
-v /etc/localtime:/etc/localtime:ro \
-e 'RIOTBASE=/data/riotbuild/riotbase' \
-e 'CCACHE_BASEDIR=/data/riotbuild/riotbase' \
-e 'RIOTCPU=/data/riotbuild/riotcpu' \
-e 'RIOTBOARD=/data/riotbuild/riotboard' \
-e 'RIOTMAKE=/data/riotbuild/riotmake' \
-e 'RIOTPROJECT=/data/riotbuild/riotproject' \
-v /home/jcarrano/.gitcache:/data/riotbuild/gitcache -e GIT_CACHE_DIR=/data/riotbuild/gitcache -v /home/jcarrano/source/vanillaRIOT/.git:/home/jcarrano/source/vanillaRIOT/.git \
\
-w '/data/riotbuild/riotproject/examples/gnrc_networking/' \
'riot/riotbuild:latest' make all
Building application "gnrc_networking" for "native" with MCU "native".
"make" -C /data/riotbuild/riotbase/core
"make" -C /data/riotbuild/riotbase/drivers
"make" -C /data/riotbuild/riotbase/drivers/netdev_eth
"make" -C /data/riotbuild/riotbase/drivers/periph_common
"make" -C /data/riotbuild/riotbase/sys
"make" -C /data/riotbuild/riotbase/sys/auto_init
"make" -C /data/riotbuild/riotbase/sys/auto_init/netif
"make" -C /data/riotbuild/riotbase/sys/div
"make" -C /data/riotbuild/riotbase/sys/evtimer
"make" -C /data/riotbuild/riotbase/sys/fmt
"make" -C /data/riotbuild/riotbase/sys/iolist
"make" -C /data/riotbuild/riotbase/sys/luid
"make" -C /data/riotbuild/riotbase/sys/net/crosslayer/inet_csum
"make" -C /data/riotbuild/riotbase/sys/net/gnrc
"make" -C /data/riotbuild/riotbase/sys/net/gnrc/netapi
"make" -C /data/riotbuild/riotbase/sys/net/gnrc/netif
"make" -C /data/riotbuild/riotbase/sys/net/gnrc/netif/hdr
for i in ; do "make" -C /home/jcarrano/source/masterRIOT/pkg/$i clean ; done
rm -rf /home/jcarrano/source/masterRIOT/examples/gnrc_networking/bin/native
rm -rf scan-build/native
/data/riotbuild/riotbase/sys/net/gnrc/netif/hdr/gnrc_netif_hdr_print.c:62:1: fatal error: opening dependency file /data/riotbuild/riotproject/examples/gnrc_networking/bin/native/gnrc_netif_hdr/gnrc_netif_hdr_print.d: No such file or directory
}
^
compilation terminated.
/data/riotbuild/riotbase/Makefile.base:83: recipe for target '/data/riotbuild/riotproject/examples/gnrc_networking/bin/native/gnrc_netif_hdr/gnrc_netif_hdr_print.o' failed
make[4]: *** [/data/riotbuild/riotproject/examples/gnrc_networking/bin/native/gnrc_netif_hdr/gnrc_netif_hdr_print.o] Error 1
/data/riotbuild/riotbase/Makefile.base:20: recipe for target 'ALL--/data/riotbuild/riotbase/sys/net/gnrc/netif/hdr' failed
make[3]: *** [ALL--/data/riotbuild/riotbase/sys/net/gnrc/netif/hdr] Error 2
/data/riotbuild/riotbase/Makefile.base:20: recipe for target 'ALL--/data/riotbuild/riotbase/sys/net/gnrc' failed
make[2]: *** [ALL--/data/riotbuild/riotbase/sys/net/gnrc] Error 2
/data/riotbuild/riotbase/Makefile.base:20: recipe for target 'ALL--/data/riotbuild/riotbase/sys' failed
make[1]: *** [ALL--/data/riotbuild/riotbase/sys] Error 2
/data/riotbuild/riotbase/Makefile.include:449: recipe for target '/data/riotbuild/riotproject/examples/gnrc_networking/bin/native/application_gnrc_networking.a' failed
make: *** [/data/riotbuild/riotproject/examples/gnrc_networking/bin/native/application_gnrc_networking.a] Error 2
make: *** [/home/jcarrano/source/masterRIOT/makefiles/docker.inc.mk:106: ..in-docker-container] Error 2
With the fix it works. Squash and we merge.
2048a0a to
5e0a193
Compare
|
Rebased now that #10492 is merged |
|
Build is now working in |
|
Remove the test commits and let's go forward. |
5e0a193 to
c0d89ec
Compare
|
Removed the test commit. |
When building in parallel, clean is done at the same time as the container starts building. So the parallel `clean all` handling should also be done for the `..in-docker-container` target.
c0d89ec to
135d2f7
Compare
|
It failed because of the native test failure (now disabled) I just rebased to master to re-trigger. |
Contribution description
When building in parallel, clean is done at the same time as the
container starts building.
So the parallel
clean allhandling should also be done for the..in-docker-containertarget.Testing procedure
I added a test commit to increase the probability of showing the issue and should be removed before merging. The issue is also present and was found without.
Testing should do a
BUILD_IN_DOCKER=1 make -j clean all. It could be shown reliably with any example that takes more than 5 seconds to build on your machine.With this PR, (should be run when
sudodoes not ask for the password anymore).With only the test commit, clean happens during the build in docker:
Issues/PRs references
Was found while testing #10344 and also mentioned in #10459 (comment)