[jira] Commented: (COUCHDB-288) couch_js.c:1217: error: 'JSOPTION_NATIVE_BRANCH_CALLBACK' with spidermonkey tip
[ https://issues.apache.org/jira/browse/COUCHDB-288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738125#action_12738125 ] Jan Lehnardt commented on COUCHDB-288: -- This patch makes the failing test case pass. Thanks to Paul Davis again: Index: share/www/script/test/show_documents.js === --- share/www/script/test/show_documents.js (revision 799860) +++ share/www/script/test/show_documents.js (working copy) @@ -112,7 +112,7 @@ // Becase Safari can't stand to see that dastardly // E4X outside of a string. Outside of tests you // can just use E4X literals. -this.eval('xml.no...@foo = doc.word'); +eval('xml.no...@foo = doc.word'); return { body: xml }; > couch_js.c:1217: error: 'JSOPTION_NATIVE_BRANCH_CALLBACK' with spidermonkey > tip > --- > > Key: COUCHDB-288 > URL: https://issues.apache.org/jira/browse/COUCHDB-288 > Project: CouchDB > Issue Type: Bug > Components: Build System > Environment: linux-x86 latest erlang/otp spidermonkey from > http://hg.mozilla.org/mozilla-central/ >Reporter: Richard Brown >Priority: Blocker > Fix For: 0.10 > > Attachments: couchdb_spidermonkey_tip-1.diff > > > libtool: link: ( cd ".libs" && rm -f "couch_erl_driver.la" && ln -s > "../couch_erl_driver.la" "couch_erl_driver.la" ) > i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -D_XOPEN_SOURCE > -L/usr/local/lib -L/opt/local/lib -I/usr/lib/erlang/usr/include > -I/usr/lib/erlang/usr/include -I/usr/local/lib/erlang/usr/include > -I/opt/local/lib/erlang/usr/include -I/usr/include -I/usr/include/js > -I/usr/include/mozjs -I/usr/local/include -I/opt/local/include > -I/usr/local/include/js -I/opt/local/include/js -DXP_UNIX-DMUDKIPZ > -march=native -pipe -O2 -MT couchjs-couch_js.o -MD -MP -MF > .deps/couchjs-couch_js.Tpo -c -o couchjs-couch_js.o `test -f 'couch_js.c' || > echo './'`couch_js.c > couch_js.c: In function 'main': > couch_js.c:1217: error: 'JSOPTION_NATIVE_BRANCH_CALLBACK' undeclared (first > use in this function) > couch_js.c:1217: error: (Each undeclared identifier is reported only once > couch_js.c:1217: error: for each function it appears in.) > make[2]: Leaving directory > `/var/tmp/paludis/build/dev-db-couchdb-scm/work/couchdb-scm/src/couchdb' > make[2]: *** [couchjs-couch_js.o] Error 1 > make[1]: Leaving directory > `/var/tmp/paludis/build/dev-db-couchdb-scm/work/couchdb-scm' > make[1]: *** [all-recursive] Error 1 > make: *** [all] Error 2 > Patching with > Index: src/couchdb/couch_js.c > === > --- src/couchdb/couch_js.c(revision 752552) > +++ src/couchdb/couch_js.c(working copy) > @@ -1213,8 +1213,8 @@ > if (!context) > return 1; > JS_SetErrorReporter(context, PrintError); > -JS_SetBranchCallback(context, BranchCallback); > -JS_ToggleOptions(context, JSOPTION_NATIVE_BRANCH_CALLBACK); > +//JS_SetBranchCallback(context, BranchCallback); > +//JS_ToggleOptions(context, JSOPTION_NATIVE_BRANCH_CALLBACK); > JS_ToggleOptions(context, JSOPTION_XML); > > global = JS_NewObject(context, NULL, NULL, NULL); > compiles and "works" in so far as I can talk to futon > I think it might me related to > http://markmail.org/search/?q=JS_SetBranchCallback#query:JS_SetBranchCallback%20list%3Aorg.apache.couchdb.commits+page:1+mid:kgc3bx6rclmlpkvb+state:results -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-288) couch_js.c:1217: error: 'JSOPTION_NATIVE_BRANCH_CALLBACK' with spidermonkey tip
[ https://issues.apache.org/jira/browse/COUCHDB-288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738123#action_12738123 ] Jan Lehnardt commented on COUCHDB-288: -- Thanks to Paul Davis, I could now apply the patch correctly. The issue seems to be that the #if JS_VERSION <= 170 doesn't get picked up correctly. When I comment out the if branch and only keep the else, the patch works. I see all tests passing but the show_documents one. > couch_js.c:1217: error: 'JSOPTION_NATIVE_BRANCH_CALLBACK' with spidermonkey > tip > --- > > Key: COUCHDB-288 > URL: https://issues.apache.org/jira/browse/COUCHDB-288 > Project: CouchDB > Issue Type: Bug > Components: Build System > Environment: linux-x86 latest erlang/otp spidermonkey from > http://hg.mozilla.org/mozilla-central/ >Reporter: Richard Brown >Priority: Blocker > Fix For: 0.10 > > Attachments: couchdb_spidermonkey_tip-1.diff > > > libtool: link: ( cd ".libs" && rm -f "couch_erl_driver.la" && ln -s > "../couch_erl_driver.la" "couch_erl_driver.la" ) > i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -D_XOPEN_SOURCE > -L/usr/local/lib -L/opt/local/lib -I/usr/lib/erlang/usr/include > -I/usr/lib/erlang/usr/include -I/usr/local/lib/erlang/usr/include > -I/opt/local/lib/erlang/usr/include -I/usr/include -I/usr/include/js > -I/usr/include/mozjs -I/usr/local/include -I/opt/local/include > -I/usr/local/include/js -I/opt/local/include/js -DXP_UNIX-DMUDKIPZ > -march=native -pipe -O2 -MT couchjs-couch_js.o -MD -MP -MF > .deps/couchjs-couch_js.Tpo -c -o couchjs-couch_js.o `test -f 'couch_js.c' || > echo './'`couch_js.c > couch_js.c: In function 'main': > couch_js.c:1217: error: 'JSOPTION_NATIVE_BRANCH_CALLBACK' undeclared (first > use in this function) > couch_js.c:1217: error: (Each undeclared identifier is reported only once > couch_js.c:1217: error: for each function it appears in.) > make[2]: Leaving directory > `/var/tmp/paludis/build/dev-db-couchdb-scm/work/couchdb-scm/src/couchdb' > make[2]: *** [couchjs-couch_js.o] Error 1 > make[1]: Leaving directory > `/var/tmp/paludis/build/dev-db-couchdb-scm/work/couchdb-scm' > make[1]: *** [all-recursive] Error 1 > make: *** [all] Error 2 > Patching with > Index: src/couchdb/couch_js.c > === > --- src/couchdb/couch_js.c(revision 752552) > +++ src/couchdb/couch_js.c(working copy) > @@ -1213,8 +1213,8 @@ > if (!context) > return 1; > JS_SetErrorReporter(context, PrintError); > -JS_SetBranchCallback(context, BranchCallback); > -JS_ToggleOptions(context, JSOPTION_NATIVE_BRANCH_CALLBACK); > +//JS_SetBranchCallback(context, BranchCallback); > +//JS_ToggleOptions(context, JSOPTION_NATIVE_BRANCH_CALLBACK); > JS_ToggleOptions(context, JSOPTION_XML); > > global = JS_NewObject(context, NULL, NULL, NULL); > compiles and "works" in so far as I can talk to futon > I think it might me related to > http://markmail.org/search/?q=JS_SetBranchCallback#query:JS_SetBranchCallback%20list%3Aorg.apache.couchdb.commits+page:1+mid:kgc3bx6rclmlpkvb+state:results -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-288) couch_js.c:1217: error: 'JSOPTION_NATIVE_BRANCH_CALLBACK' with spidermonkey tip
[ https://issues.apache.org/jira/browse/COUCHDB-288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738116#action_12738116 ] Jan Lehnardt commented on COUCHDB-288: -- The latest patch fails for me during make: /bin/sh ../../libtool --tag=CC --mode=link ccache gcc -g -O2 -L/tmp/lib/ -L/usr/local/lib -L/opt/local/lib -I/usr/local/lib/erlang/usr/include -I/usr/lib/erlang/usr/include -I/usr/local/lib/erlang/usr/include -I/opt/local/lib/erlang/usr/include -I/tmp/include/ -DXP_UNIX -lm -o couchjs couchjs-couch_js.o couchjs-curlhelper.o -lcurl -lmozjs -L/tmp/lib/ -L/usr/local/lib -L/opt/local/lib -lpthread ccache gcc -g -O2 -I/usr/local/lib/erlang/usr/include -I/usr/lib/erlang/usr/include -I/usr/local/lib/erlang/usr/include -I/opt/local/lib/erlang/usr/include -I/tmp/include/ -DXP_UNIX -o couchjs couchjs-couch_js.o couchjs-curlhelper.o -L/tmp/lib/ -L/usr/local/lib -L/opt/local/lib -lm -lcurl -lmozjs -lpthread Undefined symbols: "_JS_SetBranchCallback", referenced from: _main in couchjs-couch_js.o ld: symbol(s) not found collect2: ld returned 1 exit status make[3]: *** [couchjs] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 > couch_js.c:1217: error: 'JSOPTION_NATIVE_BRANCH_CALLBACK' with spidermonkey > tip > --- > > Key: COUCHDB-288 > URL: https://issues.apache.org/jira/browse/COUCHDB-288 > Project: CouchDB > Issue Type: Bug > Components: Build System > Environment: linux-x86 latest erlang/otp spidermonkey from > http://hg.mozilla.org/mozilla-central/ >Reporter: Richard Brown >Priority: Blocker > Fix For: 0.10 > > Attachments: couchdb_spidermonkey_tip-1.diff > > > libtool: link: ( cd ".libs" && rm -f "couch_erl_driver.la" && ln -s > "../couch_erl_driver.la" "couch_erl_driver.la" ) > i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -D_XOPEN_SOURCE > -L/usr/local/lib -L/opt/local/lib -I/usr/lib/erlang/usr/include > -I/usr/lib/erlang/usr/include -I/usr/local/lib/erlang/usr/include > -I/opt/local/lib/erlang/usr/include -I/usr/include -I/usr/include/js > -I/usr/include/mozjs -I/usr/local/include -I/opt/local/include > -I/usr/local/include/js -I/opt/local/include/js -DXP_UNIX-DMUDKIPZ > -march=native -pipe -O2 -MT couchjs-couch_js.o -MD -MP -MF > .deps/couchjs-couch_js.Tpo -c -o couchjs-couch_js.o `test -f 'couch_js.c' || > echo './'`couch_js.c > couch_js.c: In function 'main': > couch_js.c:1217: error: 'JSOPTION_NATIVE_BRANCH_CALLBACK' undeclared (first > use in this function) > couch_js.c:1217: error: (Each undeclared identifier is reported only once > couch_js.c:1217: error: for each function it appears in.) > make[2]: Leaving directory > `/var/tmp/paludis/build/dev-db-couchdb-scm/work/couchdb-scm/src/couchdb' > make[2]: *** [couchjs-couch_js.o] Error 1 > make[1]: Leaving directory > `/var/tmp/paludis/build/dev-db-couchdb-scm/work/couchdb-scm' > make[1]: *** [all-recursive] Error 1 > make: *** [all] Error 2 > Patching with > Index: src/couchdb/couch_js.c > === > --- src/couchdb/couch_js.c(revision 752552) > +++ src/couchdb/couch_js.c(working copy) > @@ -1213,8 +1213,8 @@ > if (!context) > return 1; > JS_SetErrorReporter(context, PrintError); > -JS_SetBranchCallback(context, BranchCallback); > -JS_ToggleOptions(context, JSOPTION_NATIVE_BRANCH_CALLBACK); > +//JS_SetBranchCallback(context, BranchCallback); > +//JS_ToggleOptions(context, JSOPTION_NATIVE_BRANCH_CALLBACK); > JS_ToggleOptions(context, JSOPTION_XML); > > global = JS_NewObject(context, NULL, NULL, NULL); > compiles and "works" in so far as I can talk to futon > I think it might me related to > http://markmail.org/search/?q=JS_SetBranchCallback#query:JS_SetBranchCallback%20list%3Aorg.apache.couchdb.commits+page:1+mid:kgc3bx6rclmlpkvb+state:results -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-288) couch_js.c:1217: error: 'JSOPTION_NATIVE_BRANCH_CALLBACK' with spidermonkey tip
[ https://issues.apache.org/jira/browse/COUCHDB-288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736016#action_12736016 ] Stuart Langridge commented on COUCHDB-288: -- Using spidermonkey from Ubuntu karmic and xulrunner 1.9.1 and Firefox 3.5, this patch fixes the "Expression does not evaluate to a function" issue, and all tests but one pass: show_documents failure 360ms 1. Run with debuggerAssertion failed: xhr.getResponseHeader("Content-Type") == "application/xml" 2. Assertion failed: xhr.responseText.match(/plankton/) > couch_js.c:1217: error: 'JSOPTION_NATIVE_BRANCH_CALLBACK' with spidermonkey > tip > --- > > Key: COUCHDB-288 > URL: https://issues.apache.org/jira/browse/COUCHDB-288 > Project: CouchDB > Issue Type: Bug > Components: Build System > Environment: linux-x86 latest erlang/otp spidermonkey from > http://hg.mozilla.org/mozilla-central/ >Reporter: Richard Brown > Attachments: couchdb_spidermonkey_tip.diff > > > libtool: link: ( cd ".libs" && rm -f "couch_erl_driver.la" && ln -s > "../couch_erl_driver.la" "couch_erl_driver.la" ) > i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -D_XOPEN_SOURCE > -L/usr/local/lib -L/opt/local/lib -I/usr/lib/erlang/usr/include > -I/usr/lib/erlang/usr/include -I/usr/local/lib/erlang/usr/include > -I/opt/local/lib/erlang/usr/include -I/usr/include -I/usr/include/js > -I/usr/include/mozjs -I/usr/local/include -I/opt/local/include > -I/usr/local/include/js -I/opt/local/include/js -DXP_UNIX-DMUDKIPZ > -march=native -pipe -O2 -MT couchjs-couch_js.o -MD -MP -MF > .deps/couchjs-couch_js.Tpo -c -o couchjs-couch_js.o `test -f 'couch_js.c' || > echo './'`couch_js.c > couch_js.c: In function 'main': > couch_js.c:1217: error: 'JSOPTION_NATIVE_BRANCH_CALLBACK' undeclared (first > use in this function) > couch_js.c:1217: error: (Each undeclared identifier is reported only once > couch_js.c:1217: error: for each function it appears in.) > make[2]: Leaving directory > `/var/tmp/paludis/build/dev-db-couchdb-scm/work/couchdb-scm/src/couchdb' > make[2]: *** [couchjs-couch_js.o] Error 1 > make[1]: Leaving directory > `/var/tmp/paludis/build/dev-db-couchdb-scm/work/couchdb-scm' > make[1]: *** [all-recursive] Error 1 > make: *** [all] Error 2 > Patching with > Index: src/couchdb/couch_js.c > === > --- src/couchdb/couch_js.c(revision 752552) > +++ src/couchdb/couch_js.c(working copy) > @@ -1213,8 +1213,8 @@ > if (!context) > return 1; > JS_SetErrorReporter(context, PrintError); > -JS_SetBranchCallback(context, BranchCallback); > -JS_ToggleOptions(context, JSOPTION_NATIVE_BRANCH_CALLBACK); > +//JS_SetBranchCallback(context, BranchCallback); > +//JS_ToggleOptions(context, JSOPTION_NATIVE_BRANCH_CALLBACK); > JS_ToggleOptions(context, JSOPTION_XML); > > global = JS_NewObject(context, NULL, NULL, NULL); > compiles and "works" in so far as I can talk to futon > I think it might me related to > http://markmail.org/search/?q=JS_SetBranchCallback#query:JS_SetBranchCallback%20list%3Aorg.apache.couchdb.commits+page:1+mid:kgc3bx6rclmlpkvb+state:results -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (COUCHDB-288) couch_js.c:1217: error: 'JSOPTION_NATIVE_BRANCH_CALLBACK' with spidermonkey tip
[ https://issues.apache.org/jira/browse/COUCHDB-288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12681063#action_12681063 ] Paul Joseph Davis commented on COUCHDB-288: --- Applying that patch wouldn't break anything in CouchDB directly as its only running garbage collection every 16K branches. I don't have any feeling for how much RAM the JS VM uses in normal operation so while its possible that things blow up without it, I tend to think it wouldn't. Though it may have been added specifically because couchjs did suck up a lot of RAM between the other various calls to the garbage collector. Anyone know if BranchCallback was added from necessity? If not, I'd be inclined to remove it and then add a few more calls to gc() in main.js as well as change the garbage collector call in couch_js.c JS_GC() to JS_MaybeGC(). > couch_js.c:1217: error: 'JSOPTION_NATIVE_BRANCH_CALLBACK' with spidermonkey > tip > --- > > Key: COUCHDB-288 > URL: https://issues.apache.org/jira/browse/COUCHDB-288 > Project: CouchDB > Issue Type: Bug > Components: Build System > Environment: linux-x86 latest erlang/otp spidermonkey from > http://hg.mozilla.org/mozilla-central/ >Reporter: Richard Brown > > libtool: link: ( cd ".libs" && rm -f "couch_erl_driver.la" && ln -s > "../couch_erl_driver.la" "couch_erl_driver.la" ) > i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -D_XOPEN_SOURCE > -L/usr/local/lib -L/opt/local/lib -I/usr/lib/erlang/usr/include > -I/usr/lib/erlang/usr/include -I/usr/local/lib/erlang/usr/include > -I/opt/local/lib/erlang/usr/include -I/usr/include -I/usr/include/js > -I/usr/include/mozjs -I/usr/local/include -I/opt/local/include > -I/usr/local/include/js -I/opt/local/include/js -DXP_UNIX-DMUDKIPZ > -march=native -pipe -O2 -MT couchjs-couch_js.o -MD -MP -MF > .deps/couchjs-couch_js.Tpo -c -o couchjs-couch_js.o `test -f 'couch_js.c' || > echo './'`couch_js.c > couch_js.c: In function 'main': > couch_js.c:1217: error: 'JSOPTION_NATIVE_BRANCH_CALLBACK' undeclared (first > use in this function) > couch_js.c:1217: error: (Each undeclared identifier is reported only once > couch_js.c:1217: error: for each function it appears in.) > make[2]: Leaving directory > `/var/tmp/paludis/build/dev-db-couchdb-scm/work/couchdb-scm/src/couchdb' > make[2]: *** [couchjs-couch_js.o] Error 1 > make[1]: Leaving directory > `/var/tmp/paludis/build/dev-db-couchdb-scm/work/couchdb-scm' > make[1]: *** [all-recursive] Error 1 > make: *** [all] Error 2 > Patching with > Index: src/couchdb/couch_js.c > === > --- src/couchdb/couch_js.c(revision 752552) > +++ src/couchdb/couch_js.c(working copy) > @@ -1213,8 +1213,8 @@ > if (!context) > return 1; > JS_SetErrorReporter(context, PrintError); > -JS_SetBranchCallback(context, BranchCallback); > -JS_ToggleOptions(context, JSOPTION_NATIVE_BRANCH_CALLBACK); > +//JS_SetBranchCallback(context, BranchCallback); > +//JS_ToggleOptions(context, JSOPTION_NATIVE_BRANCH_CALLBACK); > JS_ToggleOptions(context, JSOPTION_XML); > > global = JS_NewObject(context, NULL, NULL, NULL); > compiles and "works" in so far as I can talk to futon > I think it might me related to > http://markmail.org/search/?q=JS_SetBranchCallback#query:JS_SetBranchCallback%20list%3Aorg.apache.couchdb.commits+page:1+mid:kgc3bx6rclmlpkvb+state:results -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.