Skip to content

Installation error on building native extensions on Ubuntu Jaunty #23

Open
millisami opened this Issue Feb 20, 2010 · 1 comment

2 participants

@millisami

Well I really liked the harmony.
So, to install it, the INSTALL instruction is as follows:
# There's a gem dependency bug in rubygems currently, so we'll have to
# install dependencies manually. This will be fixed soon.
gem install stackdeck
gem install johnson -v "2.0.0.pre1"

gem install harmony

But, when I try to install johnson with command gem install johnson -v "2.0.0.pre1", I get the following error.
[~/rails_apps/mongodb_apps/mongo_crm (master)] ➔ gem install johnson -v "2.0.0.pre1"
Building native extensions. This could take a while...
ERROR: Error installing johnson:
ERROR: Failed to build gem native extension.

/home/millisami/.rvm/ree-1.8.7-2009.10/bin/ruby extconf.rb
checking for jsautocfg.h in /home/millisami/.rvm/gems/ree-1.8.7-2009.10/gems/johnson-2.0.0.pre1/vendor/spidermonkey/Linux_All_DBG.OBJ... yes
checking for jsapi.h in /home/millisami/.rvm/gems/ree-1.8.7-2009.10/gems/johnson-2.0.0.pre1/vendor/spidermonkey... yes
creating Makefile

make
gcc -I. -I/home/millisami/.rvm/ree-1.8.7-2009.10/lib/ruby/1.8/i686-linux -I/home/millisami/.rvm/ree-1.8.7-2009.10/lib/ruby/1.8/i686-linux -I. -D_FILE_OFFSET_BITS=64  -fPIC -g -Os -fno-strict-aliasing   -g  -Wall  -Wextra  -Wcast-qual  -Wwrite-strings  -Wconversion  -Wmissing-noreturn  -Winline  -DXP_UNIX  -c ruby_land_proxy.c
In file included from spidermonkey.h:7,
                 from ruby_land_proxy.h:4,
                 from ruby_land_proxy.c:1:
/home/millisami/.rvm/ree-1.8.7-2009.10/lib/ruby/1.8/i686-linux/ruby.h: In function ‘rb_type’:
/home/millisami/.rvm/ree-1.8.7-2009.10/lib/ruby/1.8/i686-linux/ruby.h:722: warning: conversion to ‘int’ from ‘long unsigned int’ may change the sign of the result
ruby_land_proxy.c: In function ‘rb_string_value_invoke’:
ruby_land_proxy.c:13: warning: passing argument 1 of ‘rb_string_value’ makes pointer from integer without a cast
ruby_land_proxy.c: In function ‘rb_string_value_cstr_invoke’:
ruby_land_proxy.c:14: warning: passing argument 1 of ‘rb_string_value_cstr’ makes pointer from integer without a cast
ruby_land_proxy.c: In function ‘call_js_function_value’:
ruby_land_proxy.c:50: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
ruby_land_proxy.c: In function ‘get’:
ruby_land_proxy.c:81: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
ruby_land_proxy.c:81: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
ruby_land_proxy.c:83: warning: initialization makes integer from pointer without a cast
ruby_land_proxy.c:83: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
ruby_land_proxy.c:89: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
ruby_land_proxy.c: In function ‘set’:
ruby_land_proxy.c:122: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
ruby_land_proxy.c:122: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
ruby_land_proxy.c:124: warning: initialization makes integer from pointer without a cast
ruby_land_proxy.c:124: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
ruby_land_proxy.c: In function ‘callable_test_p’:
ruby_land_proxy.c:153: warning: unused parameter ‘self’
ruby_land_proxy.c: In function ‘respond_to_p’:
ruby_land_proxy.c:197: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
ruby_land_proxy.c: In function ‘each’:
ruby_land_proxy.c:276: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
ruby_land_proxy.c:276: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
ruby_land_proxy.c:309: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
ruby_land_proxy.c:310: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
ruby_land_proxy.c:312: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
ruby_land_proxy.c: In function ‘call_function_property’:
ruby_land_proxy.c:445: warning: initialization makes integer from pointer without a cast
ruby_land_proxy.c:445: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
ruby_land_proxy.c: In function ‘to_s’:
ruby_land_proxy.c:481: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
ruby_land_proxy.c: In function ‘make_ruby_land_proxy’:
ruby_land_proxy.c:578: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
ruby_land_proxy.c:582: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
gcc -I. -I/home/millisami/.rvm/ree-1.8.7-2009.10/lib/ruby/1.8/i686-linux -I/home/millisami/.rvm/ree-1.8.7-2009.10/lib/ruby/1.8/i686-linux -I. -D_FILE_OFFSET_BITS=64  -fPIC -g -Os -fno-strict-aliasing   -g  -Wall  -Wextra  -Wcast-qual  -Wwrite-strings  -Wconversion  -Wmissing-noreturn  -Winline  -DXP_UNIX  -c conversions.c
In file included from spidermonkey.h:7,
                 from conversions.h:4,
                 from conversions.c:1:
