criu check --extra output and dump failure

Submitted by Dmitry Safonov on April 18, 2017, 2:58 p.m.

Details

Message ID CAJwJo6a7y+eY2AUBvModexfTcP4Xev-w0pvPt2LLY=AxL-85Ng@mail.gmail.com
State New
Series "criu check --extra output and dump failure"
Headers show

Commit Message

Dmitry Safonov April 18, 2017, 2:58 p.m.
2017-04-18 17:34 GMT+03:00 Brinkmann, Harald
<Harald.Brinkmann@bst-international.com>:
>
> Hi Dmitry,
>
> On Tue, 2017-04-18 at 16:58 +0300, Dmitry Safonov wrote:
>> 2017-04-18 16:30 GMT+03:00 Brinkmann, Harald
>> <Harald.Brinkmann@bst-international.com>:
>> > 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.
>
> I don't think so.
>
>> If your build system doesn't specify -march in any *CFLAGS,
>> then please run with attached diff - to find what happend.
>
> Here is the relevant output:
>
> Makefile:21: HOSTCFLAGS are
> -I__BUILD_HOST__/platform-imx6/sysroot-host/lib/pkgconfig/../../include
> Makefile:22: CFLAGS are
> -I__BUILD_HOST__/platform-imx6/sysroot-host/lib/pkgconfig/../../include
>
> That's the include path for libprotobuf-c and looks OK to me.

Yep, looks good.

> compel/Makefile:42: host-ccflags-y are -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/Makefile:43: ccflags-y are -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

Also fine

> compel/Makefile:44: HOSTCFLAGS are -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

Here is in the host's CFLAGS "-march=armv7-a" - that looks wrong.
Please, run instead with attached diff - it should fix this problem.

> Do those directory definitions look good to you? In our build system
> anything that is supposed to run on the build host goes into
> platform-imx6/sysroot-host and anything for the target goes into
> platform-imx6/sysroot-target.

That absolutely ok.

>
> Hope that helps.

Patch hide | download patch | download mbox

diff --git a/Makefile b/Makefile
index d70a413c02bb..7053d8d4dea4 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,9 @@  include $(__nmk_dir)macro.mk
 CFLAGS		+= $(USERCFLAGS)
 export CFLAGS
 
-HOSTCFLAGS	?= $(CFLAGS)
+ifeq ($(origin HOSTCFLAGS), undefined)
+        HOSTCFLAGS := $(CFLAGS)
+endif
 export HOSTCFLAGS
 
 #

Comments

Brinkmann, Harald April 18, 2017, 3:26 p.m.
On Tue, 2017-04-18 at 17:58 +0300, Dmitry Safonov wrote:
> > compel/Makefile:44: HOSTCFLAGS are -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
>
> Here is in the host's CFLAGS "-march=armv7-a" - that looks wrong.
> Please, run instead with attached diff - it should fix this problem.

I have run this with both diffs applied. Still no joy. This looks OK:

compel/Makefile:42: host-ccflags-y are -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/Makefile:43: ccflags-y are -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/Makefile:44: HOSTCFLAGS are -I/home/brih/dev/ptx/ps5000.BSP/platform-imx6/sysroot-host/lib/pkgconfig/../../include  -DNO_RELOCS

But I then get this:

gcc -M -MT compel/src/main-host.d -MT compel/src/main-host.o -I/home/brih/dev/ptx/ps5000.BSP/platform-imx6/sysroot-host/lib/pkgconfig/../../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/main-host.c -o compel/src/main-host.d
compel/src/main-host.c:56:2: error: #error "CONFIG_<ARCH> not defined, or unsupported ARCH"
 #error "CONFIG_<ARCH> not defined, or unsupported ARCH"
  ^
compel/src/main-host.c:56:2: error: #error "CONFIG_<ARCH> not defined, or unsupported ARCH"
 #error "CONFIG_<ARCH> not defined, or unsupported ARCH"
  ^


--

Harald

BST eltromat International GmbH
Werk Leopoldshöhe
Herforder Straße 249-251
D-33818 Leopoldshöhe

T:      +49 (5208) 987-513

E:      harald.brinkmann@bst-international.com
W:      http://www.bst-eltromat.com