capp gen doesn't run

18 views
Skip to first unread message

Michael Terry

unread,
Dec 6, 2009, 10:05:57 PM12/6/09
to objec...@googlegroups.com
Can anyone give any advice on how I can get rid of the following error when building the jake branch? I've been trying to get it working all weekend and it's been one error after another. I thought I was finally home free, only to get this:

-bash-3.2$ capp gen test
TypeError: Cannot find function shift in object gen.
org.mozilla.javascript.EcmaError: TypeError: Cannot find function shift in object gen. (/usr/local/capp/Release/CommonJS/cappuccino/lib/capp/main.j#2)
        at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3659)
        at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3637)
        at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3665)
        at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3684)
        at org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:3748)
        at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2248)
        at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2215)
        at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1501)
        at script(/usr/local/capp/Release/CommonJS/cappuccino/lib/capp/main.j:2)
        at script(/usr/local/narwhal/packages/objective-j/lib/objective-j.js:137)
        at script(Objective-J.js:2439)
        at script(Objective-J.js:2447)
        at script(/usr/local/narwhal/packages/browserjs/lib/browser/timeout.js:103)
        at script(/usr/local/narwhal/packages/objective-j/lib/objective-j.js:161)
        at script(/usr/local/capp/Release/CommonJS/cappuccino/bin/capp:15)
        at script(/usr/local/narwhal/lib/sandbox.js:250)
        at script(narwhal.js:204)
        at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:845)
        at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
        at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
        at org.mozilla.javascript.gen._usr_local_narwhal_engines_rhino_bootstrap_js_1._c_anonymous_1(Unknown Source)
        at org.mozilla.javascript.gen._usr_local_narwhal_engines_rhino_bootstrap_js_1.call(Unknown Source)
        at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
        at org.mozilla.javascript.gen._usr_local_narwhal_engines_rhino_bootstrap_js_1._c_script_0(Unknown Source)
        at org.mozilla.javascript.gen._usr_local_narwhal_engines_rhino_bootstrap_js_1.call(Unknown Source)
        at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:405)
        at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3066)
        at org.mozilla.javascript.gen._usr_local_narwhal_engines_rhino_bootstrap_js_1.call(Unknown Source)
        at org.mozilla.javascript.gen._usr_local_narwhal_engines_rhino_bootstrap_js_1.exec(Unknown Source)
        at org.mozilla.javascript.tools.shell.Main.evaluateScript(Main.java:563)
        at org.mozilla.javascript.tools.shell.Main.processFileSecure(Main.java:485)
        at org.mozilla.javascript.tools.shell.Main.processFile(Main.java:451)
        at org.mozilla.javascript.tools.shell.Main.processSource(Main.java:443)
        at org.mozilla.javascript.tools.shell.Main.processFiles(Main.java:196)
        at org.mozilla.javascript.tools.shell.Main$IProxy.run(Main.java:117)
        at org.mozilla.javascript.Context.call(Context.java:517)
        at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:514)
        at org.mozilla.javascript.tools.shell.Main.exec(Main.java:179)
        at org.mozilla.javascript.tools.shell.Main.main(Main.java:157)

Tom Robinson

unread,
Dec 7, 2009, 8:17:56 PM12/7/09
to objec...@googlegroups.com
I believe there's a problem with the build system not updating certain
parts of the build. Try trashing your $CAPP_BUILD directory any
rebuilding/installing. Let me know if that works.

-tom


--
tlrobinson{.net,@gmail.com, on twitter}
> --
>
> You received this message because you are subscribed to the Google
> Groups "Cappuccino & Objective-J" group.
> To post to this group, send email to objec...@googlegroups.com.
> To unsubscribe from this group, send email to objectivej+...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/objectivej?hl=en
> .

Ryan Jafari

unread,
Dec 7, 2009, 11:25:23 PM12/7/09
to Cappuccino & Objective-J
Yeah, seems that a couple of people in this group are having some
trouble getting their build to refresh. Recently I had a problem where
I couldn't get my jake build to update. I ended up trying a bunch of
different things including what Tom suggested above and was able to
get it going eventually.

- R

Michael Terry

unread,
Dec 13, 2009, 2:36:09 AM12/13/09
to objec...@googlegroups.com
I'm afraid trashing and rebuilding didn't work. Actually, I installed on another fresh copy of CentOS 5.3 and got the same error.

Francisco Tolmasky

