Skip to content
This repository has been archived by the owner on Dec 24, 2018. It is now read-only.

Commit

Permalink
Merge pull request #61 from mhw/patch-1
Browse files Browse the repository at this point in the history
Document system library workaround for Xcode 10
  • Loading branch information
flavorjones committed Nov 14, 2018
2 parents 0005d9f + 84c5468 commit 151b71e
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions content/installing_nokogiri.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,29 @@ ways.
When working with this, be certain to use `$(brew --prefix libxml2)`
because it will use the correct location for your Homebrew install.

#### Unable to find libraries on macOS Mojave

Xcode 10 on macOS Mojave [moves the system headers][xcode10] out of `/usr/include`
and so Nokogiri will fail to build. Instead you'll see an error similar to this:

```sh
Building nokogiri using packaged libraries.
-----
libiconv is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers.
```

A temporary workaround to allow previous releases of Nokogiri to build is to
install the extra headers package mentioned in the Xcode 10 release notes:

```sh
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
```

[xcode10]: https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes#3035624

#### Other macOS Tips

* Make sure ruby is compiled with the latest clang compiler.
Expand Down

0 comments on commit 151b71e

Please sign in to comment.