OSX Lion - ruby-1.9.3 - gcc-4.7 - "unrecognized command line option '-Wshorten-64-to-32'" #161

Closed
jackquack opened this Issue Feb 16, 2013 · 1 comment

Projects

None yet

1 participant

@jackquack

$ gem install json -v '1.7.7'

Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.

    /Users/marc/.rvm/rubies/ruby-1.9.3-p327/bin/ruby extconf.rb

creating Makefile

make
compiling generator.c
cc1: error: unrecognized command line option '-Wshorten-64-to-32'
make: *** [generator.o] Error 1

I have tried with port gcc47, gcc46 and gcc43. I have also tried with rvm ruby-1.9.3p327 and ruby-1.9.3-p327-turbo

Any suggestions would be appreciated. I will also post back if/when I find the answer.

@jackquack

I solved my issue before submitting the issue, but I decided to post anyway, so that others might find this solution and solve their own problem.

The issue was because the flag "shorten-64-to-32" is a mac only flag. So, the solution, is to return to llvm-gcc4.2 (aka, native mac gcc). (I'm not very familiar with gcc, so I don't really know what I'm talking about. But installing mac gcc42 solves the problem).

@jackquack jackquack closed this Feb 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment