Fixed
Created: Jun 24, 2013
Updated: Mar 10, 2016
Resolved Date: Dec 4, 2013
Previous ID: LIN5-7933, LIN6-2833
Found In Version: 6.0
Fix Version: 6.0
Severity: Severe
Applicable for: Wind River Linux 6
Component/s: Userspace
Customer want to use valgrind in their project, but after build project with the guide our document mentioned:
--enable-build=debug --with-template=feature/debug,feature/valgrind
After system startup, valgrind still can not run normally, it show:
/******************************************************************************/
root@localhost:~# valgrind ./hello
==1607== Memcheck, a memory error detector
==1607== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==1607== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==1607== Command: ./hello
==1607==
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: strlen
valgrind: in an object with soname matching: ld-linux.so.2
valgrind: was not found whilst processing
valgrind: symbols from the object with soname: ld-linux.so.2
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.
/******************************************************************************/
In 5.0, there is no glibc-debuginfo.rpm which exist in wind river linux 4.x under the guide of our doc, we need to install debuginfo package which created via command `make fs-debug`.
Valgrind can work well after install debuginfo package, but rpm can not work any more, it show:
/*******************************************************/
root@localhost:~# rpm -i zebos-7.9.0-_5.0.1.3_x86.intel_xeon_core_32.rpm
error: cannot open Packages(0) index: No such file or directory(2)
DB: Berkeley DB 5.3.15: (December 19, 2011)
error: cannot open Packages database in /var/lib/rpm
error: cannot open Packages database in /var/lib/rpm
/*******************************************************/
1, build project with:
configure --enable-board=qemux86 --enable-kernel=standard --enable-rootfs=glibc_small --enable-jobs=4 --enable-parallel-pkgbuilds=4 --with-rcpl-version=0003 --enable-checkout-all-layers --enable-reconfig --enable-bootimage=iso --enable-checkout-all-layers --enable-reconfig --enable-target-installer=yes --with-template=feature/debug,feature/valgrind --enable-build=debug
2, run `make fs-debug` to create debuginfo tar package.
3, add this package into rootfs
4, create iso image and install it into VM
here if we use rpm command, it work well.
5, after system startup, uncompress debuginfo on target
6, then try to use rpm command, it will show error
I have this iso image in hand, which can see this issue quickly.