2016-05-13 144 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