Makefile.include: building in docker should be done after clean #10461
Merged
jcarrano merged 1 commit intoRIOT-OS:masterfrom Dec 6, 2018
Merged
Makefile.include: building in docker should be done after clean #10461jcarrano merged 1 commit intoRIOT-OS:masterfrom
jcarrano merged 1 commit intoRIOT-OS:masterfrom
Conversation
4 tasks
jcarrano
approved these changes
Nov 26, 2018
Contributor
jcarrano
left a comment
There was a problem hiding this comment.
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.
kaspar030
previously requested changes
Nov 26, 2018
Contributor
2048a0a to
5e0a193
Compare
Contributor
Author
|
Rebased now that #10492 is merged |
Contributor
Author
|
Build is now working in |
Contributor
|
Remove the test commits and let's go forward. |
5e0a193 to
c0d89ec
Compare
Contributor
Author
|
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
Contributor
Author
|
It failed because of the native test failure (now disabled) I just rebased to master to re-trigger. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)