/home/millisami/.rvm/ree-1.8.7-2009.10/lib/ruby/1.8/i686-linux/ruby.h: In function ‘rb_type’:
/home/millisami/.rvm/ree-1.8.7-2009.10/lib/ruby/1.8/i686-linux/ruby.h:722: warning: conversion to ‘int’ from ‘long unsigned int’ may change the sign of the result
conversions.c: In function ‘convert_symbol_to_js’:
conversions.c:34: warning: initialization makes integer from pointer without a cast
conversions.c: In function ‘convert_regexp_to_js’:
conversions.c:55: warning: initialization makes integer from pointer without a cast
conversions.c: In function ‘convert_to_js’:
conversions.c:116: warning: initialization makes integer from pointer without a cast
conversions.c:118: warning: conversion to ‘size_t’ from ‘long int’ may change the sign of the result
conversions.c: In function ‘convert_js_string_to_ruby’:
conversions.c:192: warning: conversion to ‘long int’ from ‘size_t’ may change the sign of the result
conversions.c: In function ‘convert_regexp_to_ruby’:
conversions.c:204: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
conversions.c:204: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
conversions.c:204: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
conversions.c: In function ‘convert_to_ruby’:
conversions.c:262: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
conversions.c:268: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
conversions.c:276: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
conversions.c:278: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
conversions.c:284: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
conversions.c:288: warning: conversion to ‘VALUE’ from ‘JSBool’ may change the sign of the result
gcc -I. -I/home/millisami/.rvm/ree-1.8.7-2009.10/lib/ruby/1.8/i686-linux -I/home/millisami/.rvm/ree-1.8.7-2009.10/lib/ruby/1.8/i686-linux -I. -D_FILE_OFFSET_BITS=64  -fPIC -g -Os -fno-strict-aliasing   -g  -Wall  -Wextra  -Wcast-qual  -Wwrite-strings  -Wconversion  -Wmissing-noreturn  -Winline  -DXP_UNIX  -c runtime.c
In file included from spidermonkey.h:7,
                 from runtime.h:4,
                 from runtime.c:1:
/home/millisami/.rvm/ree-1.8.7-2009.10/lib/ruby/1.8/i686-linux/ruby.h: In function ‘rb_type’:
/home/millisami/.rvm/ree-1.8.7-2009.10/lib/ruby/1.8/i686-linux/ruby.h:722: warning: conversion to ‘int’ from ‘long unsigned int’ may change the sign of the result
In file included from /usr/include/jsdbgapi.h:46,
                 from debugger.h:5,
                 from runtime.c:5:
/usr/include/jsopcode.h:48:20: error: jsutil.h: No such file or directory
In file included from /usr/include/jsdbgapi.h:46,
                 from debugger.h:5,
                 from runtime.c:5:
/usr/include/jsopcode.h: At top level:
/usr/include/jsopcode.h:200: error: expected declaration specifiers or ‘...’ before ‘sizeof’
runtime.c: In function ‘set_debugger’:
runtime.c:227: error: ‘JSDebugHooks’ undeclared (first use in this function)
runtime.c:227: error: (Each undeclared identifier is reported only once
runtime.c:227: error: for each function it appears in.)
runtime.c:227: error: ‘debug_hooks’ undeclared (first use in this function)
runtime.c:234: error: expected expression before ‘)’ token
runtime.c:269: warning: implicit declaration of function ‘JS_SetContextDebugHooks’
runtime.c: In function ‘proxy_cleanup_enumerator’:
runtime.c:333: warning: unused parameter ‘i’
make: *** [runtime.o] Error 1


Gem files will remain installed in /home/millisami/.rvm/gems/ree-1.8.7-2009.10/gems/johnson-2.0.0.pre1 for inspection.
Results logged to /home/millisami/.rvm/gems/ree-1.8.7-2009.10/gems/johnson-2.0.0.pre1/ext/spidermonkey/gem_make.out

I am on Ubuntu Jaunty and the following is the spidermonkey installed:
[~/rails_apps/mongodb_apps/mongo_crm (master)] ➔ apt-cache search spidermonkey
js2-mode - Emacs mode for editing Javascript programs
libmozjs-dev - Development files for the Mozilla SpiderMonkey JavaScript library
libmozjs0d - The Mozilla SpiderMonkey JavaScript library
libmozjs0d-dbg - Development files for the Mozilla SpiderMonkey JavaScript library
spidermonkey-bin - standalone JavaScript/ECMAScript (ECMA-262) interpreter

@blahutka
  1. Make sure you have sudo apt-add-repository ppa:launchpad/ppa then ; apt-get update and apt-get install spidermonkey-bin
  2. use ruby-1.8.7. I had problem to build it with ruby-1.9.2
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.