|
From: Mogens L. L. <ML...@ba...> - 2009-10-09 20:20:29
|
Well, I am sure there is a more elegant way... but this is how I handle
it....
When you build your code, the path for the tools will be set inside
valgrind. So if you build valgrind in:
"/home/foo/valgrind"
You must also make sure it is located in the same path on your target.
I guess you can use "strace valgrind .." to actually see where it expects
to find the memcheck file.
You can probably fix this by setting the --bindir/--sbindir/--libexecdir
on configure when you build valgrind. (I can live with using the same path
when building and running target, so I didn't bother to figure these
setting out. Sorry...)
/Mogens
Brandon Rioja <br...@co...>
09-10-2009 17:31
To
Tom Hughes <to...@co...>
cc
"val...@li..."
<val...@li...>, Mogens Lindholdt Lauridsen
<ML...@ba...>
Subject
Re: [Valgrind-users] Montavista cross compilation
After I got valgrind to compile, I am having difficulty running.
# ./valgrind
valgrind: failed to start tool 'memcheck' for platform 'ppc32-linux': No
such file or directory
-----Original Message-----
From: Tom Hughes [mailto:to...@co...]
Sent: Friday, October 09, 2009 10:57 AM
To: Brandon Rioja
Cc: Mogens Lindholdt Lauridsen; Bart Van Assche;
val...@li...
Subject: Re: [Valgrind-users] Montavista cross compilation
On 09/10/09 15:43, Brandon Rioja wrote:
> I'm getting some problems, still.
>
> This is the error:
>
> /opt/montavista/cge50/montavista/cge/devkit/ppc/85xx/bin/ppc_85xx-gcc
> -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-statement
> -fno-stack-protector -o memcheck-ppc32-linux -static
> -Wl,-defsym,valt_load_address=0x38000000 -nodefaultlibs -nostartfiles -u
> _start -m32 -Wl,-T,../valt_load_address_ppc32_linux.lds
> memcheck_ppc32_linux-mc_leakcheck.o
> memcheck_ppc32_linux-mc_malloc_wrappers.o memcheck_ppc32_linux-mc_main.o
> memcheck_ppc32_linux-mc_translate.o memcheck_ppc32_linux-mc_machine.o
> memcheck_ppc32_linux-mc_errors.o ../coregrind/libcoregrind-ppc32-linux.a
> ../VEX/libvex-ppc32-linux.a -lgcc
>
>
/opt/montavista/cge50/montavista/cge/devkit/ppc/85xx/bin/../lib/gcc/powerpc-montavista-linux-gnuspe/4.2.0/libgcc.a(divdf3.o):
> In function `__divdf3':
>
>
/home/build/BUILD/gcc-4.2.0/objdir/gcc/../../gcc/config/soft-fp/divdf3.c:44:
> undefined reference to `abort'
It looks like your libgcc has references to the abort() function in the
C library but we (deliberately) don't link the with the C library.
libgcc is supposed to be low level support routines for gcc generated
code to call and shouldn't really be calling C library routines like
that as it stops you being able to compile code that doesn't link with
the C library.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Valgrind-users mailing list
Val...@li...
https://lists.sourceforge.net/lists/listinfo/valgrind-users
|