f



error "copyplist failed with exit code 127"

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
[/code]

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
+ '"')
[/code]

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") [/code] 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.
-- 
Posted via http://www.ruby-forum.com/.

0
9/25/2010 8:23:57 AM
comp.lang.ruby 48885 articles. 0 followers. Post Follow

8 Replies
749 Views

Similar Articles

[PageSpeed] 11

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
> [/code]

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

0
Markus
9/25/2010 9:09:51 AM
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
[/code]

I've also checked permissions which appear to be coorect :
-rwxr-xr-x 1 root wheel 71648 11 avr 04:47 plutil
-- 
Posted via http://www.ruby-forum.com/.

0
9/25/2010 9:24:38 AM
On Sat, Sep 25, 2010 at 3:23 AM, Samuel Sam <samuel13_666@yahoo.fr> wrote:
> 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
> [/code]
>
> 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
> + '"')
> [/code]
>
> 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") [/code] 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).

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

0
Eric
9/25/2010 5:39:47 PM
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
[/code]

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!
-- 
Posted via http://www.ruby-forum.com/.

0
Samuel
9/26/2010 8:38:00 AM
On Sun, Sep 26, 2010 at 3:38 AM, Samuel Sam <samuel13_666@yahoo.fr> wrote:
> 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
> [/code]

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!

0
Eric
9/26/2010 9:03:21 PM
Could the problem be related to these posts?
<http://stackoverflow.com/questions/1165758/build-problem-in-xcode>
<http://stackoverflow.com/questions/384962/copyplist-failed-with-exit-code-71>

Those have exit code 71 instead of 127, so I don't know if it's the
same thing. I'm also not quite sure if the problem is with Rubys
installed as /usr/bin/ruby, or if other versions in the path cause it
too.

0
Eric
9/27/2010 2:05:57 AM
Ok, I've discovered something new : If I drag and drop the XCode error 
to the desktop, a texte file is being created showing much more details.

[code]
CopyPlistFile "build/Release-iphonesimulator/CocosDenshion - Tom The 
Turret.app/sprites.plist" 
CocosDenshion/TestsAndDemos/TomTheTurret/Resources/sprites.plist
cd /Users/samuel/Desktop/cocos2d-iphone-0.99.4
setenv PATH 
"/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin"
/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copyplist 
--convert binary1 
CocosDenshion/TestsAndDemos/TomTheTurret/Resources/sprites.plist 
--outdir 
"/Users/samuel/Desktop/cocos2d-iphone-0.99.4/build/Release-iphonesimulator/CocosDenshion 
- Tom The Turret.app"

sh: plutil: command not found
Command 
/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copyplist 
failed with exit code 127
[/code]

Here, there's something I don't understand:
In the error, the PATH doesn't contain /usr/bin and I'm almost sure 
that's causing my issue. But where things get weird is if I type 
"export" in a terminal I got :
PATH="/Library/Frameworks/Python.framework/Versions/2.6/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"

Well, at leasst I know at 90% that this is a path issus... Now I need to 
fix it :)
-- 
Posted via http://www.ruby-forum.com/.

0
Samuel
9/27/2010 7:23:34 AM
And here we go, problem solved. Instead of searching for hours how to 
modify these paths, I just copied the "plutil" script to 
/developer/usr/bin. It's working perfectly.
Apparently XCode does use it's own path variables that are different 
from the one in "environment.plist"

So, you guys were right, that's not a ruby problem but an XCode one.
Again thanks for your advice ;)
Enjoy.
-- 
Posted via http://www.ruby-forum.com/.

0
Samuel
9/27/2010 7:48:29 AM
Reply:

Similar Artilces:

Protocol specific error code(s): "*", "*", "0".
I am using the ibm_db2 PECL drive in PHP for connecting to or DB2 database. I created a persistent connection and things seemed to work fine at first. However, after a few tests / connections, I started to get this error when running through my queries: [IBM][CLI Driver] SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS". Location where the error was detected: "10.26.243.61". Communication function detecting the error: "recv". Protocol specific error code(s): &...