unread,
Dec 14, 2009, 2:23:01 AM12/14/09
to Cappuccino & Objective-J
Could you run the js shell in CentOs and see what
Array.prototype.shift prints out? (On Mac OS X I get "function shift()
{ [native code for Array.shift, arity=1] }" )
> > objectivej+...@googlegroups.com<objectivej%2Bunsubscribe@googlegrou ps.com>
> > > .
> > > For more options, visit this group at
> >http://groups.google.com/group/objectivej?hl=en
> > > .
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "Cappuccino & Objective-J" group.
> > To post to this group, send email to objec...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > objectivej+...@googlegroups.com<objectivej%2Bunsubscribe@googlegrou ps.com>

Michaël Villar

unread,
Dec 14, 2009, 4:13:40 PM12/14/09
to Cappuccino & Objective-J
I have the same problem than Michael Terry.

I'm on Mac OS X, the Array.prototype.shift prints the same thing :
Rhino 1.7 release 3 PRERELEASE 2009 04 05
ajs> Array.prototype.shift
function shift() { [native code for Array.shift, arity=1] }


Even capp make the error :
michaelvillar-macbookpro:~ michael$ capp
TypeError: Cannot call method "shift" of undefined
org.mozilla.javascript.EcmaError: TypeError: Cannot call method
"shift" of undefined (/Users/michael/Capp-src/Build/Release/CommonJS/
cappuccino/lib/capp/main.j#2)
at org.mozilla.javascript.ScriptRuntime.constructError
(ScriptRuntime.java:3659)
at org.mozilla.javascript.ScriptRuntime.constructError
(ScriptRuntime.java:3637)
at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:
3665)
at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:
3684)
at org.mozilla.javascript.ScriptRuntime.undefCallError
(ScriptRuntime.java:3703)
at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper
(ScriptRuntime.java:2222)
at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis
(ScriptRuntime.java:2215)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:
1501)
at script(/Users/michael/Capp-src/Build/Release/CommonJS/cappuccino/
lib/capp/main.j:2)
at script(/Users/michael/narwhal/packages/objective-j/lib/objective-
j.js:137)
at script(Objective-J.js:2439)
at script(Objective-J.js:2447)
at script(/Users/michael/narwhal/packages/browserjs/lib/browser/
timeout.js:103)
at script(/Users/michael/narwhal/packages/objective-j/lib/objective-
j.js:161)
at script(/Users/michael/Capp-src/Build/Release/CommonJS/cappuccino/
bin/capp:15)
at script(/Users/michael/narwhal/lib/sandbox.js:250)
at script(narwhal.js:204)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:845)
at org.mozilla.javascript.InterpretedFunction.call
(InterpretedFunction.java:164)
at org.mozilla.javascript.optimizer.OptRuntime.callName
(OptRuntime.java:97)
at
org.mozilla.javascript.gen._Users_michael_narwhal_engines_rhino_bootstrap_js_1._c_anonymous_1
(Unknown Source)
at
org.mozilla.javascript.gen._Users_michael_narwhal_engines_rhino_bootstrap_js_1.call
(Unknown Source)
at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:
76)
at
org.mozilla.javascript.gen._Users_michael_narwhal_engines_rhino_bootstrap_js_1._c_script_0
(Unknown Source)
at
org.mozilla.javascript.gen._Users_michael_narwhal_engines_rhino_bootstrap_js_1.call
(Unknown Source)
at org.mozilla.javascript.ContextFactory.doTopCall
(ContextFactory.java:405)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:
3066)
at
org.mozilla.javascript.gen._Users_michael_narwhal_engines_rhino_bootstrap_js_1.call
(Unknown Source)
at
org.mozilla.javascript.gen._Users_michael_narwhal_engines_rhino_bootstrap_js_1.exec
(Unknown Source)
at org.mozilla.javascript.tools.shell.Main.evaluateScript(Main.java:
563)
at org.mozilla.javascript.tools.shell.Main.processFileSecure
(Main.java:485)
at org.mozilla.javascript.tools.shell.Main.processFile(Main.java:451)
at org.mozilla.javascript.tools.shell.Main.processSource(Main.java:
443)
at org.mozilla.javascript.tools.shell.Main.processFiles(Main.java:
196)
at org.mozilla.javascript.tools.shell.Main$IProxy.run(Main.java:117)
at org.mozilla.javascript.Context.call(Context.java:517)
at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:
514)
at org.mozilla.javascript.tools.shell.Main.exec(Main.java:179)
at org.mozilla.javascript.tools.shell.Main.main(Main.java:157)


Tom Robinson

unread,
Dec 14, 2009, 6:04:07 PM12/14/09
to objec...@googlegroups.com
You both seem to be using Rhino. Is that correct?

