error "copyplist failed with exit code 127"

S

Samuel Sam

Morning everyone,

I'm not a ruby developer (using XCode) but facing an error which is
coming from the ruby file "copyplist " locate under :
/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copylyst

The entire error message is :
Code:
sh: plutil: command not found
Command
/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copyplist
failed with exit code 127

If needed I can provide you with the whole copylist code but here's the
lines that call "plutil" word:
Code:
system('plutil -s -lint -- "' + srcPath + '"')
...
system('plutil -convert "' + OPTIONS[:OutputFormat] + '" -s -o "' +
OPTIONS[:OutputDir] + '/' + File.basename(srcPath) + '" -- "' + srcPath
+ '"')

My current understanding of this error is :
- The ruby file "copylist" tries to access a Unix script "plutil"but
can't find it.

That "plutil" file is located under: /usr/bin which apparently is in
ruby path by default.
I tried to add the line
Code:
 Dir.chdir("/usr/bin")
in
"copylist" just before the two lines stated upper but still getting the
same error.
I also tried with "./plutil" which failed miserably providing an other
error.

I hope that one of you can help me.
Thanks in advance.
 
M

Markus Fischer

Hi,
The entire error message is :
Code:
sh: plutil: command not found
Command
/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copyplist
failed with exit code 127

I'm not that acquainted with MacOSX but I realize plutil is an essential
part of it.

So, we some basic checks: plutil is there and really works? I.e. "which
plutil procudes /usr/bin/plutil ?

The $PATH environment variable from which ruby (!) is called contains
/usr/bin/ (OK unlikely not to be, but needs check) ?

Does it work using an absolute path to /usr/bin/plutil in the copylist
script?

Are the permission on /usr/bin/plutil properly set?

All in all it looks rather like a MacOSX issue then ruby, but I'm sure
we will get there.

- Markus
 
S

Samuel Sam

Hello Markus,

Yes! The "plutil" script does work correctly:
Code:
$ plutil
No files specified.
plutil: [command_option] [other_options] file...
The file '-' means stdin
Command options are (-lint is the default):
-help    show this message and exit
-lint    check the property list files for syntax errors
-convert fmt  rewrite property list files in format
fmt is one of: xml1 binary1
There are some additional optional arguments:
-s    be silent on success
-o path  specify alternate file path name for result;
the -o option is used with -convert, and is only
useful with one file argument (last file overwrites);
the path '-' means stdout
-e extension  specify alternate extension for converted files
--    specifies that all further arguments are file names
$
$ plutil test.plist
test.plist: OK
[code]

I tried to use the absolute path /usr/bin/plutil but then, ruby
considered plutil as being a directory and not a file. Error received :
[code]
sh: line 0: cd: /usr/bin/plutil: Not a directory
Command
/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copyplist
failed with exit code 1

I've also checked permissions which appear to be coorect :
-rwxr-xr-x 1 root wheel 71648 11 avr 04:47 plutil
 
E

Eric Christopherson

Morning everyone,

I'm not a ruby developer (using XCode) but facing an error which is
coming from the ruby file "copyplist " locate under :
/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copylyst

The entire error message is :
Code:
sh: plutil: command not found
Command
/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copyplist
failed with exit code 127

If needed I can provide you with the whole copylist code but here's the
lines that call "plutil" word:
Code:
system('plutil -s -lint -- "' + srcPath + '"')
...
system('plutil -convert "' + OPTIONS[:OutputFormat] + '" -s -o "' +
OPTIONS[:OutputDir] + '/' + File.basename(srcPath) + '" -- "' + srcPath
+ '"')

My current understanding of this error is :
- The ruby file "copylist" tries to access a Unix script "plutil"but
can't find it.

That "plutil" file is located under: /usr/bin which apparently is in
ruby path by default.
I tried to add the line
Code:
 Dir.chdir("/usr/bin")
in
"copylist" just before the two lines stated upper but still getting the
same error.
I also tried with "./plutil" which failed miserably providing an other
error.

Have you tried changing it to /usr/bin/plutil? (Just a suggestion; I'm
guessing that would do the same thing as your chdir+./plutil, but you
never know.)

It appears other people are suffering this problem too. Maybe you
should file a bug report with Apple (at either
<https://bugreport.apple.com/cgi-bin/WebObjects/RadarWeb.woa/wa/signIn>
or <http://developer.apple.com/bugreporter/>; I'm not sure what the
difference is), then also do one at
<http://openradar.appspot.com/page/1> (which is basically a site
intended to work in tandem with Apple's bug tracker; OpenRadar allows
users to search for existing bug reports, which the Apple one does not
do).
 
S

Samuel Sam

Eric,

I tried to use the absolute path /usr/bin/plutil but then, ruby
considered plutil as being a directory and not a file. Error received :
Code:
sh: line 0: cd: /usr/bin/plutil: Not a directory
Command
/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copyplist
failed with exit code 1

Thanks for directing me to these sites, I didn't know them.
And thanks to everyone from Ruby community. I'll get back here once I
have the answer!
 
E

Eric Christopherson

Eric,

I tried to use the absolute path /usr/bin/plutil but then, ruby
considered plutil as being a directory and not a file. Error received :
Code:
sh: line 0: cd: /usr/bin/plutil: Not a directory
Command
/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copyplist
failed with exit code 1

Oh, yeah. Sorry, I forgot you wrote that.

It looks like the script has other problems as well. For instance,
when I run it on a plist file:
$ /Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copyplist /Users/eric/Library/Preferences/com.apple.Terminal.plist .
copyplist: no output directory specified
usage: copyplist [options] SRCFILE ... DSTDIR
-v, --[no-]validate Check validity before copying
-o, --outdir DIR Specify the output directory
-c, --convert FMT Convert output to FMT (same values as for 'plutil -convert')
-h, --help Show this message

It specifies "no output directory specified", even though I've
specified ".". So I use "-o ." to specify it more explicitly, and that
works. However, when I add "-v" to validate, I get "unrecognized
option: -lint", followed by the plutil help text. I'm not sure which
program is reporting that "-lint" is unrecognized; if I manually run
"plutil -lint" it works fine.
Thanks for directing me to these sites, I didn't know them.
And thanks to everyone from Ruby community. I'll get back here once I
have the answer!

Good luck!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,088
Latest member
JeremyMedl

Latest Threads

Top