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

Document system library workaround for Xcode 10 #61

Merged
merged 2 commits into from
Nov 14, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.
```
mhw marked this conversation as resolved.
Show resolved Hide resolved

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