« IIS7.5: Increase ASP Buffer Limit | Main | Devops is a Verb »

06/20/2012

Build Note for Valgrind 3.7.0 on OS X 10.7.4

While getting started with Zed Shaw's Learn C The Hard Way book, I experienced the following error running 'configure' when building Valgrind from source:

./configure
-bash: ./configure: /bin/sh: bad interpreter: Operation not permitted

In order to get the Valgrind configure script to run under OS X (Lion) 10.7.4, I had to prepend "bash" in front of "configure":

bash ./configure

Update: And, this might not be the right way to do it since running make after a successful configure creates an install-sh script that needs the shebang #!/bin/sh replaced with #!/bin/bash before a sudo make install will work...Valgrind is installed though!

Update #2: Apparently, files downloaded from the Internet that have the executable bits set on them are flagged as of OS X 10.7.3 (possibly earlier) that prevent them from running unless a prompt is accepted first. Shell scripts will have those flags set as well but instead of being able to accept a prompt, you get the bad interpreter: Operation not permitted message. Running the following command in the terminal will remove the com.apple.quarantine extended attribute from the files:

xattr -rd com.apple.quarantine /directory/containing/executables/you/want/to/run

This is a note to my future self in case I run into it again building future versions of Valgrind.

TrackBack

TrackBack URL for this entry:
https://www.typepad.com/services/trackback/6a01156fbc6fe6970c0177428f759b970d

Listed below are links to weblogs that reference Build Note for Valgrind 3.7.0 on OS X 10.7.4:

Comments