[CRIU] [PATCH 0/3] fix some build issues under Android NDK/Clang

ning.a.zhang at intel.com ning.a.zhang at intel.com
Fri Mar 29 08:45:20 MSK 2019


From: Zhang Ning <ning.a.zhang at intel.com>

Hi, All 

I'm trying to build criu under Android NDK, and meet some build issues.

some of them are fixed, and send patches for review. some of them haven't.

here is my build script:
https://gist.github.com/zhangn1985/366c591895766d1721dc1f674179d419
you need download code firstly, and modify tools.mk

- CC            := $(CROSS_COMPILE)$(HOSTCC)
+ CC            ?= $(CROSS_COMPILE)$(HOSTCC)

to support using Clang.

with below fix, I still get an issue, that related to linker.
I don't know how to fix.

here is build log:
x86_64-linux-android-ld  -L/home/ning/source/criu/protobuf-c/../target/lib -lprotobuf-c -r -z noexecstack -T ./compel/arch/x86/scripts/compel-pack.lds.S  -o criu/pie/parasite.built-in.o  criu/pie/parasite.o criu/pie/pie.lib.a ./compel/plugins/std.lib.a
./compel/compel-host hgen -f criu/pie/parasite.built-in.o -o criu/pie/parasite-blob.h
Error (compel/src/lib/handle-elf-host.c:335): Unexpected undefined symbol: `'. External symbol in PIE?
criu/pie/Makefile:49: recipe for target 'criu/pie/parasite-blob.h' failed

but when I re-run it using host ld (debian 9) instead of x86_64-linux-android-ld, no error reported.

could you help to review, and provide some help?


Zhang Ning (3):
  fix build issue under Android NDK
  fix build error under newer version Clang
  fix build error under Android NDK/Clang

 compel/arch/x86/src/lib/infect.c      | 1 +
 compel/include/uapi/sigframe-common.h | 2 +-
 criu/include/util-vdso.h              | 2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)

-- 
2.20.1



More information about the CRIU mailing list