在ARM Cortex-A8上使用Valgrind出现"configure: error: Unsupported host architecture"错误

9
我在我的实际ARM CortexA8与Linux程序中发现了以下问题:
´*** glibc detected *** ./PRUssExternal: double free or corruption (top): 0x00024fe8 ***´

我在网上搜索并发现最有用的程序来管理这个问题是Valgrind。

如何使用gdb在C++中跟踪double free或corruption错误

然后我尝试在我的系统中进行交叉编译,并使用以下配置选项。我正在使用Valgrind 3.8.1。

@-virtual-machine:~/valgrind-3.8.1$ CC=arm-cortexa8-linux-gnueabi-gcc CFLAGS="-pipe -Os -mtune=cortex-a8 -march=armv7-a -mabi=aapcs-linux -msoft-float -I/opt/OSELAS.Toolchain-2011.11.3/arm-cortexa8-linux-gnueabi/gcc-4.6.2-glibc-2.14.1-binutils-2.21.1a-kernel-2.6.39-sanitez/sysroot-arm-cortexa8-linux-gnueabi/usr/include" LDFLAGS="-L/opt/OSELAS.Toolchain-2011.11.3/arm-cortexa8-linux-gnueabi/gcc-4.6.2-glibc-2.14.1-binutils-2.21.1a-kernel-2.6.39-sanitez/sysroot-arm-cortexa8-linux-gnueabi/usr/lib" ./configure -prefix=/opt/valgrid -host=arm-cortexa8-linux-gnueabi -target=arm-none-linux-gnueabi -build=x86_64-ubuntu-linux
此配置的输出为:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-cortexa8-linux-gnueabi-strip... arm-cortexa8-linux-gnueabi-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether ln -s works... yes
checking for arm-cortexa8-linux-gnueabi-gcc... arm-cortexa8-linux-gnueabi-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether arm-cortexa8-linux-gnueabi-gcc accepts -g... yes
checking for arm-cortexa8-linux-gnueabi-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of arm-cortexa8-linux-gnueabi-gcc... gcc3
checking whether arm-cortexa8-linux-gnueabi-gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... arm-cortexa8-linux-gnueabi-gcc -E
checking for arm-cortexa8-linux-gnueabi-g++... arm-cortexa8-linux-gnueabi-g++
checking whether we are using the GNU C++ compiler... yes
checking whether arm-cortexa8-linux-gnueabi-g++ accepts -g... yes
checking dependency style of arm-cortexa8-linux-gnueabi-g++... gcc3
checking for arm-cortexa8-linux-gnueabi-ranlib... arm-cortexa8-linux-gnueabi-ranlib
checking for a sed that does not truncate output... /bin/sed
checking for ar... /usr/bin/ar
checking for perl... /usr/bin/perl
checking for gdb... /usr/bin/gdb
checking dependency style of arm-cortexa8-linux-gnueabi-gcc... gcc3
checking for diff -u... yes
checking for a supported version of gcc... ok (4.6.2)
checking build system type... x86_64-ubuntu-linux-gnu
checking host system type... arm-cortexa8-linux-gnueabi
checking for a supported CPU... no (arm)
configure: error: Unsupported host architecture. Sorry

在输出的最后一行中,出现了"My Issue",尽管我查找了一些信息,而Cortexa8是其中一个受支持的平台。 ARM9上的valgrind? 因此,我的问题是,我的板子是否不受支持,因为我使用的库不兼容,或者可能有其他原因。或者,我可以毫不畏惧地编译valgrind并跳过这个检查。
感谢您的时间。
-问候
Breci01010...

2
根据 http://sourceforge.net/mailarchive/forum.php?thread_name=4CD93681.2020608%40yandex.ru&forum_name=valgrind-users ,这可能是由于您的工具链名称异常明确所导致的影响。因此,您可以尝试使用 --host=armv7-unknown-linux-gnueabi。 - unixsmurf
谢谢unixsmurf,我已经测试过在主机上更改为新配置,所以它可以正常工作。 感谢您的时间 -问候 - breci010101
你好,我已经成功地在CortexA8上编译并安装了valdgrid。但是我现在遇到的问题是因为我没有使用标准的C库。如何编译valgrid请问有人知道其他系统更友好地处理非标准库的方法吗?谢谢。 - breci010101
1个回答

15
你应该编辑配置文件。找到一行“armv7*”,并将其更改为“arm*” - 这就足够了。

配置文件是一个生成的文件。所以,我首先等待错误出现。在文件中进行更改,然后再次逐步编译。我只想知道配置文件从哪里复制过来的? - Aadishri

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接