compiler-construction - opa:无法编译 hello chat 演示(另一个错误)

标签 compiler-construction dependencies chat sample opa

我知道还有另一篇关于此问题的文章,但是我有一个与 Opa won't compile hello_web.opa 不同的错误.

尝试编译 hello_chat.opa 示例时 3. Hello, chat ,我收到以下错误:

In hello_chat.opa [1:29-1:29 | global chars=29-29]
Syntax error at line 1, column 29
The error may be in the following citation, usually in the red part (starting at ?) or just before:
<<type message = {string author?,string text}

room = Network.network(message) (Network.cloud("room"))

do function start() {
 >>
Hint: expected "'" or "..." or ":" or ";" or "_" or "}" or "~" or '_' or <spacing> or <value identifier> or ['0'-'9'] or ['A'-'Z'] or ['a'-'z']
(while parsing <record type fields> starting at line 1, column 16)
Error
Syntax error

我正在运行 Ubuntu 64 (v11.04) 并安装了所有依赖项(以下文档)。我已经从 .deb 包安装了 opa (opa_1.0s3.5+build687_amd64.stable.deb)。

我也尝试从源代码构建它,配置步骤提示缺少一些依赖项。也许这就是解决问题的关键?

giacomo@linuxlap:~/src/opalang$ ./configure
Checking your OS... Linux
Checking your architecture... x86_64
Checking ocamlopt... /usr/local/bin/ocamlopt
Checking ocamlbuild... /usr/local/bin/ocamlbuild
Checking ocamldir... /usr/local/lib/ocaml
Checking ocaml version... 3.12.1
Checking your ocaml setup... 3.12.1, Unix 64bit
Checking for camlp4... /usr/local/bin/camlp4o
Checking for perl 5... found
Checking for java... found
Checking for camlidl... Disabled
Checking for ocamlfind... Not found (but optional)
Checking for ssl... Not found
Checking for cryptokit... Not found
Checking for camlzip... Not found
Checking for graph... Not found
Checking for ulex... Not found

Not configured. You need the following libraries installed:
  - ocaml_ssl (might be found in package libssl-ocaml-dev)
  - cryptokit (might be found in package libcryptokit-ocaml-dev)
  - camlzip (might be found in package libzip-ocaml-dev)
  - ocamlgraph (might be found in package libocamlgraph-ocaml-dev)
  - ulex (might be found in package ocaml-ulex)

配置脚本声明丢失的软件包都安装在我的系统中。

最佳答案

关于从源代码编译 Opa,这是我几个月前做出的答案:

  • git 克隆 https://github.com/MLstate/opalang.git
  • cd opalang
  • dependencies/installation_helper.sh --prefix ~/Opa
  • 更改 ~/.profile 中的 PATH :export PATH=~/Opa/bin:$PATH
  • 重新获取 .bashrc 的源代码:source ~/.profile
  • ./configure -prefix ~/Opa
  • 全部安装
  • 您的新 opa 编译器应该位于 ~/Opa/bin 中:)

关于compiler-construction - opa:无法编译 hello chat 演示(另一个错误),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8455373/

相关文章:

javascript - 如何在JS中向网页发送控制台命令?

linux - linux下perl的基本聊天系统

c - `:>`(冒号,大于,又名笑脸)在 C 编程语言中是什么意思?

c++ - 如何在 Win7(x64) 上使用 intel C++ 编译器 (x86) 将 Mathematica 编译成 C 代码?

android - 如何使用反弹API平滑移动聊天头气泡

mysql - 在 Debian VPS 上安装 Apache & 未满足的依赖项错误

android - 多个项目的Gradle依赖关系

visual-c++ - 为什么VC++编译器MOV + PUSH args不仅仅是PUSH它们? x86

.net - .NET为什么不对SIMD固有的数学运算使用SIMD而不使用x87?

dependencies - 尝试为 PCRE-8.31 制作 RPM