[CRIU] criu check --extra output and dump failure
Dmitry Safonov
0x7f454c46 at gmail.com
Tue Apr 18 06:58:50 PDT 2017
2017-04-18 16:30 GMT+03:00 Brinkmann, Harald
<Harald.Brinkmann at bst-international.com>:
>
> Hi Dmitry,
>
> On Tue, 2017-04-18 at 13:32 +0300, Dmitry Safonov wrote:
>> Yes, sorry about that - I gave output for master branch rather than
>> 2.12.1 release.
>> Could you provide build output on master?
>> As v3.0 release is at hand with the stuff in master, it would be good
>> to fix it right there.
>
> OK, I have tried that, but now it does not even compile all the way
> through. This is where it chokes:
>
> gcc -M -MT compel/src/lib/log-host.d -MT compel/src/lib/log-host.o
> -I__BUILD_HOST__/platform-imx6/sysroot-host/lib/pkgconfig/../../include
> -march=armv7-a -march=armv7-a -O2 -g -Wall -Wformat-security -Werror
> -DCONFIG_ARMV7 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -iquote include/
> -DNO_RELOCS -DINCLUDEDIR=\"/usr/local/include\" -DLIBEXECDIR=
> \"/usr/local/libexec\" -DLIBDIR=\"/usr/local/lib/x86_64-linux-gnu\"
> -DSTATIC_LIB=\"libcompel.a\" -DDYN_LIB=\"libcompel.so.1\" -iquote
> compel/arch/arm/src/lib/include -iquote compel/include
> -fno-strict-aliasing -fPIC -I compel/include/uapi
> compel/src/lib/log-host.c -o compel/src/lib/log-host.d
> cc1: error: bad value (armv7-a) for -march= switch
>
> If the compiled program is supposed to run on the host (in my case
> x86_64) then the '-march=armv7-a'-option is wrong here. If it is
> supposed to run on the target it should have used
> arm-v7a-linux-gnueabihf-gcc and not gcc.
Thanks for the run.
Does your buildsystem specify -march in CFLAGS or USERCFLAGS?
Because if it does so, they go to HOSTCFLAGS by default.
It can specify HOSTCFLAGS on build like (in addition to *CFLAGS):
HOSTCFLAGS=" " make
or it can omit specifying -march as criu's make adds it.
If your build system doesn't specify -march in any *CFLAGS,
then please run with attached diff - to find what happend.
> If this code is meant to run on x86, is that necessary for
> cross-compilation at all?
Yes, in criu v3.0 with libcompel release gen-offsets.sh were
replaced with a host compel tool.
The object is logger for that tool.
--
Dmitry
-------------- next part --------------
diff --git a/Makefile b/Makefile
index d70a413c02bb..1764e808ab0f 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,8 @@ export CFLAGS
HOSTCFLAGS ?= $(CFLAGS)
export HOSTCFLAGS
+$(warning HOSTCFLAGS are $(HOSTCFLAGS))
+$(warning CFLAGS are $(CFLAGS))
#
# Architecture specific options.
diff --git a/compel/Makefile b/compel/Makefile
index 43d27f55d892..bd88a8c25918 100644
--- a/compel/Makefile
+++ b/compel/Makefile
@@ -39,6 +39,9 @@ obj-y += arch/$(ARCH)/src/lib/handle-elf.o
obj-y += src/lib/handle-elf.o
host-ccflags-y += $(ccflags-y)
+$(warning host-ccflags-y are $(host-ccflags-y))
+$(warning ccflags-y are $(ccflags-y))
+$(warning HOSTCFLAGS are $(HOSTCFLAGS))
hostprogs-y += compel-host-bin
compel-host-bin-objs := $(patsubst %.o,%-host.o,$(obj-y) $(host-lib-y))
More information about the CRIU
mailing list