News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

How to Use Valgrind

Started by TuxD3v, March 10, 2013, 08:14:15 PM

Previous topic - Next topic

TuxD3v

Hi Guys,
i qant to run valgrind to check if i have memleaks..

When i run it from the menu Valgrind->Run MemCheck...

it gives me an error...

valgrind --version
execvp(valgrind, --version) failed with error 2!
valgrind --leak-check=yes --leak-check=full --track-origins=yes --show-reachable=yes --xml=yes "/media/MY_STUFF2/PROGRAMING/Practice/c++/first/bin/Debug/first"
execvp(valgrind, --leak-check=yes, --leak-check=full, --track-origins=yes, --show-reachable=yes, --xml=yes, /media/MY_STUFF2/PROGRAMING/Practice/c++/first/bin/Debug/first, ) failed with error 2!

Code::blocks make the fork, but when it run the exec fail...why??

I have to run any config first to run Valgring??

I am running the last Code::Blocls version , and Mint LMDE 64bits...in the plugins valgrins apeared with the status...instaled??!!

Thanks in Advance..

Ps-> i'am in a c++ project

regards

Jenna

Do you have the valgrind-package of mint installed ?
The plugin is just a wrapper for the executable, that has to be installed, of course.

TuxD3v

OMG...  :o

Thanks Jens  ;)

Unfortunately, seems that the failure is my destiny...  >:(

is there any option to the linker to solve this problem??

valgrind --version
valgrind-3.7.0
valgrind  --leak-check=full --track-origins=yes --show-reachable=yes --xml=yes --xml-file=/media/MY_STUFF2/PROGRAMING/Practice/c++/first/ValgrindOut.xml "/media/MY_STUFF2/PROGRAMING/Practice/c++/first/bin/Debug/first"

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-x86-64.so.2
valgrind:  was not found whilst processing
valgrind:  symbols from the object with soname: ld-linux-x86-64.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.

I don  have this package in the repos of mint LMDE... : libc6-dbg

Does any one know how to solve this problem?

Thanks in advance for the help

regards

Jenna

Try to find the package containing the debug-symbols for ld-linux-x86-64.so.2 on http://packages.linuxmint.com/ for your mint-installation or ask the mint maintainers.

TuxD3v

thanks Jens,

The guys in Mint LMDE can  help...i have all the packages installed...

Can you guys  confirm if everithing goes well with you??

I mean, if you can run Valgrind with code blocks?I'm sorry for the trouble....

thanks in advance...i don  know what to do more...  >:(

regards

Alpha

Quote from: lmx on March 12, 2013, 01:28:41 AM
Can you guys  confirm if everithing goes well with you??
Valgrind works fine (very slow, but fine) launched from Code::Blocks for me on Ubuntu LTS.

TuxD3v


[/quote]
Valgrind works fine (very slow, but fine) launched from Code::Blocks for me on Ubuntu LTS.
[/quote]

thanks for the reply...i think I'm closest to have an Hard atack(i have removed a librarie that almost destroyed my usability and the chance to get my OS back... >:() )

Can you please do a :

apt policy libc6-dbg

and a:

dpkg -l | grep -i binutils

and a :

dpkg -l | grep- i libc6


And Post the results here ?PLEASE ...

sorry for the trouble...i don't  know how to run Valgrind in Mint LMDE...the error seems to be related with the gnu linker...but right now my head is to mutch hot, and tired, and I can't figure it out.... ???

A BIG Thanks in advance...

regards

Alpha

Quote from: lmx on March 12, 2013, 04:56:52 AM
apt policy libc6-dbg
No command 'apt' found, did you mean: [...]

Quote from: lmx on March 12, 2013, 04:56:52 AM
dpkg -l | grep -i binutils

ii  binutils                               2.22-6ubuntu1                                       GNU assembler, linker and binary utilities
ii  binutils-mingw-w64-i686                2.22-2ubuntu1+1                                     Cross-binutils for Win32 (x86) using MinGW-w64
ii  binutils-mingw-w64-x86-64              2.22-2ubuntu1+1                                     Cross-binutils for Win64 (x64) using MinGW-w64


Quote from: lmx on March 12, 2013, 04:56:52 AM
dpkg -l | grep -i libc6

ii  libc6                                  2.15-0ubuntu10.3                                    Embedded GNU C Library: Shared libraries
ii  libc6-dbg                              2.15-0ubuntu10.3                                    Embedded GNU C Library: detached debugging symbols
ii  libc6-dev                              2.15-0ubuntu10.3                                    Embedded GNU C Library: Development Libraries and Header Files

TuxD3v

#8
Thanks Alpha for the help ;)

I stated that the problem doesn't came from Code::Blocks...but instead from a conflict with my libraries...i have enabled multiarch, and now i have a conflict in i386 and amd64 libraries...

I have, more or less,(debian packages) the same versions you have...

Thanks for the Help ;)

regards