简体   繁体   English

使用opam安装Frama-C时出错(Ubuntu 14.04 LTS)

[英]Error installing Frama-C with opam (Ubuntu 14.04 LTS)

Trying to install Frama-C with the recommended opam method gives the following error: 尝试使用推荐的opam方法安装Frama-C会出现以下错误:

### stdout ###
# Cleaning     Installation directory
# Installing   WP shared files
### stderr ###
# /bin/sh: 1: src/plugins/wp/share/instwp: not found
# make: *** [src/plugins/wp/Makefile:355: install] Error 127

here are the commands used: 这是使用的命令:

# install opam
$ wget https://raw.github.com/ocaml/opam/master/shell/opam_installer.sh -O - | sh -s /usr/local/bin
# configure opam
$ eval `opam config env`
$ opam config setup -a
# install frama-c
$ opam install frama-c-base

Edit: here is the output of opam install -v frama-c-base : https://pastebin.com/eMH08ugA 编辑:这是opam install -v frama-c-base的输出: httpsopam install -v frama-c-base

Edit2: the system in question is running Linux Mint 17.3 (Ubuntu 14.04 LTS upstream); Edit2:有问题的系统正在运行Linux Mint 17.3(Ubuntu 14.04 LTS上游); the Ubuntu package in the software repository is Make 3.81 (untested) although this had already been upgraded to Make 4.2 when this bug was encountered 软件存储库中的Ubuntu软件包是Make 3.81(未经测试),虽然在遇到此错误时已经升级到Make 4.2

I was able to reproduce the issue, and the culprit seems to be Make 4.2, due to this bug in particular: 我能够重现这个问题,罪魁祸首似乎是Make 4.2,特别是由于这个bug

bug #44742: Double-dep with double-colon rule not built [in parallel builds] bug#44742:没有构建双冒号的双重dep [并行构建]

Several rules in Frama-C makefiles use double-colon, and by default the -j%{jobs}% is set in the opam Frama-C file to speed up the compilation. Frama-C makefile中的几个规则使用双冒号,默认情况下,在opam Frama-C文件中设置-j%{jobs}%以加速编译。

Unfortunately, it seems that the combination of these two results in the instwp file (among others) not being built, despite its rule being present in the WP makefile, when using that specific version of Make. 不幸的是,当使用特定版本的Make时,似乎这两者的组合导致instwp文件(以及其他)没有被构建,尽管它的规则存在于WP makefile中。

I am using Make 4.2.1 by default and I do not have that issue (all files are produced as expected and make install succeeds). 我默认使用Make 4.2.1,我没有这个问题(所有文件都按预期生成, make install成功)。 If I manually compile Frama-C without -j , I also do not have the issue. 如果我在没有-j情况下手动编译Frama-C,我也没有问题。

If you are unable to update your version of Make, you could try using opam install -j 1 frama-c , which should override the jobs variable and disable parallel compilation of Frama-C, thus avoiding the error. 如果您无法更新Make版本,可以尝试使用opam install -j 1 frama-c ,它应该覆盖jobs变量并禁用Frama-C的并行编译,从而避免错误。

Still, my general recommendations would be: 不过,我的一般建议是:

  1. Install a newer OCaml (4.02.3 at least, it should be compatible will almost every package available in OCaml 4.02.1) to ensure the most recent release of Frama-C will be available (Frama-C Silicon is not available in OCaml 4.02.1); 安装一个较新的OCaml(至少4.02.3,它应该与OCaml 4.02.1中几乎所有可用的软件包兼容),以确保最新版本的Frama-C可用(OCaml 4.02中不提供Frama-C芯片) 0.1);

  2. If you can, install frama-c itself, and not frama-c-base , since the only difference are the required packages, namely those for the GUI. 如果可以,请安装frama-c本身,而不是frama-c-base ,因为唯一的区别是所需的包,即GUI的包。 You may want to do the following before running opam install frama-c : 在运行opam install frama-c之前,您可能需要执行以下操作:

     opam install depext opam depext frama-c 

    The first line will install depext , which is able to find external dependencies for your distribution, and the second line will apply depext to Frama-C, thus prompting you to install external dependencies available in your distribution. 第一行将安装depext ,它能够找到您的发行版的外部依赖项,第二行将applyxt应用于Frama-C,从而提示您安装您的发行版中可用的外部依赖项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM