2016-05-13 143 views
0

我已经使用opam(在Ubuntu 16.04上)安装了frama-c。 我尝试使用一个Makefile在ubuntu上安装hello_world插件时出现错误16.04

FRAMAC_SHARE :=$(shell frama-c.byte -print-path) 
    FRAMAC_LIBDIR :=$(shell frama-c.byte -print-libpath) 
    PLUGIN_NAME = Hello 
    PLUGIN_CMO = hello_word 
    include $(FRAMAC_SHARE)/Makefile.dynamic 

运行make安装“hello_world.ml”作为插件(插件开发指南),我得到这个:

 /home/amira/.opam/system/share/frama-c/Makefile.dynamic:295: .depend: Aucun fichier ou dossier de ce type 
    /home/amira/.opam/system/share/frama-c/Makefile.plugin:204: *** "The file 'Hello.mli' must be provided. The simplest workaround is 'touch Hello.mli'.". Arrêt. 

我怎样才能解决这个错误?

+0

你尝试第二个警告的指示('摸Hello.mli')? – byako

+0

'Hello.mli'没有被创建。但运行'make'后,我得到这个 'Ocamldep ./.depend 生成META.frama -c -hello make:*** Aucunerèglepour fabriquer la cible«hello_word.cmo»,nécessairepour«Hello.cmi» 。 Arrêt.' – Amiramet

回答

0

你应该尽量照做:

"The file 'Hello.mli' must be provided. The simplest workaround is 'touch Hello.mli' 

消息.depend: Aucun fichier ou dossier de ce type是不是一个错误。它是自动生成的include .depend的人造物。 Gnu make会在构建它之后自动重启以考虑它。

0

我跑touch Hello.mli,然后我跑make,我得到这个:

Ocamldep  ./.depend 
Generating META.frama-c-hello 
make: *** Aucune règle pour fabriquer la cible « hello_word.cmo », nécessaire pour « Hello.cmi ». Arrêt. 
+0

而不是一个答案,请编辑您的问题,以反映当前问题。另外,您还应该向我们提供目录中存在的文件列表。如果你已经遵循了第2.2.4节,你应该有'hello_world.ml'文件和'Makefile'。另外,第2.2.5节明确指出'Hello.mli'是必需的。 – Virgile

+0

我的目录包含:Hello.cmi Hello_DEP Hello.mli hello_world.ml Makefile META.frama -c -hello – Amiramet

+0

你的'Makefile'的内容是什么?当我在安装了Magnesium的机器上从手册的p17和18中的'Makefile','Hello.mli'和'hello_world.ml'目录运行make时,一切都很好。 – Virgile