Community
cancel
Showing results for 
Search instead for 
Did you mean: 
PPhil4
Novice
1,953 Views

running valgrind

I'm running the 20160606 image from the Intel web site.

I did:

opkg install valgrind

and it installed: libc6-dbg and valgrind

When I run valgrind, I get the following:

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.so.2

valgrind: was not found whilst processing

valgrind: symbols from the object with soname: ld-linux.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.

just to check that libc6-dbg is installed, I did:

opkg install libc6-dbg

and it replied:

Package libc6-dbg (2.20-r0) installed in root is up to date.

Any ideas on how to get valgrind to run?

15 Replies
idata
Community Manager
198 Views

Hi,

Exactly what steps you did to get that output? I tried installing valgrind but didn't have that output.

 

The commands I ran were:

 

opkg install valgrind opkg install libc6-dbg

-Sergio

 

PPhil4
Novice
198 Views

I did:

opkg install valgrind

It reported installing libc6-dbg then installing valgrind. I then did:

valgrind myprog

And it generated the output I submitted.

If I run "valgrind --help" it runs successfully.

idata
Community Manager
198 Views

What are the contents of myprog, what kind of file is it? Valgrind is typically used like valgrind program args. This runs program under valgrind using the mem-check tool. What tool are you using?

 

 

Take a look at http://valgrind.org/docs/manual/quick-start.html http://valgrind.org/docs/manual/quick-start.html for more information.

 

 

-Sergio

 

PPhil4
Novice
198 Views

Myprog is a C++ program compiled with GCC. I was running the memcheck tool.

I'm familiar with valgrind, having run it on other systems.

idata
Community Manager
198 Views

I'd like to test this behavior. Can you share the Myprog code and the GCC command you used to compile? Additionally, from which repository are you fetching the valgrind package?

 

 

-Sergio
idata
Community Manager
198 Views

Do you still need help with this thread, were you able to run valgrind?

 

 

-Sergio

 

PPhil4
Novice
198 Views

Sorry for not getting back to you sooner, I was on a sort-of vacation.

I can repeat the problem with the following program:

# include

int main()

{

printf("Hello world\n");

return 0;

}

compiled with:

gcc hello.c -o hello

and run with:

valgrind ./hello

-phil

idata
Community Manager
198 Views

Hi phil.w.howard,

 

 

I ran the same steps as you and got the same fatal error message of your first post. I'll investigate further on this case and provide a suggestion soon.

 

 

-Sergio

 

ggreg6
Beginner
198 Views

Hi Sergio, I too am having this problem. This link seems to explain why it is having issues, but does not seem to correspond to the installation on the Edison.

http://www.64k-tec.de/2010/10/using-suppression-files-with-valgrind/ http://www.64k-tec.de/2010/10/using-suppression-files-with-valgrind/

I am running the same image as phil.w.howard, and have also verified that gbd and libc6-dbg are the latest version available.

Any help would be greatly appreciated.

idata
Community Manager
198 Views

Hi GDriscoll

 

 

We reproduced the issue and ran into the same issue as you and @ phil.w.howard. We've reported this situation to the proper team but there's no fix at the moment. We're working to see if it's possible for valgrind to work on future software releases. Thank you for your understanding.

 

 

-Sergio

 

idata
Community Manager
198 Views

Hi,

 

 

We've found a workaround to use valgrind. The workaround is to reinstall libc6 (opkg install libc6 --force-reinstall)

 

 

This looks like a mismatch in the lD release/debug versions. The Edison image comes with the libc6 package installed, valgrind installs libc6-dbg as a dependency. For some reason, even though they are the same version they're causing a conflict. Possibly since the libc6 ipk's have a different date than the .so's in the Edison image.

 

 

-Sergio

 

ggreg6
Beginner
198 Views

Hi Sergio, Thank you for the workaround. This is working now!

-Greg

MPapi
New Contributor I
198 Views

Hi Phil,

I was able to run background by installing all of the "optional" clibxxx.ipk modules from Alex's repository.

Hope this helps - Mario.

idata
Community Manager
198 Views

Hi Mario,

 

 

Thank you for providing a workaround for this. Hopefully this will be useful for other users in the community who are trying to use valgrind.

 

 

-Sergio

 

idata
Community Manager
198 Views

Thank you for letting us know this suggestion worked. If you have other questions don't hesitate to open a new thread to receive help from the community.

 

 

-Sergio

 

Reply