Android valgrind 构建失败 [英] Android valgrind build fails

查看:32
本文介绍了Android valgrind 构建失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在尝试为 android-arm 构建 valgrind.在 Linux Mint 13 上失败:

Hello I'm trying to build valgrind for android-arm. On Linux Mint 13 it fails with:

$ make
echo "# This is a generated file, composed of the following suppression rules:" > default.supp
echo "# " exp-sgcheck.supp xfree-3.supp xfree-4.supp glibc-2.X-drd.supp glibc-2.34567-NPTL-helgrind.supp glibc-2.X.supp  >> default.supp
cat exp-sgcheck.supp xfree-3.supp xfree-4.supp glibc-2.X-drd.supp glibc-2.34567-NPTL-helgrind.supp glibc-2.X.supp  >> default.supp
make  all-recursive
make[1]: Entering directory `/home/matt/Desktop/valgrind/valgrind-3.8.1'
Making all in include
make[2]: Entering directory `/home/matt/Desktop/valgrind/valgrind-3.8.1/include'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/matt/Desktop/valgrind/valgrind-3.8.1/include'
Making all in VEX
make[2]: Entering directory `/home/matt/Desktop/valgrind/valgrind-3.8.1/VEX'
make  all-am
make[3]: Entering directory `/home/matt/Desktop/valgrind/valgrind-3.8.1/VEX'
gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I../include -I../VEX/pub -DVGA_arm=1 -DVGO_linux=1 -DVGP_arm_linux=1 -DVGPV_arm_linux_vanilla=1 -Ipriv  -m32 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -fno-builtin -marm -mcpu=cortex-a8 -Wbad-function-cast -Wcast-qual -Wcast-align -fstrict-aliasing -Wno-long-long  -Wno-pointer-sign -fno-stack-protector -MT libvex_arm_linux_a-main_globals.o -MD -MP -MF .deps/libvex_arm_linux_a-main_globals.Tpo -c -o libvex_arm_linux_a-main_globals.o `test -f 'priv/main_globals.c' || echo './'`priv/main_globals.c
gcc: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead
cc1: error: unrecognised command line option ‘-marm’
priv/main_globals.c:1:0: error: bad value (cortex-a8) for -mtune= switch
make[3]: *** [libvex_arm_linux_a-main_globals.o] Error 1
make[3]: Leaving directory `/home/matt/Desktop/valgrind/valgrind-3.8.1/VEX'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/matt/Desktop/valgrind/valgrind-3.8.1/VEX'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/matt/Desktop/valgrind/valgrind-3.8.1'
make: *** [all] Error 2

我正在使用 ndk-r8e 和 valgrind 3.8.1.配置结束于:

I am using ndk-r8e and valgrind 3.8.1. The configure ends with:

     Maximum build arch: arm
     Primary build arch: arm
   Secondary build arch: 
               Build OS: linux
   Primary build target: ARM_LINUX
 Secondary build target: 
       Platform variant: vanilla
  Primary -DVGPV string: -DVGPV_arm_linux_vanilla=1
     Default supp files: exp-sgcheck.supp xfree-3.supp xfree-4.supp glibc-2.X-drd.supp glibc-2.34567-NPTL-helgrind.supp glibc-2.X.supp 

我能做些什么来解决这个问题?或者,是否有任何我可以使用的预构建的 android-arm valgrind 二进制文件?

What can I do to fix this? Alternatively, are there any pre-built android-arm valgrind binaries that I can use?

推荐答案

我遇到的问题是配置脚本忽略了环境变量.为了配置 make 文件,我改为这样做:

The problem I had was that the configure script was ignoring the environment variables. To configure the make file I instead did this:

sudo ./configure --prefix=/data/local/Inst --host=armv7-unknown-linux --target=armv7-unknown-linux --with-tmpdir=/sdcard0 CPPFLAGS="--sysroot=$NDKROOT/platforms/android-3/arch-arm -DANDROID_HARDWARE_$HWKIND" CFLAGS="--sysroot=$NDKROOT/platforms/android-3/arch-arm" CC=$CC LD=$LD AR=$AR

这可确保变量设置正确并适用于 Linux Mint 13.但它不适用于 OSX Mountain Lion.我建议任何使用 OSX 却无法安装 linux 的人尝试在虚拟机上使用 linux.

This ensures the variables are set properly and works with Linux Mint 13. It does not work on OSX Mountain Lion however. I'd advise anyone using OSX without access to a linux installation to try using linux on a virtual machine.

这篇关于Android valgrind 构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