2

I installed Valgrind on SUSE Linux SLES 11SP2 under my home directory and added it to the path. I then installed eclipse Juno for C/C++ Service Release 2 Build id: 20130225-0426 and installed the Valgrind plugin.

When I try to create a profile configuration with Valgrind I get an error message: "[Valgrind Options]: Couldn't determine version of Valgrind", and though it allows me to make the configuration it prevents me from proceeding by greying out all buttons except for the close button.

I know I am missing something trivial like defining the location of the Valgrind executable in eclipse, but I was unable to find it, not in the project properties nor in the window preferences.

I will appreciate your help.

rmb
  • 31
  • 1
  • 2

2 Answers2

0

Ok, I figured it out.

I moved the Valgrind installation to a new shared location, and tried it out with a new computer (same architecture).

It did not affect the original computer I installed it on, but Valgrind had a problem with the new one, as indicated in the README (and I meanwhile forgot): “Important! Do not move the valgrind installation into a place different from that specified by --prefix at build time. This will cause things to break in subtle ways, mostly when Valgrind handles fork/exec calls.”.

This caused Valgrind to break when run standalone with the message: “valgrind: failed to start tool 'memcheck' for platform 'amd64-linux': No such file or directory”,

however when running Valgrind from eclipse it probably translated it to the message: "[Valgrind Options]: Couldn't determine version of Valgrind".

In short: Do not move the Valgrind installation but re-install it. And this message from eclipse indicates that something bad happened with the installed Valgrind and not that it cannot find it.

rmb
  • 31
  • 1
  • 2
0

I am getting the same error but its not caused by the explanation you have given.

You can get this error if you are using valgrind on mac os x because valgrind is usually not installed in the directory eclipse is looking for. In order to fix the issue on mac, you need to make a symbolic link to the valgrind location by typing ln -s valgrind_location /usr/bin/valgrind. Note this differs from what are in the directions on eclipse's site http://wiki.eclipse.org/Linux_Tools_Project/Valgrind/User_Guide. For some reason they have the call backwards on their site. Once I made this correction valgrind worked correctly from within Eclipse.

So on macs at least the error that it can't determine the version of valgrind at least matches up with eclipse not being able to find the file.

Zachary Kraus
  • 1,051
  • 10
  • 21
  • In MacOS Sierra (and probably more recent versions), `/usr/bin` is protected by System Integrity Protection, which prevents the creation of the symlink, even by the root user. Since disabling SIP is probably a Very Bad Idea, I'm not sure what we can do about this except perhaps recompile Linux Tools to look for Valgrind in `/usr/local/bin` instead? – davidA Feb 05 '18 at 21:18
  • Interesting that might explain why when I installed Sierra it was so developer unfriendly. – Zachary Kraus Jun 07 '18 at 03:00