免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
123下一页
最近访问板块 发新帖
查看: 10183 | 回复: 22
打印 上一主题 下一主题

ghc 安装(已解决 见 22 楼) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-09-08 16:43 |只看该作者 |倒序浏览
看了几篇文章,ghc 这个东西用来学 haskell 应该是不错的,可是它的源代码安装好像有些难。
可是用了 bootstrap 技术,可是说明看了半天没看明白。
我的是 lfs 系统,没有安 python,难道是这个原因?

如果哪位大侠能指点一下,不胜感激。

[ 本帖最后由 drunkedcat 于 2008-9-10 09:20 编辑 ]

论坛徽章:
95
程序设计版块每日发帖之星
日期:2015-09-05 06:20:00程序设计版块每日发帖之星
日期:2015-09-17 06:20:00程序设计版块每日发帖之星
日期:2015-09-18 06:20:002015亚冠之阿尔艾因
日期:2015-09-18 10:35:08月度论坛发贴之星
日期:2015-09-30 22:25:002015亚冠之阿尔沙巴布
日期:2015-10-03 08:57:39程序设计版块每日发帖之星
日期:2015-10-05 06:20:00每日论坛发贴之星
日期:2015-10-05 06:20:002015年亚冠纪念徽章
日期:2015-10-06 10:06:482015亚冠之塔什干棉农
日期:2015-10-19 19:43:35程序设计版块每日发帖之星
日期:2015-10-21 06:20:00每日论坛发贴之星
日期:2015-09-14 06:20:00
2 [报告]
发表于 2008-09-08 17:03 |只看该作者

回复 #1 drunkedcat 的帖子

先找找有没有已经编译好的二进制包可以用。

GHC  的编译很耗时的,花上几个小时甚至更长的时间一点也不奇怪。

论坛徽章:
0
3 [报告]
发表于 2008-09-08 18:28 |只看该作者
原帖由 drunkedcat 于 2008-9-8 00:43 发表
看了几篇文章,ghc 这个东西用来学 haskell 应该是不错的,可是它的源代码安装好像有些难。
可是用了 bootstrap 技术,可是说明看了半天没看明白。
我的是 lfs 系统,没有安 python,难道是这个原因?

如果 ...


是要bootstrap,ghc很多部分是用haskell写的,要是没有装过ghc貌似不能直接编译。还是先下个binary的吧,呵呵。

论坛徽章:
95
程序设计版块每日发帖之星
日期:2015-09-05 06:20:00程序设计版块每日发帖之星
日期:2015-09-17 06:20:00程序设计版块每日发帖之星
日期:2015-09-18 06:20:002015亚冠之阿尔艾因
日期:2015-09-18 10:35:08月度论坛发贴之星
日期:2015-09-30 22:25:002015亚冠之阿尔沙巴布
日期:2015-10-03 08:57:39程序设计版块每日发帖之星
日期:2015-10-05 06:20:00每日论坛发贴之星
日期:2015-10-05 06:20:002015年亚冠纪念徽章
日期:2015-10-06 10:06:482015亚冠之塔什干棉农
日期:2015-10-19 19:43:35程序设计版块每日发帖之星
日期:2015-10-21 06:20:00每日论坛发贴之星
日期:2015-09-14 06:20:00
4 [报告]
发表于 2008-09-08 19:15 |只看该作者
原帖由 emacsnw 于 2008-9-8 18:28 发表
ghc很多部分是用haskell写的,要是没有装过ghc貌似不能直接编译。

没错,而且编译还慢的要命。

论坛徽章:
0
5 [报告]
发表于 2008-09-08 21:02 |只看该作者
谢谢楼上各位.
我安 bin 版时,提示说"不能认识当前路径",....
安 bin 版有什么要注意的吗?

