Tôi đã biên dịch chéo Valgrind (http://valgrind.org/downloads/valgrind-3.8.1.tar.bz2) cho ARM bằng cách sử dụng các lệnh sau với Linaro Toolchain trên Ubuntu 10.04 máy chủ của tôi (tôi đang sử dụng Buildroot):Valgrind cho ARM với Linaro Toolchain yêu cầu libc6-dbg với Buildroot
export PATH=$PATH:/home/user/toolchain/linaro/bin
CC=arm-linux-gnueabi-gcc CFLAGS=-I/home/user/toolchain/linaro/arm-linux-gnueabi/libc/usr/include LDFLAGS=-L/home/user/toolchain/linaro/arm-linux-gnueabi/libc/usr/lib ./configure --prefix=/opt/valgrind --host=armv7-none-linux-gnueabi --target=arm-none-linux-gnueabi --build=i386-ubuntu-linux
make
sudo make install
Khi tôi sao chép các tập tin nhị phân để hội đồng mục tiêu ARM của tôi, tôi nhận được lỗi sau:
==413== Memcheck, a memory error detector
==413== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==413== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==413== Command: /home/user/testApp
==413==
valgrind: Fatal error at startup: a function redirection
valgrind: which is mandatory for this platform-tool combination
valgrind: cannot be set up. Details of the redirection are:
valgrind:
valgrind: A must-be-redirected function
valgrind: whose name matches the pattern: memcpy
valgrind: in an object with soname matching: ld-linux.so.3
valgrind: was not found whilst processing
valgrind: symbols from the object with soname: ld-linux.so.3
valgrind:
valgrind: Possible fixes: (1, short term): install glibc's debuginfo
valgrind: package on this machine. (2, longer term): ask the packagers
valgrind: for your Linux distribution to please in future ship a non-
valgrind: stripped ld.so (or whatever the dynamic linker .so is called)
valgrind: that exports the above-named function using the standard
valgrind: calling conventions for this platform. The package you need
valgrind: to install for fix (1) is called
valgrind:
valgrind: On Debian, Ubuntu: libc6-dbg
valgrind: On SuSE, openSuSE, Fedora, RHEL: glibc-debuginfo
valgrind:
valgrind: Cannot continue -- exiting now. Sorry.
My Linaro toolchain Phiên bản:
gcc version 4.7.1 20120402 (prerelease) (crosstool-NG linaro-1.13.1-2012.04-20120426 - Linaro GCC 2012.04)
Tôi đã tìm kiếm trên Google nhưng không thể tìm thấy giải pháp cho điều này. Làm thế nào tôi có thể nhận được Valgrind để làm việc trên bảng mục tiêu của tôi? Tôi sử dụng Buildroot để xây dựng hệ thống của mình nhưng libc6-dbg không phải là một gói mà tôi có thể tìm thấy trong hệ thống xây dựng. Có một số thư mục hoặc tập tin tôi cần phải sao chép từ sysroot toolchain? Cảm ơn -
Lệnh Tôi đang sử dụng để chạy Valgrind được hiển thị ở đây:
# which valgrind
/usr/bin/valgrind
# valgrind /home/user/MyQtApp
==216== Memcheck, a memory error detector
...
...
Bạn có thể chỉ định lệnh nào bạn sử dụng để chạy Valgrind trên mục tiêu, để chúng tôi có thể thử tạo lại sự cố không? Cảm ơn. –
Thomas, tôi đã thêm các lệnh của mình vào bài đăng ở trên - Cảm ơn. – PhilBot
Xin chào Thomas, bạn có thể tái tạo điều này không? Tôi vẫn thấy vấn đề này với bản cài đặt Buildroot Valgrind của tôi. Cảm ơn! – PhilBot