How to run Valgrind/Helgrind on 32bit apps, in 64bit OS

View: New views
6 Messages — Rating Filter:   Alert me  

How to run Valgrind/Helgrind on 32bit apps, in 64bit OS

by b_dutta :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have a x86_64 arch system, running RHEL4.6 x86_64. However, the application
I would like to use Valgrind on, is a 32-bit application (due to some legacy
library dependencies, which are available 32-bit only).

Should I be using the Valgrind v3.5.0 x86_64 version, or the i386 version (x86)
in this environment ? Also, I believe, installation of the x86 version might
meet with lot of unfulfilled dependencies (glibc specific version, x86 flavour
etc.)!

Any known best-practices for the above scenario ?

Thanks,
BDutta



------------------------------------------------------------------------------
Come build with us! The BlackBerry® 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/devconf
_______________________________________________
Valgrind-users mailing list
Valgrind-users@...
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Re: How to run Valgrind/Helgrind on 32bit apps, in 64bit OS

by Nicholas Nethercote :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Sep 23, 2009 at 9:46 PM, Banibrata Dutta
<banibrata.dutta@...> wrote:
>
> I have a x86_64 arch system, running RHEL4.6 x86_64. However, the application
> I would like to use Valgrind on, is a 32-bit application (due to some legacy
> library dependencies, which are available 32-bit only).
>
> Should I be using the Valgrind v3.5.0 x86_64 version, or the i386 version (x86)
> in this environment ? Also, I believe, installation of the x86 version might
> meet with lot of unfulfilled dependencies (glibc specific version, x86 flavour
> etc.)!

Use the x86_64 version.  It builds two versions of Valgrind, one that
handles 64-bit programs and one that handles 32-bit programs, and it
will transparently choose the appropriate one.  In other words, It
Should Just Work.

Nick

------------------------------------------------------------------------------
Come build with us! The BlackBerry® 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/devconf
_______________________________________________
Valgrind-users mailing list
Valgrind-users@...
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Re: How to run Valgrind/Helgrind on 32bit apps, in 64bit OS

by b_dutta :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Nicholas Nethercote <n.nethercote <at> gmail.com> writes:

>
> On Wed, Sep 23, 2009 at 9:46 PM, Banibrata Dutta
> <banibrata.dutta <at> gmail.com> wrote:
> >
> > I have a x86_64 arch system, running RHEL4.6 x86_64. However, the
application
> > I would like to use Valgrind on, is a 32-bit application (due to some legacy
> > library dependencies, which are available 32-bit only).
> >
> > Should I be using the Valgrind v3.5.0 x86_64 version, or the i386 version
(x86)
> > in this environment ? Also, I believe, installation of the x86 version might
> > meet with lot of unfulfilled dependencies (glibc specific version, x86
flavour
> > etc.)!
>
> Use the x86_64 version.  It builds two versions of Valgrind, one that
> handles 64-bit programs and one that handles 32-bit programs, and it
> will transparently choose the appropriate one.  In other words, It
> Should Just Work.
>
So, if I install the x86_64 version package (.rpm, .deb etc., on my favourite
Linux distro), it should work out of the box ? Or, do I need to build the
package on the target platform, from source ?

Also, is the same true for the tool, Helgrind ? Does the Helgrind tool, part of
the Valgrind x86_64 package, work for both 32bit & 64bit applications ? Asking
because --
when we tried to run Helgrind on RHEL 5.3 (Valgrind - 3.2.1-6.e15 ), it says
Helgrind not supported and says use Valgrind - 2.4 for Helgrind support !!

Thanks for the response.

--
regards,
Banibrata




------------------------------------------------------------------------------
Come build with us! The BlackBerry® 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/devconf
_______________________________________________
Valgrind-users mailing list
Valgrind-users@...
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Re: How to run Valgrind/Helgrind on 32bit apps, in 64bit OS

by Tom Hughes-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 24/09/09 04:52, Banibrata Dutta wrote:

> So, if I install the x86_64 version package (.rpm, .deb etc., on my favourite
> Linux distro), it should work out of the box ? Or, do I need to build the
> package on the target platform, from source ?

The packaged version should be fine. Assuming of course that it is an
appropriate version for what you want.

> Also, is the same true for the tool, Helgrind ? Does the Helgrind tool, part of
> the Valgrind x86_64 package, work for both 32bit&  64bit applications ?

