|
From: Ivan N. <iv...@0x...> - 2006-04-13 09:20:00
|
Hi, I am trying to compile version 3.1 a Fedora Core 4, amd64 machine. the build is adding -m32 and compiling a 32 bit version of valgrind. When i run valgrind ls it says wrong executable calss (e.g. 32-bit instead of 64-bit) Any ideas how to change the configure options to get a 64 bit Valgrind? Thanks, Ivan |
|
From: Tom H. <to...@co...> - 2006-04-13 09:36:49
|
In message <443...@0x...>
Ivan Novick <iv...@0x...> wrote:
> Hi, I am trying to compile version 3.1 a Fedora Core 4, amd64 machine.
>
> the build is adding -m32 and compiling a 32 bit version of valgrind.
>
> When i run
>
> valgrind ls
>
> it says wrong executable calss (e.g. 32-bit instead of 64-bit)
Presumably this is the "valgrind: wrong ELF executable class" message?
If it is then something very odd is going on as it means that valgrind
has failed to identify the program you are running properly.
> Any ideas how to change the configure options to get a 64 bit Valgrind?
You should already have one - when you build valgrind on amd64 you
actually get two copies of all the tools. One is 32 bit and the other
one is 64 bit - the actual valgrind program is then a small program
that decides whether the thing you are running is 32 or 64 bit and
launches the right tool executable.
The installed environment on a 64 bit box should look something
like this:
/usr/bin/valgrind (the launcher, a 64 bit program)
/usr/lib/valgrind/x86-linux/* (the 32 bit tools)
/usr/lib/valgrind/amd64-linux/* (the 64 bit tools)
It sounds like the launcher is wrong deciding to use the 32 bit
tools when it should be using the 64 bit ones or vice versa.
Can you (a) confirm that your installation looks like I have
described and (b) provide the output of "file <your-program>"
and "valgrind -d <your-program>" so we can diagnose the problem.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Ivan N. <iv...@0x...> - 2006-04-13 18:01:36
|
Tom, Your reply has helped to me to track down the problem, Thank You! It seams there was an old 32 bit valgrind launcher hanging around on the machine in /usr/bin which was taking precedence in the path over the newly compiled 64 bit launcher in /usr/local/bin. Deleting the old valgrind was all that was needed. Thanks again for the insight you added, Ivan Tom Hughes wrote: > In message <443...@0x...> > Ivan Novick <iv...@0x...> wrote: > >> Hi, I am trying to compile version 3.1 a Fedora Core 4, amd64 machine. >> >> the build is adding -m32 and compiling a 32 bit version of valgrind. >> >> When i run >> >> valgrind ls >> >> it says wrong executable calss (e.g. 32-bit instead of 64-bit) > > Presumably this is the "valgrind: wrong ELF executable class" message? > > If it is then something very odd is going on as it means that valgrind > has failed to identify the program you are running properly. > >> Any ideas how to change the configure options to get a 64 bit Valgrind? > > You should already have one - when you build valgrind on amd64 you > actually get two copies of all the tools. One is 32 bit and the other > one is 64 bit - the actual valgrind program is then a small program > that decides whether the thing you are running is 32 or 64 bit and > launches the right tool executable. > > The installed environment on a 64 bit box should look something > like this: > > /usr/bin/valgrind (the launcher, a 64 bit program) > /usr/lib/valgrind/x86-linux/* (the 32 bit tools) > /usr/lib/valgrind/amd64-linux/* (the 64 bit tools) > > It sounds like the launcher is wrong deciding to use the 32 bit > tools when it should be using the 64 bit ones or vice versa. > > Can you (a) confirm that your installation looks like I have > described and (b) provide the output of "file <your-program>" > and "valgrind -d <your-program>" so we can diagnose the problem. > > Tom > |
|
From: Shiva <shi...@gm...> - 2016-10-15 01:47:23
|
Hi Tom, I am trying to run valgrind on my executable which is of 32-bit. I am getting the following error: valgrind <executable> valgrind: wrong ELF executable class (eg. 32-bit instead of 64-bit) valgrind: <executable>: cannot execute binary file Couple of other logs which are useful: file <executable> <executable>: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, BuildID[sha1]=570302117aa12728043bc5263352ce95f637db35, not stripped valgrind -d <executable> --6455:1:debuglog DebugLog system started by Stage 1, level 1 logging requested --6455:1:launcher no tool requested, defaulting to 'memcheck' --6455:1:launcher no platform detected, defaulting platform to 'amd64-linux' --6455:1:launcher launching <path>/memcheck-amd64-linux --6455:1:debuglog DebugLog system started by Stage 2 (main), level 1 logging requested Looks like valgrind launcher is automatically starts 64bit execution, and hence throwing the above error. Is there a way I can run valgrind for my 32-bit image? However valgrind executable are built to support both 32-bit and 64 bit version. Thanks, Shivakumar -- View this message in context: http://valgrind.10908.n7.nabble.com/m32-tp36165p56883.html Sent from the Valgrind - Users mailing list archive at Nabble.com. |
|
From: Paul F. <pa...@fr...> - 2016-10-15 07:06:38
|
Shiva wrote: > Hi Tom, > I am trying to run valgrind on my executable which is of 32-bit. I am > getting the following error: > valgrind <executable> > valgrind: wrong ELF executable class (eg. 32-bit instead of 64-bit) > valgrind: <executable>: cannot execute binary file > > Couple of other logs which are useful: > > file <executable> > <executable>: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 > (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, > BuildID[sha1]=570302117aa12728043bc5263352ce95f637db35, not stripped > > valgrind -d <executable> > --6455:1:debuglog DebugLog system started by Stage 1, level 1 logging > requested > --6455:1:launcher no tool requested, defaulting to 'memcheck' > --6455:1:launcher no platform detected, defaulting platform to 'amd64-linux' > --6455:1:launcher launching <path>/memcheck-amd64-linux > --6455:1:debuglog DebugLog system started by Stage 2 (main), level 1 logging > requested > > Looks like valgrind launcher is automatically starts 64bit execution, and > hence throwing the above error. > Is there a way I can run valgrind for my 32-bit image? However valgrind > executable are built to support both 32-bit and 64 bit version. > Thanks, > Shivakumar > Hi Shiva Which version of Valgrind are you using? And which OS and platform? Did you install it with your package manager or build it from source? Regards Paul |
|
From: Shiva <shi...@gm...> - 2016-10-15 20:19:00
|
Hi Tom, I am using 3.11.0 version under Ubuntu machine. I used the following steps to build and install as metioned in the valgrind website. cd valgrind ./autogen.sh ./configure --prefix=... make make install Regards, Shiva On Fri, Oct 14, 2016 at 10:45 PM, paulf [via Valgrind] < ml-...@n7...> wrote: > Shiva wrote: > > > Hi Tom, > > I am trying to run valgrind on my executable which is of 32-bit. I am > > getting the following error: > > valgrind <executable> > > valgrind: wrong ELF executable class (eg. 32-bit instead of 64-bit) > > valgrind: <executable>: cannot execute binary file > > > > Couple of other logs which are useful: > > > > file <executable> > > <executable>: ELF 32-bit MSB executable, PowerPC or cisco 4500, version > 1 > > (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, > > BuildID[sha1]=570302117aa12728043bc5263352ce95f637db35, not stripped > > > > valgrind -d <executable> > > --6455:1:debuglog DebugLog system started by Stage 1, level 1 logging > > requested > > --6455:1:launcher no tool requested, defaulting to 'memcheck' > > --6455:1:launcher no platform detected, defaulting platform to > 'amd64-linux' > > --6455:1:launcher launching <path>/memcheck-amd64-linux > > --6455:1:debuglog DebugLog system started by Stage 2 (main), level 1 > logging > > requested > > > > Looks like valgrind launcher is automatically starts 64bit execution, > and > > hence throwing the above error. > > Is there a way I can run valgrind for my 32-bit image? However valgrind > > executable are built to support both 32-bit and 64 bit version. > > Thanks, > > Shivakumar > > > > Hi Shiva > > Which version of Valgrind are you using? And which OS and platform? > > Did you install it with your package manager or build it from source? > > Regards > Paul > > > ------------------------------------------------------------------------------ > > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > Valgrind-users mailing list > [hidden email] <http:///user/SendEmail.jtp?type=node&node=56884&i=0> > https://lists.sourceforge.net/lists/listinfo/valgrind-users > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > http://valgrind.10908.n7.nabble.com/m32-tp36165p56884.html > To unsubscribe from -m32, click here > <http://valgrind.10908.n7.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=36165&code=c2hpdmFrdW1hcmcubXNnQGdtYWlsLmNvbXwzNjE2NXwtNjE4NTI2MTA2> > . > NAML > <http://valgrind.10908.n7.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://valgrind.10908.n7.nabble.com/m32-tp36165p56889.html Sent from the Valgrind - Users mailing list archive at Nabble.com. |