Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Linux Tools Project » Valgrind with MacOS Sierra - cannot create symlink( System Integrity Protection prevents symlink to hardcoded path)
Valgrind with MacOS Sierra - cannot create symlink [message #1781308] Mon, 05 February 2018 21:29 Go to next message
David Antliff is currently offline David AntliffFriend
Messages: 10
Registered: April 2015
Junior Member
On MacOS Sierra, it is common for users to install valgrind via Brew. This installs the binary as /usr/local/bin/valgrind.

The Linux Tools plugin looks for valgrind at /usr/bin/valgrind, and does not search /usr/local/bin or allow the user to specify a custom path as far as I can tell.

The Linux Tools documentation says to create a symlink in /usr/bin. Apart from the `ln` command being incorrect (the parameters are backwards), this is not possible in Sierra due to System Integrity Protection (SIP).

SIP prevents any modifications to /usr/bin even by the root user. It is therefore impossible to create a /usr/bin/valgrind symlink even as root, without disabling SIP, and I'd suggest that disabling SIP is a very bad idea.

So I think we're left in a situation where valgrind can be run from the command line, but the Linux Tools plugin within Eclipse is unable to be used.

Is this an accurate assessment or is there a way around this that I don't know yet?
Re: Valgrind with MacOS Sierra - cannot create symlink [message #1781309 is a reply to message #1781308] Mon, 05 February 2018 21:32 Go to previous messageGo to next message
David Antliff is currently offline David AntliffFriend
Messages: 10
Registered: April 2015
Junior Member
For anyone coming across this in future, I've come across a per-project workaround that seems to work:

Open the project properties and select "Linux Tools Path", then select "Prepend string to PATH" and choose "Custom", then add the text "/usr/local/bin" to the text field.

This should enable the Linux Tools plugin to find the valgrind binary in /usr/local/bin.

[Updated on: Mon, 05 February 2018 21:34]

Report message to a moderator

Re: Valgrind with MacOS Sierra - cannot create symlink [message #1781315 is a reply to message #1781308] Mon, 05 February 2018 23:03 Go to previous message
Jeff Johnston is currently offline Jeff JohnstonFriend
Messages: 215
Registered: July 2009
Senior Member
I think that section of the manual is out of date. Looking at the current code, I see no hard-coding of /usr/bin/valgrind. The ValgrindCommand class is just running "valgrind" and expecting it to be on the Path. I don't have a Mac system to test with, but did you already try putting /usr/local/bin on the path used to bring up your Eclipse?
Previous Topic:Linux Tools 6.2.0 for Oxygen.2 is released
Next Topic:Linux Tools 7.0.0 is released for Photon
Goto Forum:
  


Current Time: Thu Apr 25 00:56:59 GMT 2024

Powered by FUDForum. Page generated in 0.24846 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top