Help with building SpiderMonkey JS engine

Hi all,

I'm currently working on a project involving the
integration of the SpiderMonkey JS engine with an
Apache module I've made.

I'm using Debian sarge currently. I have installed the
package libsmjs-dev to get the JS API. Unfortunately,
whenever I try to compile even the sample code, it
gives me a whole lot of errors in the library files.
The first error it gives is

/usr/include/smjs/jstypes.h:224:6: #error "Must define
one of XP_BEOS, XP_MAC, XP_OS2, XP_WIN or XP_UNIX"

I figure this is due to the fact that I've not built
the JS engine. Does anybody know how to build the JS
engine given the packages in Debian, or even any other
method?

Thanks,
Rohan Nogueira

0
RohanNog
3/27/2006 12:00:08 PM
netscape.mozilla.jseng 1530 articles. 0 followers. Follow

4 Replies
683 Views

Similar Articles

[PageSpeed] 54
Get it on Google Play
Get it on Apple App Store

Have you tried adding -DXP_UNIX on your build line?

0
slogan621
3/28/2006 8:10:35 AM
No, I've only typed "make -f Makefile.ref". Where do I add -DXP_UNIX? I
tried "make -f Makefile.ref -DXP_UNIX" and "make -DXP_UNIX -f
Makefile.ref", but neither worked.

Do tell me what to do. I'm rather new to this.

Thanks,
Rohan Nogueira

0
RohanNog
3/28/2006 8:47:28 AM
Hi all,

Thanks for the -DXP_UNIX bit. I finally figured out that it goes like
"gcc -DXP_UNIX trysm.c". It now compiles, but it gives the following
linker errors.

/tmp/ccldtUxR.o(.text+0x18): In function `main':
: undefined reference to `JS_Init'
/tmp/ccldtUxR.o(.text+0x3d): In function `main':
: undefined reference to `JS_NewContext'
/tmp/ccldtUxR.o(.text+0x72): In function `main':
: undefined reference to `JS_NewObject'
/tmp/ccldtUxR.o(.text+0x87): In function `main':
: undefined reference to `JS_InitStandardClasses'
collect2: ld returned 1 exit status

Any ideas on how to resolve these?

Thanks,
Rohan Nogueira

0
RohanNog
3/28/2006 10:59:11 AM
Hi all,

I've figured out this too. Silly me forgot to include the option -lsmjs
(on Debian) in the build line.

Thanks for all the help,
Rohan Nogueira

0
RohanNog
4/11/2006 5:01:07 AM
Reply:

Web resources about - Help with building SpiderMonkey JS engine - netscape.mozilla.jseng

SpiderMonkey (JavaScript engine) - Wikipedia, the free encyclopedia
SpiderMonkey is the code name for the first-ever JavaScript engine , written by Brendan Eich at Netscape Communications, later released as open ...

Report: Apple to improve JavaScript in Safari, challenge SpiderMonkey
According to reports from testers, the recently-updated beta of Safari contains within it an accelerated version of Webkit's "Nitro" JavaScript ...

Mozilla: Spidermonkey ATE Apple's JavaScriptCore, THRASHED Google V8
Moz man claims the win on rivals' own benchmarks Mozilla Distinguished Engineer Robert O’Callahan reports that the Spidermonkey JavaScript engine, ...

Mozilla: Spidermonkey ATE Apple's JavaScriptCore, THRASHED Google V8
... on rivals' own benchmarks Linux and AIX Bare-Metal Recovery Webinar Mozilla Distinguished Engineer Robert O’Callahan reports that the Spidermonkey ...

Twitter
... Fake Umair Haque @ fake_umairhaque 11 Tweets 4 Following 3 Followers Fake Umair Haque @ fake_umairhaque 29 Feb @pusher @peterc You can do SpiderMonkey, ...

Scripting language - Wikipedia, the free encyclopedia
A scripting language or script language is a programming language that supports the writing of scripts , programs written for a software environment ...

Mozilla beefing up JavaScript performance with new JIT compiler
... put on browsers’ scripting engines, Mozilla is working on a new JavaScript just-in-time (JIT) compiler architecture for Firefox’s SpiderMonkey ...

Bandai.com - Ben 10 Alien Force: find Ben 10 action figure toys
Find information about Ben 10, Ben 10 Alien Force and action figure toys

Ejacs: a JavaScript interpreter for Emacs
... solution: it debug-prints lists very nicely, even detecting cycles and using the #-syntax for representing graph structures (as does SpiderMonkey/JavaScript). ...

My JSConf.US Presentation
@jashkenas was kind enough to let me join him for his JSConf.us session . Here is the slideshare link . I’ll comment on the individual slides ...

Resources last updated: 12/8/2015 8:29:58 AM