What is "error 8"
I set up an external serial modem using the Red Hat GUI networking tool as a generic modem device. However, when I hit the "Activate" button, I get the message, "Failed to activate device with error 8." Where can I find what "error 8" means? Thanks. No one responded, but for the benefit of any other newbies who encounter this problem, here is the solution: I looked in the System Log and saw that the modem did not find a dial tone. I plugged in a phone line, and the "Activate" command worked fine. (I had not realized that "Act...

ruby 1.8.0: Error on "%02d" % "08" or "%02d" % "09"
Hi, I'm using ruby 1.8.0 (Win native and cygwin version). These two commands "%02d" % "08" "%02d" % "09" result in the error `%': invalid value for Integer: "08" (ArgumentError) For other numbers/strings (including "8" and "9", but also "01".."07", it appears to work as expected -- i.e., as I would expect it. The problem, I want to solve: Turn strings like "1", "3", "04", "03" into a canonical 2-digit string with zeros in front. Should I use a di...

""""""""""""""""""""""ADD ME""""""""""""""""""""
Hi , Hope you are doing great. Please let me take this opportunity to introduce myself, Iam Karthik working with BhanInfo Inc, a NY based company. We have consultants on our bench on various technologies, my request is to add me to your distribution list and kindly do send me the requirements. i have the below list available 1. Mainframe 2. Java 3.. Financial Analyst 4. Data Architect If there is any vendor ship agreement which has to be signed then I would like to take an opportunity to represent my company and expect your cooperation... We look forward to build a ve...

"""""""""ADD ME""""""""""
Hi , Hope you are doing great. Please let me take this opportunity to introduce myself, Iam Karthik working with BhanInfoi Inc, a NY based company. We have consultants on our bench on various technologies, my request is to add me to your distribution list and kindly do send me the requirements. i have the below list available 1. Mainframe 2. Java 3.. Financial Analyst 4. Data Architect If there is any vendor ship agreement which has to be signed then I would like to take an opportunity to represent my company and expect your cooperation... ...

Protocol specific error code(s): "10065", "*", "*". SQLSTATE=08001
Hello All, I am getting the below error message when I am trying to connect from client to remote database server installed on Linux. DB2 UDB ESE database is running on a trail version on Linux and client (administration client) installed on Windows. #_____________________________________________________________________ Protocol specific error code(s): "10065", "*", "*". SQLSTATE=08001 #_____________________________________________________________________ One the DB2 server: [db2inst1@fedorasvr ~]$ db2level DB21085I Instance "db2inst1"...

Urgent Requirement in """""""""""""NEW YORK""""""""""""""""
Hello Partners, Please find the requirement below. Please send the updated resume along with rate and contact no. REQ#1: Title : Java Developer ( Rating Project) Duration : 6 months Rate : open Location : NY strong java, WebLogic 9.2, Web Services, Oracle REQ#2: Title : Java Developer Duration : 4 months Rate : open Location : NY Strong java, SQL REQ#3: Title : VB.Net Consultant Location : NY Duration : 4 months Rate : open Primarily looking at someone who has Excel, VB.net a...

"If then; if then;" and "If then; if;"
I have a raw data set which is a hierarchical file: H 321 s. main st P Mary E 21 F P william m 23 M P Susan K 3 F H 324 S. Main St I use the folowing code to read the data to creat one observation per detail(P) record including hearder record(H): data test; infile 'C:\Documents and Settings\retain.txt'; retain Address; input type $1. @; if type='H' then input @3 Address $12.; if type='P' then input @3 Name $10. @13 Age 3. @16 Gender $1.; run; but the output is not what I want: 1 321 s. main H 2 321 s. main P Mary E 21 F 3 321 s...

why "::", not "."
Why does the method of modules use a dot, and the constants a double colon? e.g. Math::PI and Math.cos -- Posted via http://www.ruby-forum.com/. On Oct 26, 2010, at 01:48 , Oleg Igor wrote: > Why does the method of modules use a dot, and the constants a double > colon? > e.g. > Math::PI and Math.cos For the same reason why inner-classes/modules use double colon, because = they're constants and that's how you look up via constant namespace. Math::PI and ActiveRecord::Base are the same type of lookup... it is = just that Base is a module and PI is a float....

"/a" is not "/a" ?
Hi everybody, while testing a module today I stumbled on something that I can work around but I don't quite understand. >>> a = "a" >>> b = "a" >>> a == b True >>> a is b True >>> c = "/a" >>> d = "/a" >>> c == d True # all good so far >>> c is d False # eeeeek! Why c and d point to two different objects with an identical string content rather than the same object? Manu Emanuele D'Arrigo wrote: >>>> c = "/a" >>>&...

"out" and "in out"
Hi i found the following explaination: In Ada, "in" parameters are similar to C++ const parameters. They are effectively read-only within the scope of the called subprogram. Ada "in out" parameters have a reliable initial value (that passed in from the calling subprogram) and may be modified within the scope of the called procedure. Ada "out" parameters have no reliable initial value, but are expected to be assigned a value within the called procedure. What does "have no reliable initial value" mean when considering the "out" parameter? By c...

about "++" and "--"
why this program snippet display "8,7,7,8,-7,-8" the program is: main() { int i=8; printf("%d\n%d\n%d\n%d\n%d\n%d\n",++i,--i,i++,i--,-i++,-i--); } > why this program snippet display "8,7,7,8,-7,-8" Ask your compiler-vendor because this result is IMHO implementation-defined. Check this out: http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.15 http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.16 Regards, Irina Marudina fxc123@gmail.com wrote: > why this program snippet display "8,7,7,8,-7,-8&q...

"my" and "our"
Hi, while testing a program, I erroneously declared the same variable twice within a block, the first time with "my", the second time with "our": { my $fz = 'VTX_Link'; .... ( around 200 lines of code, all in the same block) our $fz = 'VTX_Linkset'; ... } So the initial contents of the $fz declared with "my" is lost, because "our" creates a lexical alias for the global $fz, thus overwriting the previous "my" declaration. It was my error, no question. But I wonder why Perl doesn't mention this - even with "use s...

"or" and "and"
Hi, I'm just getting to discover ruby, but I find it very nice programming language. I just still don't understand how the "or" and "and" in ruby... I was playing with ruby and for example made a def to print Stem and Leaf plot (for those who didn't have a statistics course or slept on it, e.g. http://cnx.org/content/m10157/latest/) Here is the Beta version of it: class Array def n ; self.size ; end def stem_and_leaf(st = 1) # if st != (2 or 5 or 10) then ; st = 1 ; end k = Hash.new(0) self.each {|x| k[x.to_f] += 1 } k = k.sort{|a, b| a[0].to_f <=&g...

Web resources about - error "copyplist failed with exit code 127" - comp.lang.ruby

Resources last updated: 1/24/2016 9:19:29 AM