DynamoRIO/drmemory

Build issues on an AArch32 userspace when running an AArch64 kernel

Open

#2.017 aberto em 8 de ago. de 2017

Ver no GitHub
 (1 comment) (0 reactions) (0 assignees)C (289 forks)auto 404
Component-BuildOpSys-AArch64OpSys-ARMhelp wanted

Métricas do repositório

Stars
 (2.727 stars)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

Trying to build on a system running Linux 3.18.0 (AArch64) in an AArch32 chroot (Arch Linux ARM, gcc 6.3.1, cmake 3.7.2). The first error I get is:

[ 11%] Building ASM object dynamorio/core/CMakeFiles/drhelper.dir/arch/asm_shared.asm.o
In file included from /home/cosmin/drmemory/dynamorio/core/arch/asm_shared.asm:37:0:
/home/cosmin/drmemory/dynamorio/core/arch/asm_defines.asm:65:3: error: #error ARM is only 32-bit; AARCH64 is 64-bit
 # error ARM is only 32-bit; AARCH64 is 64-bit
   ^~~~~

I guessed that the architecture reported by the kernel is used at some point in the build process, so I've then enabled the PER_LINUX32 personality by prepending linux32 to the cmake and make commands (on a clean build). This changes the output of uname, /proc/cpuinfo, etc to be compatible with that on AArch32 kernels. The build then completed.

DynamoRIO 266b8a3c8b on its own also fails to build without PER_LINUX32, but with a different error, so I think both the DR and Dr. Memory build systems misbehave.

[  8%] Building CXX object clients/drcachesim/CMakeFiles/drcachesim_ops.dir/common/options.cpp.o
c++: error: unrecognized command line option '-mpreferred-stack-boundary=2'; did you mean '-mstructure-size-boundary='?

I've generally found the output of $(CC) -dumpmachine to be a more robust way of detecting the target architecture, but I'm not sure how well that would work with your build system.

Guia do colaborador