I've had the same problem, but saw a colleague using "DESTDIR" when
building some other project (See the make install command). This also
works with valgrind. I build valgrind with this script:
******************************
export location=$(pwd)
#Path to compiler:
export
TARGET_TOOL_BASE=/opt/wrsysroot/x86-linux2/powerpc-wrs-linux-gnu-ppc_603e-glibc_small-
export CC=${TARGET_TOOL_BASE}gcc
export CXX=${TARGET_TOOL_BASE}g++
export LD=${TARGET_TOOL_BASE}ld
install_dir=${location}/install_svn_debug
rm -rf ${install_dir}
rm -rf valgrind
svn co svn://svn.valgrind.org/valgrind/trunk valgrind
cd valgrind
./autogen.sh
./configure --enable-shared --host=ppc-linux --target=ppc-linux
--enable-debug || exit 1
make || exit 1
make install DESTDIR=${install_dir} || exit 1
*******************************
In the "install_dir" you will now get a "usr" directory which you can copy
directly to your targets rootfs.
I don't really know if I myself prefer this.... It might be nice to have
tools separated from the OS release. (I kind of prefer to have all my
code/tools in my home dir on target).
-Mogens
Robert Berger <[email protected]>
15-06-2010 21:13
Please respond to
[email protected]
To
[email protected]
cc
[email protected]
Subject
Re: [Valgrind-users] Cross compiling valgrind 3.5.0 for ppc
On 06/15/2010 07:05 PM, Bart Van Assche wrote:
> On Tue, Jun 15, 2010 at 5:55 PM, Robert Berger
> <[email protected]> wrote:
>>
>> [ ... ]
>>
>> That's what my target says:
>>
>> -bash-3.2# valgrind
>> valgrind: failed to start tool 'memcheck' for platform 'ppc32-linux':
No
>> such file or directory
>> -bash-3.2#
>
> You can analyze what went wrong by analyzing the output of the
> following command:
>
> valgrind -v -d /bin/date
-bash-3.2# valgrind -v -d /bin/date
--1059:1:debuglog DebugLog system started by Stage 1, level 1 logging
requested
--1059:1:launcher no tool requested, defaulting to 'memcheck'
--1059:1:launcher selected platform 'ppc32-linux'
--1059:1:launcher launching
/work/rber/eldk-4.2-ppc_4xx/ppc_4xx/lib/valgrind/memcheck-ppc32-linux
valgrind: failed to start tool 'memcheck' for platform 'ppc32-linux': No
such file or directory
The install path on my host is /work/rber/eldk-4.2-ppc_4xx/ppc_4xx
On my target this is /
I hacked this by:
mkdir -p /work/rber/eldk-4.2-ppc_4xx/ppc_4xx/lib
ln -sf /lib/valgrind /work/rber/eldk-4.2-ppc_4xx/ppc_4xx/lib/valgrind
I guess this should be fixed for cross debugging, or maybe I should use
some additional --{?} in configure to tell valgrind where the find the
stuff on the target.
Followed by:
valgrind: A must-be-redirected function
valgrind: whose name matches the pattern: strlen
valgrind: in an object with soname matching: ld.so.1
valgrind: was not found whilst processing
valgrind: symbols from the object with soname: ld.so.1
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.
valgrind:
valgrind: Cannot continue -- exiting now. Sorry.
I'll try to install the glibc with debuginfo as indicated here:
http://lists.denx.de/pipermail/eldk/2010-June/001505.html
.. but so far without much success.
In worst case I will need to rebuild the glibc with an unstripped ld.
Regards,
Robert
>
> Bart.
>
>
------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users