It is true of all tools, yes.

> Asking
> because --
> when we tried to run Helgrind on RHEL 5.3 (Valgrind - 3.2.1-6.e15 ), it says
> Helgrind not supported and says use Valgrind - 2.4 for Helgrind support !!

That's because helgrind was not supported on any platform in that
version of valgrind - it is supported again in newer versions.

Tom

--
Tom Hughes (tom@...)
http://www.compton.nu/

------------------------------------------------------------------------------
Come build with us! The BlackBerry® 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/devconf
_______________________________________________
Valgrind-users mailing list
Valgrind-users@...
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Re: How to run Valgrind/Helgrind on 32bit apps, in 64bit OS

by aroldan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have the same problem building Valgrind 3.5.0 on Debian. However, it
seems to be a gcc-4.{3,4} issue. This is the result of the configure
test when trying to build a 32 bit code:

configure:4326: checking for 32 bit build support
configure:4349: gcc -o conftest -m32   conftest.c  >&5
/usr/bin/ld: skipping
incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.4/libgcc.a when searching
for -lgcc
/usr/bin/ld: skipping
incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.4/libgcc.a when searching
for -lgcc
/usr/bin/ld: cannot find -lgcc
collect2: ld returned 1 exit status

On Thu, 2009-09-24 at 08:58 +1000, Nicholas Nethercote wrote:

> On Wed, Sep 23, 2009 at 9:46 PM, Banibrata Dutta
> <banibrata.dutta@...> wrote:
> >
> > I have a x86_64 arch system, running RHEL4.6 x86_64. However, the application
> > I would like to use Valgrind on, is a 32-bit application (due to some legacy
> > library dependencies, which are available 32-bit only).
> >
> > Should I be using the Valgrind v3.5.0 x86_64 version, or the i386 version (x86)
> > in this environment ? Also, I believe, installation of the x86 version might
> > meet with lot of unfulfilled dependencies (glibc specific version, x86 flavour
> > etc.)!
>
> Use the x86_64 version.  It builds two versions of Valgrind, one that
> handles 64-bit programs and one that handles 32-bit programs, and it
> will transparently choose the appropriate one.  In other words, It
> Should Just Work.
>
> Nick
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® 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/devconf
> _______________________________________________
> Valgrind-users mailing list
> Valgrind-users@...
> https://lists.sourceforge.net/lists/listinfo/valgrind-users

--
Andrés Roldán
Ingeniero de Proyectos
DD - Official Debian Developer
C|EH - Certified Ethical Hacker
Fluidsignal Group S.A.
Where security meets business
http://www.fluidsignal.com/
ISO 9001:2000 ISO/IEC 27001:2005
Teléfono: +57 (4) 3522627 ext. 205
Móvil: +57 313-6463678
PGP Key-ID: 0xB29396EB


------------------------------------------------------------------------------
Come build with us! The BlackBerry® 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/devconf
_______________________________________________
Valgrind-users mailing list
Valgrind-users@...
https://lists.sourceforge.net/lists/listinfo/valgrind-users

signature.asc (205 bytes) Download Attachment

Re: How to run Valgrind/Helgrind on 32bit apps, in 64bit OS

by Tom Hughes-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 24/09/09 14:37, Andrés Roldán wrote:

> I have the same problem building Valgrind 3.5.0 on Debian. However, it
> seems to be a gcc-4.{3,4} issue. This is the result of the configure
> test when trying to build a 32 bit code:
>
> configure:4326: checking for 32 bit build support
> configure:4349: gcc -o conftest -m32   conftest.c>&5
> /usr/bin/ld: skipping
> incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.4/libgcc.a when searching
> for -lgcc
> /usr/bin/ld: skipping
> incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.4/libgcc.a when searching
> for -lgcc
> /usr/bin/ld: cannot find -lgcc
> collect2: ld returned 1 exit status

Well the simple answer is that you haven't got a 32 bit libgcc installed.

I think you probably want to install lib32gcc1 on Debian, but that's a
bit of a guess and I'm not sure if that is a development package or just
a runtime.

Tom

--
Tom Hughes (tom@...)
http://www.compton.nu/

------------------------------------------------------------------------------
Come build with us! The BlackBerry® 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/devconf
_______________________________________________
Valgrind-users mailing list
Valgrind-users@...
https://lists.sourceforge.net/lists/listinfo/valgrind-users