简体   繁体   English

使用OSX Mavericks GHC安装和构建GHC

[英]Installing & Building GHC with OSX Mavericks GHC

升级到OSX Mavericks后,为什么我的GHC 7.6.3不起作用?

It took a long time to figure out how to Work with both OSX 10.9 and GHC 7.6.3, and here are some tips to help you get back to building haskell code. 花了很长时间才弄清楚如何使用OSX 10.9和GHC 7.6.3,这里有一些技巧可以帮助你回到构建haskell代码。

Summary: Download command line tools for mavericks and use gcc version 4.2 (link to the correct gcc path in your ghc settings file) 简介:下载适用于mavericks的命令行工具并使用gcc 4.2版(链接到ghc设置文件中的正确gcc路径)

Steps: 脚步:

  1. Download the command line tools for mavericks 下载适用于小牛队命令行工具 下载
  2. Install gcc-4.2 using homebrew brew install apple-gcc42 使用自制的brew install apple-gcc42安装gcc-4.2
  3. Edit your settings file, Line 2. Update the C compiler location to point to this newer gcc. 编辑您的设置文件,第2行。更新C编译器位置以指向此较新的gcc。 Depending on how you installed GHC, it could be one of the following... 根据您安装GHC的方式,它可能是以下之一......

    • Platform Edition 平台版

      /Library/Frameworks/GHC.framework/Versions/Current/usr/lib/ghc-7.6.3/settings

    • Brew version of GHC Brew版GHC

      /usr/local/Cellar/ghc/7.6.3/lib/ghc-7.6.3/settings

    • GHC Installed from Source GHC从Source安装

      /usr/local/lib/ghc-7.6.3/settings

It will look something like this: 它看起来像这样:

("C compiler command", "/usr/local/bin/gcc-4.2"),

A more detailed version for each step written can be found here . 可以在此处找到每个步骤的更详细版本

Alternate approach: Use the XCode5 wrapper. 替代方法:使用XCode5包装器。 Instructions here 这里的说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM