ChainerCVのインストールエラーを回避

# 環境
- OSX 10.14.2
- anaconda 5.2.0
- Python 3.6.5

# 問題
pipでchainercvを入れようとするとビルドが始まってエラーで落ちる

```shell

$ pip install chainercv
Looking in indexes: https://pypi.org/simple, https://packagecloud.io/abeja/platform-public/pypi/simple                                                                            Collecting chainercv                                                                                                                                                                Using cached https://files.pythonhosted.org/packages/bb/1c/cee12630628d0acd4d6c5d7a3ba196a3aa079a863baa3dc74eb70d8494c5/chainercv-0.11.0.tar.gz                                 Requirement already satisfied: chainer>=5.0 in /Users/ogata/.pyenv/versions/anaconda3-5.2.0/lib/python3.6/site-packages (from chainercv) (5.1.0)
Requirement already satisfied: Pillow in /Users/ogata/.pyenv/versions/anaconda3-5.2.0/lib/python3.6/site-packages (from chainercv) (5.1.0)
Requirement already satisfied: filelock in /Users/ogata/.pyenv/versions/anaconda3-5.2.0/lib/python3.6/site-packages (from chainer>=5.0->chainercv) (3.0.4)
Requirement already satisfied: six>=1.9.0 in /Users/ogata/.pyenv/versions/anaconda3-5.2.0/lib/python3.6/site-packages (from chainer>=5.0->chainercv) (1.11.0)
Requirement already satisfied: numpy>=1.9.0 in /Users/ogata/.pyenv/versions/anaconda3-5.2.0/lib/python3.6/site-packages (from chainer>=5.0->chainercv) (1.14.3)
Requirement already satisfied: protobuf>=3.0.0 in /Users/ogata/.pyenv/versions/anaconda3-5.2.0/lib/python3.6/site-packages (from chainer>=5.0->chainercv) (3.6.1)
Requirement already satisfied: setuptools in /Users/ogata/.pyenv/versions/anaconda3-5.2.0/lib/python3.6/site-packages (from protobuf>=3.0.0->chainer>=5.0->chainercv) (39.1.0)
Building wheels for collected packages: chainercv
  Running setup.py bdist_wheel for chainercv ... error
  Complete output from command /Users/ogata/.pyenv/versions/anaconda3-5.2.0/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/qs/hr_vkjw954q044zj_j657j
j40000gn/T/pip-install-jcch9cqz/chainercv/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec')
)" bdist_wheel -d /private/var/folders/qs/hr_vkjw954q044zj_j657jj40000gn/T/pip-wheel-ija8a67d --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.7-x86_64-3.6
  creating build/lib.macosx-10.7-x86_64-3.6/chainercv
  copying chainercv/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/chainercv
  creating build/lib.macosx-10.7-x86_64-3.6/tests
  copying tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/tests
  creating build/lib.macosx-10.7-x86_64-3.6/chainercv/experimental
  copying chainercv/experimental/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/chainercv/experimental
  creating build/lib.macosx-10.7-x86_64-3.6/chainercv/evaluations
  copying chainercv/evaluations/eval_detection_voc.py -> build/lib.macosx-10.7-x86_64-3.6/chainercv/evaluations
  copying chainercv/evaluations/eval_instance_segmentation_coco.py -> build/lib.macosx-10.7-x86_64-3.6/chainercv/evaluations
  copying chainercv/evaluations/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/chainercv/evaluations
  copying chainercv/evaluations/eval_detection_coco.py -> build/lib.macosx-10.7-x86_64-3.6/chainercv/evaluations
  copying chainercv/evaluations/eval_instance_segmentation_voc.py -> build/lib.macosx-10.7-x86_64-3.6/chainercv/evaluations
  copying chainercv/evaluations/eval_semantic_segmentation.py -> build/lib.macosx-10.7-x86_64-3.6/chainercv/evaluations
  creating build/lib.macosx-10.7-x86_64-3.6/chainercv/datasets
  copying chainercv/datasets/siamese_dataset.py -> build/lib.macosx-10.7-x86_64-3.6/chainercv/datasets
  copying chainercv/datasets/mixup_soft_label_dataset.py -> build/lib.macosx-10.7-x86_64-3.6/chainercv/datasets
  copying chainercv/datasets/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/chainercv/datasets
  copying chainercv/datasets/transform_dataset.py -> build/lib.macosx-10.7-x86_64-3.6/chainercv/datasets
:
:
:
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/resource.h:200:2: error: unknown type name 'uint64_t'
            uint64_t ri_interrupt_wkups;
            ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/resource.h:201:2: error: unknown type name 'uint64_t'
            uint64_t ri_pageins;
            ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/resource.h:202:2: error: unknown type name 'uint64_t'
            uint64_t ri_wired_size;
            ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/resource.h:203:2: error: unknown type name 'uint64_t'
            uint64_t ri_resident_size;
            ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/resource.h:204:2: error: unknown type name 'uint64_t'
            uint64_t ri_phys_footprint;
            ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/resource.h:205:2: error: unknown type name 'uint64_t'
            uint64_t ri_proc_start_abstime;
            ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/resource.h:206:2: error: unknown type name 'uint64_t'
            uint64_t ri_proc_exit_abstime;
            ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/resource.h:211:2: error: unknown type name 'uint64_t'
            uint64_t ri_user_time;
            ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/resource.h:212:2: error: unknown type name 'uint64_t'
            uint64_t ri_system_time;
            ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/resource.h:213:2: error: unknown type name 'uint64_t'
            uint64_t ri_pkg_idle_wkups;
            ^
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/resource.h:214:2: error: unknown type name 'uint64_t'
            uint64_t ri_interrupt_wkups;
            ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    20 errors generated.
    error: command 'gcc' failed with exit status 1
```