论坛徽章:
95
程序设计版块每日发帖之星
日期:2015-09-05 06:20:00程序设计版块每日发帖之星
日期:2015-09-17 06:20:00程序设计版块每日发帖之星
日期:2015-09-18 06:20:002015亚冠之阿尔艾因
日期:2015-09-18 10:35:08月度论坛发贴之星
日期:2015-09-30 22:25:002015亚冠之阿尔沙巴布
日期:2015-10-03 08:57:39程序设计版块每日发帖之星
日期:2015-10-05 06:20:00每日论坛发贴之星
日期:2015-10-05 06:20:002015年亚冠纪念徽章
日期:2015-10-06 10:06:482015亚冠之塔什干棉农
日期:2015-10-19 19:43:35程序设计版块每日发帖之星
日期:2015-10-21 06:20:00每日论坛发贴之星
日期:2015-09-14 06:20:00
6 [报告]
发表于 2008-09-08 23:41 |只看该作者
原帖由 drunkedcat 于 2008-9-8 21:02 发表
谢谢楼上各位.
我安 bin 版时,提示说"不能认识当前路径",....
安 bin 版有什么要注意的吗?

多给点详细信息吧,例如你从什么地方得到的哪个二进制包?安装时的具体错误信息等等。

论坛徽章:
0
7 [报告]
发表于 2008-09-09 08:23 |只看该作者

http://haskell.org/ghc/download_ghc_683.html#x86linux
这个官方网址下载的
ghc-6.8.3-i386-unknown-linux.tar.bz2。

其中的 INSTALL 中说

This distribution can be installed in a location of your choosing.

To set the ball rolling, run the configure script (as usual, run the
script with --help to see what options it supports).  eg. to set up
the package for installing in directory <my-dir>, use

        ./configure --prefix=<my-dir>

The default installation directory is /usr/local.

The configure script will figure out what platform you're running on,
and a couple of other interesting pieces of trivia, which it will then
fill in the Makefile.in template to give you a real Makefile.  If
you're of a paranoid persuasion, you might want to take a look at this
Makefile to see if the information is correct.

Now run:

        make install

(`make show-install-setup' prints the details of where the different
pieces of the bundle are heading when -- possibly helpful).

但是我执行 ./configure --prefix=/usr 或者 ./configure 都说
$./configure --prefix=/usr
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
Which we'll further canonicalise into: i386-unknown-linux
checking for path to top of build tree... configure: error: cannot determine current directory

会是什么原因呢?

论坛徽章:
95
程序设计版块每日发帖之星
日期:2015-09-05 06:20:00程序设计版块每日发帖之星
日期:2015-09-17 06:20:00程序设计版块每日发帖之星
日期:2015-09-18 06:20:002015亚冠之阿尔艾因
日期:2015-09-18 10:35:08月度论坛发贴之星
日期:2015-09-30 22:25:002015亚冠之阿尔沙巴布
日期:2015-10-03 08:57:39程序设计版块每日发帖之星
日期:2015-10-05 06:20:00每日论坛发贴之星
日期:2015-10-05 06:20:002015年亚冠纪念徽章
日期:2015-10-06 10:06:482015亚冠之塔什干棉农
日期:2015-10-19 19:43:35程序设计版块每日发帖之星
日期:2015-10-21 06:20:00每日论坛发贴之星
日期:2015-09-14 06:20:00
8 [报告]
发表于 2008-09-09 10:08 |只看该作者
原帖由 drunkedcat 于 2008-9-9 08:23 发表
但是我执行 ./configure --prefix=/usr 或者 ./configure 都说
$./configure --prefix=/usr
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
Which we'll further canonicalise into: i386-unknown-linux
checking for path to top of build tree... configure: error: cannot determine current directory

会是什么原因呢?

这个是由于你系统所用的 glibc 库比较老的缘故。试下 6.8.2,这个应该没问题。如果你实在想用 6.8.3,可以用 6.8.2 从源码编译。

论坛徽章:
0
9 [报告]
发表于 2008-09-09 10:29 |只看该作者
我用ubuntu 8.04源中的<正常>
其它安装出现问题多数是库比较老的缘故&设定问题。

论坛徽章:
0
10 [报告]
发表于 2008-09-09 13:40 |只看该作者
多谢楼上各位。用 6.8.2 的 bin 版,安装成功
可是运行 ghc 或 ghci 都提示
/usr/lib/ghc-6.8.2/ghc-6.8.2: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

我作了一个 libncurses.so 的链接之后,提示

file too short
安装了一个 hugs ,倒是可以用。

看来先用 hugs 学习了。
等有了什么新的办法再来想怎么样安 ghc.毕竟 hugs 只能解释不能编译。

这几天正在看 yaht, 看完了写个心得,感谢一下论坛。

期待更好的解决方案。

[ 本帖最后由 drunkedcat 于 2008-9-9 13:58 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP