bundle install エラー

# はじめに
bundle install時にエラー

```terminal:terminal
Fetching ovirt-engine-sdk 4.2.4
Installing ovirt-engine-sdk 4.2.4 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/mosamosapoodle/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/ovirt-engine-sdk-4.2.4/ext/ovirtsdk4c
/Users/mosamosapoodle/.rbenv/versions/2.4.1/bin/ruby -r ./siteconf20180424-33388-p7fnfd.rb extconf.rb
checking for xml2-config... yes
checking for curl-config... yes
creating Makefile

current directory: /Users/mosamosapoodle/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/ovirt-engine-sdk-4.2.4/ext/ovirtsdk4c
make "DESTDIR=" clean

current directory: /Users/mosamosapoodle/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/ovirt-engine-sdk-4.2.4/ext/ovirtsdk4c
make "DESTDIR="
compiling ov_error.c
compiling ov_http_client.c
compiling ov_http_request.c
compiling ov_http_response.c
compiling ov_http_transfer.c
compiling ov_module.c
compiling ov_string.c
compiling ov_xml_reader.c
compiling ov_xml_writer.c
compiling ovirtsdk4c.c
linking shared-object ovirtsdk4c.bundle
ld: file not found: /usr/lib/system/libsystem_darwin.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [ovirtsdk4c.bundle] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/mosamosapoodle/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/ovirt-engine-sdk-4.2.4 for inspection.
Results logged to /Users/mosamosapoodle/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/extensions/x86_64-darwin-16/2.4.0-static/ovirt-engine-sdk-4.2.4/gem_make.out

An error occurred while installing ovirt-engine-sdk (4.2.4), and Bundler cannot continue.
Make sure that `gem install ovirt-engine-sdk -v '4.2.4'` succeeds before bundling.

In Gemfile:
  fog was resolved to 2.0.0, which depends on
    fog-ovirt was resolved to 1.0.3, which depends on
      ovirt-engine-sdk
```

# 環境

```
Rails 5.1.4
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
macOS Sierra 10.12.6
```

# 原因

```terminal
ld: file not found: /usr/lib/system/libsystem_darwin.dylib for architecture x86_64
```

# 解決方法

1.

下記パスのファイルををバックアップ（メモ）しておく。
`/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/lib/libSystem.B.tbd`

2.
上記ファイルをVimで編集するためのコマンドを実行。

```terminal:terminal
$ sudo vim /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/lib/libSystem.B.tbd
```

3. -行を +行に変更

```termil:terminal
...
                        /usr/lib/system/libquarantine.dylib, /usr/lib/system/libremovefile.dylib, 
                        /usr/lib/system/libsystem_asl.dylib, /usr/lib/system/libsystem_blocks.dylib, 
                        /usr/lib/system/libsystem_c.dylib, /usr/lib/system/libsystem_configuration.dylib, 
-                       /usr/lib/system/libsystem_coreservices.dylib, /usr/lib/system/libsystem_darwin.dylib, 
+                       /usr/lib/system/libsystem_coreservices.dylib, 
                        /usr/lib/system/libsystem_dnssd.dylib, /usr/lib/system/libsystem_info.dylib, 
                        /usr/lib/system/libsystem_kernel.dylib, /usr/lib/system/libsystem_m.dylib, 
                        /usr/lib/system/libsystem_malloc.dylib, /usr/lib/system/libsystem_network.dylib,
...
```

# 確認

```terminal:terminal
【railsディレクトリ名】 mosamosapoodle$ bundle install
```