Is anyone using Rhino not having this problem?
> (Unknown Source)
> at
> org
> .mozilla
> .javascript
> .gen._Users_michael_narwhal_engines_rhino_bootstrap_js_1.call
> (Unknown Source)
> at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:
> 76)
> at
> org
> .mozilla
> .javascript
> .gen._Users_michael_narwhal_engines_rhino_bootstrap_js_1._c_script_0
> (Unknown Source)
> at
> org
> .mozilla
> .javascript
> .gen._Users_michael_narwhal_engines_rhino_bootstrap_js_1.call
> (Unknown Source)
> at org.mozilla.javascript.ContextFactory.doTopCall
> (ContextFactory.java:405)
> at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:
> 3066)
> at
> org
> .mozilla
> .javascript
> .gen._Users_michael_narwhal_engines_rhino_bootstrap_js_1.call
> (Unknown Source)
> at
> org
> .mozilla
> .javascript
>>>>> 3637)
>>>>> at
>>>>> org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:
>>>>> 3665)
>>>>> at
>>>>> org
>>>>> .mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:
>>>>> org
>>>>> .mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:
>>>>> 405)
>>>>> at
>>>>> org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:
>>>>> 3066)
>>>>> at
>>>>> org
>>>>> .mozilla
>>>>> .javascript
>>>>> .gen._usr_local_narwhal_engines_rhino_bootstrap_js_1.call(Unknown
>>>>> Source)
>>>>> at
>>>>> org
>>>>> .mozilla
>>>>> .javascript
>>>>> .gen._usr_local_narwhal_engines_rhino_bootstrap_js_1.exec(Unknown
>>>>> Source)
>>>>> at
>>>>> org.mozilla.javascript.tools.shell.Main.evaluateScript(Main.java:
>>>>> 563)
>>>>> at
>>>>> org
>>>>> .mozilla.javascript.tools.shell.Main.processFileSecure(Main.java:
>>>>> 485)
>>>>> at

Michael Terry

unread,
Dec 14, 2009, 6:15:03 PM12/14/09
to objec...@googlegroups.com
Using Rhino, yes. Forgot about V8, I'll have to try that tonight.

To unsubscribe from this group, send email to objectivej+...@googlegroups.com.

Michael Terry

unread,
Dec 14, 2009, 6:16:09 PM12/14/09
to objec...@googlegroups.com
Er, JavascriptCore.

Tom Robinson

unread,
Dec 15, 2009, 9:12:38 PM12/15/09
to objec...@googlegroups.com
Both *should* work on OS X. JSC won't work on Linux. But if you have
an OS X box try JSC on it.

Also, can you make absolutely sure you're starting from a clean system
(no narwhal or cappuccino installed)

rm -rf /usr/local/narwhal /usr/local/share/narwhal /usr/local/share/
objj $CAPP_BUILD

After doing that check to make sure there's no "narwhal" or "objj"
executables.

And make sure you're using the latest version of the jake branch.

Thanks. Sorry it's being so much trouble.

-tom

--
tlrobinson{.net,@gmail.com, on twitter}

> > at org.mozilla.javascript.tools.shell.Main
> $IProxy.run(Main.java:117)
> > at org.mozilla.javascript.Context.call(Context.java:517)
> > at
> org.mozilla.javascript.ContextFactory.call(ContextFactory.java:
> > 514)
> > at org.mozilla.javascript.tools.shell.Main.exec(Main.java:179)
> > at org.mozilla.javascript.tools.shell.Main.main(Main.java:157)
> >
> >

Michaël Villar

unread,
Dec 16, 2009, 3:39:35 PM12/16/09
to Cappuccino & Objective-J
Thanks. This worked for me.

Sorry, I was doing it wrong apparently :)

On 16 déc, 03:12, Tom Robinson <tlrobin...@gmail.com> wrote:
> Both *should* work on OS X. JSC won't work on Linux. But if you have  
> an OS X box try JSC on it.
>
> Also, can you make absolutely sure you're starting from a clean system  
> (no narwhal or cappuccino installed)
>
>         rm -rf /usr/local/narwhal /usr/local/share/narwhal /usr/local/share/
> objj $CAPP_BUILD
>
> After doing that check to make sure there's no "narwhal" or "objj"  
> executables.
>
> And make sure you're using the latest version of the jake branch.
>
> Thanks. Sorry it's being so much trouble.
>
> -tom
>
> --
> tlrobinson{.net,@gmail.com, on twitter}
>
> On Dec 14, 2009, at 3:15 PM, Michael Terry wrote:
>
>
>
> > Using Rhino, yes. Forgot about V8, I'll have to try that tonight.
>
> > On Mon, Dec 14, 2009 at 3:04 PM, Tom Robinson <tlrobin...@gmail.com>  
> ...
>
> plus de détails »
Reply all
Reply to author
Forward
0 new messages