システムデフォルトのgccは入ってるけど、見つからないのかな？


# 解決策
とりあえずgccをいれみた。

```
brew install gcc
ln -s /usr/local/bin/gcc-8 /usr/local/bin/gcc
ln -s /usr/local/bin/g++-8 /usr/local/bin/g++
```

その後通常通りpipで入れる。

```shell
$ pip install chainercv
Looking in indexes: https://pypi.org/simple, https://packagecloud.io/abeja/platform-public/pypi/simple
Collecting chainercv
  Using cached https://files.pythonhosted.org/packages/bb/1c/cee12630628d0acd4d6c5d7a3ba196a3aa079a863baa3dc74eb70d8494c5/chainercv-0.11.0.tar.gz
Requirement already satisfied: chainer>=5.0 in /Users/ogata/.pyenv/versions/anaconda3-5.2.0/lib/python3.6/site-packages (from chainercv) (5.1.0)
Requirement already satisfied: Pillow in /Users/ogata/.pyenv/versions/anaconda3-5.2.0/lib/python3.6/site-packages (from chainercv) (5.1.0)
Requirement already satisfied: numpy>=1.9.0 in /Users/ogata/.pyenv/versions/anaconda3-5.2.0/lib/python3.6/site-packages (from chainer>=5.0->chainercv) (1.14.3)
Requirement already satisfied: filelock in /Users/ogata/.pyenv/versions/anaconda3-5.2.0/lib/python3.6/site-packages (from chainer>=5.0->chainercv) (3.0.4)
Requirement already satisfied: six>=1.9.0 in /Users/ogata/.pyenv/versions/anaconda3-5.2.0/lib/python3.6/site-packages (from chainer>=5.0->chainercv) (1.11.0)
Requirement already satisfied: protobuf>=3.0.0 in /Users/ogata/.pyenv/versions/anaconda3-5.2.0/lib/python3.6/site-packages (from chainer>=5.0->chainercv) (3.6.1)
Requirement already satisfied: setuptools in /Users/ogata/.pyenv/versions/anaconda3-5.2.0/lib/python3.6/site-packages (from protobuf>=3.0.0->chainer>=5.0->chainercv) (39.1.0)
Building wheels for collected packages: chainercv
  Running setup.py bdist_wheel for chainercv ... done
  Stored in directory: /Users/ogata/Library/Caches/pip/wheels/95/24/5a/1611db416857b5e092962bc22a70722315881e03970c7fa966
Successfully built chainercv
Installing collected packages: chainercv
Successfully installed chainercv-0.11.0
```

ビルドは走らずにインストールできたっぽい。
setupとか詳しく読んでないけど、なんか環境が揃ってるとパッケージからインストールしてくれるっぽい？

よくわからないけど解決できました。