gem install therubyracer -v 0.11.4 fails on OS X 10.10

前端 未结 3 895
花落未央
花落未央 2021-01-18 08:12

Following the steps here "gem install therubyracer -v '0.10.2'" on osx mavericks not installing, I was able to get therubyracer -v 0.10.2 and 0.12.0 to ins

3条回答
  •  轮回少年
    2021-01-18 08:44

    This line appears a few times in your error message:

    It is recommended to use GCC v4.4 or higher
    

    The link to the steps you took says to run brew install apple-gcc42, which presumably installs GCC 4.2. 4.2 is less than 4.4.


    The specific error that the C source is generating seems to be:

    ../src/cached-powers.cc:136:18: error: unused variable 'kCachedPowersLength' [-Werror,-Wunused-const-variable]
    

    So if you can somehow edit the makefile (or extconf.rb) to remove those flags, that might also work. However I would recommend installing a compatible compiler instead, because modifying the cflags seems a little hacky.

提交回复
热议问题