Skip to content


Subversion checkout URL

You can clone with
Download ZIP


build error (x64 linux and 1.8.7) #37

knewter opened this Issue · 8 comments

3 participants


I've got johnson on multiple machines, but my home machine is giving me trouble. Error is below, with -V output.

(ok, not big enough to hold it all it seems)

$ gem install johnson --version=2.0.0.pre3 -V

Building native extensions. This could take a while...
ERROR: Error installing johnson:
ERROR: Failed to build gem native extension.

/home/jadams/.rvm/rubies/ruby-1.8.7-p302/bin/ruby extconf.rb
checking for jsautocfg.h in /home/jadams/.rvm/gems/ruby-1.8.7-p302@insight_phase2/gems/johnson-2.0.0.pre3/vendor/tracemonkey... yes
checking for jsapi.h in /home/jadams/.rvm/gems/ruby-1.8.7-p302@insight_phase2/gems/johnson-2.0.0.pre3/vendor/tracemonkey... yes
creating Makefile

g++ -I. -I/home/jadams/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/x86_64-linux -I/home/jadams/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/x86_64-linux -I. -fPIC -g -O2 -fPIC -g -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -DXP_UNIX -c warning: extra tokens at end of #endif directive In function ‘VALUE global(VALUE)’: warning: unused variable ‘context’ In function ‘VALUE initialize_native(VALUE, VALUE, VALUE)’: warning: conversion to ‘uint32’ from ‘size_t’ may alter its value
g++ -I. -I/home/jadams/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/x86_64-linux -I/home/jadams/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/x86_64-linux -I. -fPIC -g -O2 -fPIC -g -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -DXP_UNIX -c
g++ -I. -I/home/jadams/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/x86_64-linux -I/home/jadams/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/x86_64-linux -I. -fPIC -g -O2 -fPIC -g -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -DXP_UNIX -c In function ‘JSBool split_delProperty(JSContext, JSObject, jsval, jsval)’: error: ‘struct JSObject’ has no member named ‘deleteProperty’ At global scope: warning: unused parameter ‘id’ In function ‘JSBool split_resolve(JSContext
, JSObject, jsval, uintN, JSObject)’: error: ‘struct JSObject’ has no member named ‘lookupProperty’ error: ‘struct JSObject’ has no member named ‘dropProperty’ In function ‘void split_finalize(JSContext
, JSObject)’: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 3 has type ‘JSObject In function ‘uint32 split_mark(JSContext, JSObject, void)’: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 3 has type ‘JSObject At global scope: warning: unused parameter ‘cx’ warning: unused parameter ‘clasp’ In function ‘JSObject* split_create_outer(JSContext)’: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 3 has type ‘JSObject In function ‘JSObject* split_create_inner(JSContext, JSObject)’: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 3 has type ‘JSObject warning: format ‘%08x’ expects type ‘unsigned int’, but argument 4 has type ‘JSObject

make: *** [js.o] Error 1

Gem files will remain installed in /home/jadams/.rvm/gems/ruby-1.8.7-p302@insight_phase2/gems/johnson-2.0.0.pre3 for inspection.
Results logged to /home/jadams/.rvm/gems/ruby-1.8.7-p302@insight_phase2/gems/johnson-2.0.0.pre3/ext/tracemonkey/gem_make.out


Hmmm. The arguments to g++ for don't look quite right. It looks like the -I for tracemonkey is wrong. It maybe that something went wrong with the configure step and the install isn't rerunning it (I don't see it in the build output). Not sure if rubygems keeps files between installs.

One sanity check would be to check out the git repo (the unstable branch) and just do a rake at the top level, which should do a build and run the tests.


failed differently this time...

(last time I tried to paste output it truncated, not sure why)


You're on the master branch. You need to be on the unstable branch: "git co -b unstable origin/unstable"


oh garr, duh, etc. doing it.

right then, this time the error looks the same


It's not getting the includes right, but I have no idea why. The line in the output that say "checking for jsautocfg.h in /home/jadams/software/johnson/vendor/tracemonkey... yes" is where its checking whether it should add vendor/tracemonkey to the INCFLAGS but even though the result is yes, it doesn't seem to be doing it. You don't have INCFLAGS set in your environment, do you? (Not that this is the result I'd expect).

The other thing I noted when you were on the other branch is that you have a copy of spidermonkey installed. That's where it's getting the headers even though it's not putting the flag in there. The version you have installed is too old (Johnson is only tested with the copy it includes). But I don't see why having a version installed would cause this issue.

If I could replicate it, I could start hacking mkmf.rb and see what it was doing, but I can't replicate it on my linux box.


I can give you a login :)


Thanks to everyone on the johnson team. I'm also looking forward to johnson working in ruby 1.9 what needs to be done?


Johnson's pretty dormant at this point. The integration between Spidermonkey and Ruby has always been tricky and doesn't pass the tests (last time I tried) for either 1.8.7 or 1.9.2. Generally the problem is either something in the garbage collector or in the way the stack is handled (at least in 1.8 where Ruby does a lot of long jumps).

There's no real cookbook for jumping in and contributing. I think the approach I took back in the day was to run the tests under gdb and see where they crashed and try to work back from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.