sparklemotion/nokogiri.org-tutorials

installing version 7.0 update of command line tools causes nokogiri to not build

hubrix opened this issue · 4 comments

need to run
sudo gcc and agree to license terms
no error tells you about it

you get this

/Users/mark/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from /Users/mark/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/mkmf.rb:587:in `try_cpp'
    from /Users/mark/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/mkmf.rb:1067:in `block in have_header'
    from /Users/mark/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/mkmf.rb:918:in `block in checking_for'
    from /Users/mark/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels) in postpone'
    from /Users/mark/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/mkmf.rb:321:in `open'
    from /Users/mark/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpone'
    from /Users/mark/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/mkmf.rb:321:in `open'
    from /Users/mark/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/mkmf.rb:347:in `postpone'
    from /Users/mark/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/mkmf.rb:917:in `checking_for'
    from /Users/mark/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/mkmf.rb:1066:in `have_header'
    from extconf.rb:103:in `have_iconv?'
    from extconf.rb:148:in `block (2 levels) in iconv_prefix'
    from extconf.rb:90:in `preserving_globals'
    from extconf.rb:143:in `block in iconv_prefix'
    from extconf.rb:120:in `each_iconv_idir'
    from extconf.rb:137:in `iconv_prefix'

if you run gcc without root you get this message
which should be detectable

Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

@hubrix Can you help me understand what documentation would have helped you understand this problem?

So the error message is one of those that gives the user the wrong hint. I had development tools installed but had not agreed to the TOS. My recommendation would be to have extconf check for the error message from gcc. if it is "Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo." it should spit out instructions to run "sudo gcc" and agree to the TOS.

I'm guessing this is not a gcc issue, but instead the situation where you haven't accepted the xcode EULA. Is this understanding correct?

The current tutorial advises users to run xcode-select --install which will prompt people for proper license acceptance. Did you do this? Did you see the "network problem" error that the following section covers?

yes it is about not accepting the eula. i'm just saying the error message
could be better

On Sun, Nov 29, 2015 at 3:49 PM Mike Dalessio notifications@github.com
wrote:

I'm guessing this is not a gcc issue, but instead the situation where
you haven't accepted the xcode EULA. Is this understanding correct?

The current tutorial advises users to run xcode-select --install which
will prompt people for proper license acceptance. Did you do this? Did you
see the "network problem" error that the following section covers?


Reply to this email directly or view it on GitHub
#38 (comment)
.