I am trying to compile the source code of MEGAM Ocaml library on an Ubuntu 64 machine.

我试图在Ubuntu 64机器上编译MEGAM Ocaml库的源代码。

I have OCaml installed (v 3.12.1), using sudo apt-get install ocaml.

我安装了OCaml(v 3.12.1),使用sudo apt-get install ocaml。

I am having an issue when running the "make" command in the terminal on the unzipped source code, with OCaml returning the error:

在解压缩的源代码中在终端中运行“make”命令时遇到问题,OCaml返回错误:

/user/bin/ld: cannot find -lstr
collect2: error: ld returned 1 exit status

The makefile is producing the following two commands:

makefile生成以下两个命令:

 ocamldep *.ml > .depend

No error when run

运行时没有错误

ocamlc -g -custom -o megam str.cma -cclib -lstr bigarray.cma -cclib -lbigarray unix.cma -cclib -lunix -I /usr/lib/ocaml/caml fastdot_c.c fastdot.cmo intHashtbl.cmo arry.cmo util.cmo data.cmo bitvec.cmo cg.cmo wsemlm.cmo bfgs.cmo pa.cmo perceptron.cmo radapt.cmo kernelmap.cmo abffs.cmo main.cmo

ocamlc -g -custom -o megam str.cma -cclib -lstr bigarray.cma -cclib -lbigarray unix.cma -cclib -lunix -I / usr / lib / ocaml / caml fastdot_c.c fastdot.cmo intHashtbl.cmo arry。 cmo util.cmo data.cmo bitvec.cmo cg.cmo wsemlm.cmo bfgs.cmo pa.cmo perceptron.cmo radapt.cmo kernelmap.cmo abffs.cmo main.cmo

Throws the error above when run.

运行时抛出上面的错误。

I've tried removing the -lstr from the compile command, it stopped throwing that particular error but started throwing another error (Reference to undefined global 'Bigarray'), which is making me thing it might all be something I missed during the OCaml installation, some kind of PATH or reference I needed to set.

我已经尝试从编译命令中删除-lstr,它停止抛出该特定错误但开始抛出另一个错误(引用未定义的全局'Bigarray'),这让我觉得它可能都是我在OCaml安装期间遗漏的东西,我需要设置的某种PATH或参考。

Any help is really appreciated, even if its just a shot in the dark, as am really struggling to come up with anything!

任何帮助都非常感谢,即使它只是在黑暗中拍摄,因为我真的很难想出任何东西!

3 个解决方案

#1


14

The instructions given here allow me to compile with no error. It boils down to:

这里给出的指令允许我编译没有错误。归结为:

locate libcamlstr

which tells me that libcamlstr can be found in /usr/lib/ocaml (YMMV), so I do:

这告诉我libcamlstr可以在/ usr / lib / ocaml(YMMV)中找到,所以我这样做:

cd /usr/lib/ocaml
sudo ln -s libcamlstr.a libstr.a

Then I'm able to compile the project:

然后我就可以编译项目了:

cd /usr/local/src/cil
make clean && ./configure && make

更多相关文章

  1. linux命令行程序
  2. linux 中 开放端口,以及防火墙的相关命令
  3. Linux 删除文件夹和文件的命令
  4. shell脚本let命令在windows下编辑后上传到Linux一直报错
  5. 连接到Linux服务器时首先要运行的5个命令
  6. linux运行命令缺少依赖库的查找方法
  7. Linux命令备忘实例(10)——目录管理
  8. 【linux】下的mkfifo 命令 和【C语言】中的mkfifo函数
  9. linux 命令 grep 不使用 正则表达式

随机推荐

  1. android中的bundle传送数据
  2. 常用的小方法,避免忘记,在此记录一下
  3. Android little error records
  4. android中的有道词典实例
  5. android 制作的精美闹钟
  6. Android SDK和最新ADT下载地址 + 环境搭
  7. Android(安卓)基于Http协议的文件上传
  8. android 为activity添加optionMenu选项菜
  9. Android练手小项目(KTReader)基于mvp架构(二
  10. android性能测试工具