从Linux上的来源构建Haskell GHC
似乎有一个循环依赖性建立GHC时:
$ wget https://downloads.haskell.org/~ghc/9.2.2/ghc-9.2.2-src.tar.xz
$ tar -xf ghc-9.2.2-src.tar.xz
$ cd ghc-9.2.2/
$ sed -n "11,12p" INSTALL.md
N.B. in particular you need GHC installed in order to build GHC,
because the compiler is itself written in Haskell. For instructions
$ sudo apt install ghc # <----- somehow get an older version to build from source the new one
$ ./configure
checking for gfind... no
checking for find... /usr/bin/find
checking for sort... /usr/bin/sort
checking for GHC Git commit id... given fbaee70d380973f71fa6e9e15be746532e5a4fc5
checking for ghc... /usr/bin/ghc
checking version of ghc... 8.6.5
configure: error: GHC version 8.10 or later is required to compile GHC. # ???!!!
为了构建新的GHC,需要一些 旧版本的GHC版本,但是不太旧。 apt-get
版本 太旧了。有什么想法吗?
It seems there is a circular dependency when building ghc:
$ wget https://downloads.haskell.org/~ghc/9.2.2/ghc-9.2.2-src.tar.xz
$ tar -xf ghc-9.2.2-src.tar.xz
$ cd ghc-9.2.2/
$ sed -n "11,12p" INSTALL.md
N.B. in particular you need GHC installed in order to build GHC,
because the compiler is itself written in Haskell. For instructions
$ sudo apt install ghc # <----- somehow get an older version to build from source the new one
$ ./configure
checking for gfind... no
checking for find... /usr/bin/find
checking for sort... /usr/bin/sort
checking for GHC Git commit id... given fbaee70d380973f71fa6e9e15be746532e5a4fc5
checking for ghc... /usr/bin/ghc
checking version of ghc... 8.6.5
configure: error: GHC version 8.10 or later is required to compile GHC. # ???!!!
So to build a new ghc, some older version of ghc is needed, but not too old.
The apt-get
version is too old. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据@Daniel Wagner的评论发布自我完整性:
Posting for self completeness according to the comment of @Daniel Wagner: