tags:

views:

276

answers:

1

On my MacBook Pro (running 10.6.2) an Xcode (3.2.1) project build is failing with the error:

copyplist failed with exit code 127

When I examine the build results I see that the copyplist script is reporting:

sh: plutil: command not found

Earlier in the build results for CopyPlistFile I see the line:

setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:Developer/usr/bin"

The plutil executable is actually located in /usr/bin

On my desktop machine with the same O/S and Xcode versions the project build succeeds and in the build results I can see that the PATH also has appended to it ":/usr/bin:/bin:/usr/sbin:/sbin"

How do I go about correcting the problem in Xcode on my MBP?

UPDATE I originally discounted the SO question http://stackoverflow.com/questions/932424/where-is-path-set-in-xcode, but since someone else also referred me to that question I'm including my results using the suggestions found there.

1) On the working machine there is no ~/.MacOSX directory. On the machine with the error the value for the PATH key in the environment.plist file in that directory was empty. I removed both the file and the directory to no avail.

2) Since the script with the error comes from the "/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources" directory I presumed changing that file wasn't likely to be the appropriate correction.

3) The .profile on the machine with the error added two directories to the PATH that were not present in the PATH on the working machine. Since there was also a fifth directory in the PATH on both machines that wasn't reflected in the build results on the working machine I figured this wasn't likely to be the source of the problem, but I went ahead and made the .profiles match on both machines anyway. The build error did not go away.

4) There are no environment variables set for the executable.

Further suggestions?

A: 

Using full paths in your script would be the simplest way. Searching would be another http://stackoverflow.com/questions/932424/where-is-path-set-in-xcode

Azeem.Butt
Perhaps I'm misunderstanding you, but this isn't my script. The copyplist script is in the "/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources" directory.I did look at the question you noted before I posted my question, but, Xcode nube that I am, I wasn't certain that it applied. I'll update my question to reflect the suggestions in that question's answers.
Bruce Hobbs