nu7hatch/mustang — Issue #17: build v0.2.2 failed on OSX 10.7 (Lion)
Author: THExSYSTEM
Created: 2012-02-22 12:14:59+00:00
State: open

```
$ 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'
Handle 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](http://stackoverflow.com/questions/6796982/clang-and-the-default-compiler-in-os-x-lion) 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```