mustang icon indicating copy to clipboard operation
mustang copied to clipboard

build v0.2.2 failed on OSX 10.7 (Lion)

Open mmichaa opened this issue 13 years ago • 1 comments

$ gem install mustang -v '0.2.2'
...
...
...
scons: done building targets.
------------------------------
checking for main() in -lv8... yes
checking for main() in -lpthread... yes
checking for string.h... yes
checking for ruby.h... yes
checking for v8.h... yes
checking for v8-debug.h... yes
checking for v8-profiler.h... yes
creating Makefile

make
compiling v8.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_array.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_base.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_boolean.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_cast.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_context.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_date.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_errors.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_external.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_function.cpp
clang: warning: argument unused during compilation: '-rdynamic'
v8_function.cpp:111:21: error: variable length array of non-POD element type 'Handle<v8::Value>'
  Handle<Value> args[argc-1];
                    ^
1 error generated.
make: *** [v8_function.o] Error 1


Gem files will remain installed in /Users/micha/.rvm/gems/ruby-1.9.3-p0@mygemset/gems/mustang-0.2.2 for inspection.
Results logged to /Users/micha/.rvm/gems/ruby-1.9.3-p0@mygemset/gems/mustang-0.2.2/ext/v8/gem_make.out

To solve this problem, I changed the CPP and CXX compiler in the ext/v8/Makefile from clang to 'llvm-gcc-4.2' and 'llvm-g++' (see stackoverflow for details). Than I did a cd ext/v8 and run make clean && make. This worked for me. Than I wrote the gemspec manually, like shown in gem help install: gem spec ../../cache/mustang-0.2.2.gem --ruby > ../../specifications/mustang-0.2.2.gemspec

mmichaa avatar Feb 22 '12 12:02 mmichaa

This solution does not work for me. Tried to install mustang "manually" but have this error:

cc1plus: error: unrecognized command line option "-Wno-unused-but-set-variable"
cc1plus: error: unrecognized command line option "-Wno-unused-but-set-variable"
scons: *** [obj/release/accessors.o] Error 1
scons: building terminated because of errors.

Any ideas how to install mustang?

mirosul avatar Apr 09 '12 11:04 mirosul