Commit f571f92b authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

Dockerfile: do make mrproper before build

I just spent some considerable time trying to figure out the source
of errors like this:

	make -C scripts/build ppc64
	...
	  DEP      images/autofs.pb-c.d
	In file included from images/autofs.pb-c.c:9:0:
	images/autofs.pb-c.h:7:35: fatal error: protobuf-c/protobuf-c.h:
	No such	file or directory
	 #include <protobuf-c/protobuf-c.h>
					   ^
	compilation terminated.

It appears that we copy the complete tree to a docker container, and it
is not cleaned properly before the build. In particular, images/*.pb-c.{c,h}
are not removed/rebuilt. The problem is not noticeable until version of
protobuf-c differs between the host and container, and they use different
include paths (/usr/include/google/protobuf-c/ vs /usr/include/protobuf-c).

As I don't want anyone else to spend so much time figuring this out,
here is the patch.

travis-ci: success for QEMU+Dockerfile improvements + clang build
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Acked-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent d86a3a0e
...@@ -12,4 +12,4 @@ RUN apk update && apk add \ ...@@ -12,4 +12,4 @@ RUN apk update && apk add \
pkgconfig pkgconfig
COPY . /criu COPY . /criu
WORKDIR /criu WORKDIR /criu
RUN make clean && make -j $(nproc) RUN make mrproper && make -j $(nproc)
...@@ -21,6 +21,6 @@ RUN apt-get install -y \ ...@@ -21,6 +21,6 @@ RUN apt-get install -y \
COPY . /criu COPY . /criu
WORKDIR /criu WORKDIR /criu
RUN make clean && make -j $(nproc) RUN make mrproper && make -j $(nproc)
RUN make mrproper RUN make mrproper
RUN bash -c 'CLEAN="$(git clean -ndx --exclude=scripts/build)"; echo "${CLEAN}"; test -z "${CLEAN}"; exit $?' RUN bash -c 'CLEAN="$(git clean -ndx --exclude=scripts/build)"; echo "${CLEAN}"; test -z "${CLEAN}"; exit $?'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment