免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: drunkedcat
打印 上一主题 下一主题

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

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

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

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

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

论坛徽章:
0
3 [报告]
发表于 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

会是什么原因呢?

论坛徽章:
0
4 [报告]
发表于 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 编辑 ]

论坛徽章:
0
5 [报告]
发表于 2008-09-09 16:16 |显示全部楼层
安 LFS 时,是安了 ncurses 的,
我的 /usr/lib 里有个 libncurses.so
可是我
ln -s libncurses.so libncurses.so.5 之后,就说 file too short 了。
奇怪
先忍两天,现在用着 hugs,这个东西倒是安装起来很方便。

论坛徽章:
0
6 [报告]
发表于 2008-09-09 21:35 |显示全部楼层
strings libncurses.a
.............
ncurses 5.5.20051010
GCC: (GNU) 4.0.3
..............

论坛徽章:
0
7 [报告]
发表于 2008-09-10 09:19 |显示全部楼层
原帖由 MMMIX 于 2008-9-9 23:06 发表
ghci 需要的是动态库。


多谢版主。

在 LFS 的手册中找到了这样一段话

Note
The instructions above don't create non-wide-character Ncurses libraries since no package installed by
compiling from sources would link against them at runtime. If you must have such libraries because of
some binary-only application, build them with the following commands:

make distclean
./configure --prefix=/usr --with-shared --without-normal \
  --without-debug --without-cxx-binding
make sources libs
cp -av lib/lib*.so.5* /usr/lib


当时安 lfs 时想的是所有软件都用源代码安的,现在不得已要用 bin 的了,居然把它给忘了。
如果有用 lfs 的朋友,希望引以为戒。

现在 ghc 就可以用了。多谢楼上各位。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP