jgarber / redcloth

RedCloth is a Ruby library for converting Textile into HTML.
Other
443 stars 113 forks source link

difficulty installing RedCloth on Mac OS X (Mojave 10.14.5) #57

Closed sccarr closed 6 months ago

sccarr commented 4 years ago

Hi, I am trying to install RedCloth onto my Mac, and I've tried it a couple different ways. I've tried it with Bundler, and also just gem install redcloth, and I've also tried it with specific flags. Each time I've gotten the following error:

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

    current directory: /usr/local/lib/ruby/gems/2.6.0/gems/RedCloth-4.2.9/ext/redcloth_scan
/usr/local/opt/ruby/bin/ruby -I /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0 -r ./siteconf20191026-5215-xi0kxt.rb extconf.rb
checking for main() in -lc... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/usr/local/Cellar/ruby/2.6.5/bin/$(RUBY_BASE_NAME)
    --with-redcloth_scan-dir
    --without-redcloth_scan-dir
    --with-redcloth_scan-include
    --without-redcloth_scan-include=${redcloth_scan-dir}/include
    --with-redcloth_scan-lib
    --without-redcloth_scan-lib=${redcloth_scan-dir}/lib
    --with-clib
    --without-clib
/usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/mkmf.rb:552:in `try_link0'
    from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/mkmf.rb:570:in `try_link'
    from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/mkmf.rb:782:in `try_func'
    from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/mkmf.rb:1016:in `block in have_library'
    from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/mkmf.rb:959:in `block in checking_for'
    from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/mkmf.rb:361:in `block (2 levels) in postpone'
    from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/mkmf.rb:331:in `open'
    from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/mkmf.rb:361:in `block in postpone'
    from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/mkmf.rb:331:in `open'
    from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/mkmf.rb:357:in `postpone'
    from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/mkmf.rb:958:in `checking_for'
    from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/mkmf.rb:1011:in `have_library'
    from extconf.rb:5:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /usr/local/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-18/2.6.0/RedCloth-4.2.9/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /usr/local/lib/ruby/gems/2.6.0/gems/RedCloth-4.2.9 for inspection.
Results logged to /usr/local/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-18/2.6.0/RedCloth-4.2.9/gem_make.out

I don't think I need to install development tools - at least, I have XCode and I am pretty sure I have accepted the license.

guptapriyank commented 4 years ago

Try enabling xcode. check if "xcodebuild -license" on command line returns the license, if not then do the following: My OS version Catalina 10.15.3

  1. Install Xcode and accept terms.(if already done skip to step 2)
  2. run "sudo xcode-select -s /Applications/Xcode.app/Contents/Developer"

Now "xcodebuild -license" should return agreement.

Proceed

heliocola commented 8 months ago

Hi there. Thanks for reporting it. Are you still having this issue?

I am able to compile, build, and test the gem on my Mac, but I am using a much newer version.

heliocola commented 6 months ago

@sccarr : please let me know if this is still an issue for you or if it is no longer applicable.

sccarr commented 6 months ago

No longer applicable, thanks!!On Mar 14, 2024, at 00:51, Helio Cola @.***> wrote: @sccarr : please let me know if this is still an issue for you or if it is no longer applicable.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>