Help us understand the problem. What is going on with this article?

Haskell環境構築 備忘録[Mac]

参考サイト

https://docs.haskellstack.org/en/stable/README/
インストールはこちらを参考にやりました。

1. How to install

console
$ curl -sSL https://get.haskellstack.org/ | sh

参考サイトにあったコマンドを実行
特にエラーでず

2. How to upgrade

console
$ stack upgrade

upgradeしたけどすでに最新といわれ終了

3. REPLを起動しようとするもエラー

console
$ stack ghci

2020-01-17 06:17:44.324802: [error] xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
2020-01-17 06:17:44.325494: [debug] checking XCode version... not found (too old?)
2020-01-17 06:17:44.326306: [debug] checking for gcc... gcc
2020-01-17 06:17:44.370920: [debug] checking whether the C compiler works... no
2020-01-17 06:17:44.372914: [error] configure: error: in /Users/user/.stack/programs/x86_64-osx/ghc-8.6.5.temp/ghc-8.6.5':
2020-01-17 06:17:44.373002: [error] configure: error: C compiler cannot create executables
2020-01-17 06:17:44.373037: [error] See
config.log' for more details
2020-01-17 06:17:44.398698: [error] Received ExitFailure 77 when running
Raw command: /Users/user/.stack/programs/x86_64-osx/ghc-8.6.5.temp/ghc-8.6.5/configure --prefix=/Users/xxxxx/.stack/programs/x86_64-osx/ghc-8.6.5/
Run from: /Users/user/.stack/programs/x86_64-osx/ghc-8.6.5.temp/ghc-8.6.5/

2020-01-17 06:17:44.398853: [error]

Xcodeをアップデート

Xcodeもだいぶ放置していたのでとりあえずアップデート。
→エラーは解決せず

Xcodeを起動

Installing component...というダイアログが出現
あれ...そもそも、このマシンでXcodeを起動したことが一度もなかったかもしれない。

Xcodeの設定

  1. メニューの[Xcode] → [Preferences…] を開く。
  2. [Locations]を選択。
  3. [Comannd line Tools:] リストボックスが空欄になっていたのでXcode 11.3.1を選択。

ここが参考になった

4.再度REPLを起動

console
$ stack ghci

エラーがでず無事にREPL起動しました。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした