Skip to content

build v0.2.2 failed on OSX 10.7 (Lion) #17

Description

@mmichaa
$ 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions