Skip to content
This repository has been archived by the owner on Aug 18, 2018. It is now read-only.

build error (x64 linux and 1.8.7) #37

Open
knewter opened this issue Nov 2, 2010 · 8 comments
Open

build error (x64 linux and 1.8.7) #37

knewter opened this issue Nov 2, 2010 · 8 comments
Labels

Comments

@knewter
Copy link

knewter commented Nov 2, 2010

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
.....

/home/jadams/.rvm/gems/ruby-1.8.7-p302@insight_phase2/gems/johnson-2.0.0.pre3/vendor/tracemonkey/xpconnect/tools/src/nsXPCToolsCompiler.cpp
/home/jadams/.rvm/gems/ruby-1.8.7-p302@insight_phase2/gems/johnson-2.0.0.pre3/vendor/tracemonkey/xpconnect/tools/src/nsXPCToolsModule.cpp
/home/jadams/.rvm/gems/ruby-1.8.7-p302@insight_phase2/gems/johnson-2.0.0.pre3/vendor/tracemonkey/xpconnect/tools/src/nsXPCToolsProfiler.cpp
/home/jadams/.rvm/gems/ruby-1.8.7-p302@insight_phase2/gems/johnson-2.0.0.pre3/vendor/tracemonkey/xpconnect/tools/src/xpctools_private.h
/home/jadams/.rvm/gems/ruby-1.8.7-p302@insight_phase2/bin/johnson
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

make
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 runtime.cc
runtime.cc:277: warning: extra tokens at end of #endif directive
runtime.cc: In function ‘VALUE global(VALUE)’:
runtime.cc:22: warning: unused variable ‘context’
runtime.cc: In function ‘VALUE initialize_native(VALUE, VALUE, VALUE)’:
runtime.cc:392: 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 idhash.cc
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 js.cc
js.cc: In function ‘JSBool split_delProperty(JSContext_, JSObject_, jsval, jsval_)’:
js.cc:183: error: ‘struct JSObject’ has no member named ‘deleteProperty’
js.cc: At global scope:
js.cc:171: warning: unused parameter ‘id’
js.cc: In function ‘JSBool split_resolve(JSContext_, JSObject_, jsval, uintN, JSObject__)’:
js.cc:252: error: ‘struct JSObject’ has no member named ‘lookupProperty’
js.cc:255: error: ‘struct JSObject’ has no member named ‘dropProperty’
js.cc: In function ‘void split_finalize(JSContext_, JSObject_)’:
js.cc:281: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 3 has type ‘JSObject_’
js.cc: In function ‘uint32 split_mark(JSContext_, JSObject_, void_)’:
js.cc:292: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 3 has type ‘JSObject_’
js.cc: At global scope:
js.cc:330: warning: unused parameter ‘cx’
js.cc:330: warning: unused parameter ‘clasp’
js.cc: In function ‘JSObject* split_create_outer(JSContext_)’:
js.cc:423: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 3 has type ‘JSObject_’
js.cc: In function ‘JSObject* split_create_inner(JSContext_, JSObject_)’:
js.cc:456: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 3 has type ‘JSObject_’
js.cc:456: 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

@smparkes
Copy link
Collaborator

smparkes commented Nov 2, 2010

Hmmm. The arguments to g++ for js.cc 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.

@knewter
Copy link
Author

knewter commented Nov 2, 2010

failed differently this time...

http://gist.github.com/660223

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

@smparkes
Copy link
Collaborator

smparkes commented Nov 2, 2010

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

@knewter
Copy link
Author

knewter commented Nov 2, 2010

oh garr, duh, etc. doing it.

right then, this time the error looks the same

http://gist.github.com/660272

@smparkes
Copy link
Collaborator

smparkes commented Nov 2, 2010

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.

@knewter
Copy link
Author

knewter commented Nov 2, 2010

I can give you a login :)

@amiel
Copy link

amiel commented Sep 22, 2011

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

@smparkes
Copy link
Collaborator

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants