OPAM failed to install CIL because computer cannot find package Ocamlfind

OPAM failed to install CIL because computer cannot find package Ocamlfind

After I installed opam, I init an opam

opam init

Then install cil using

opam install cil

Terminal just told me that cil failed to be installed. But one directory was created under

~/.opam/system/build/cil1.7.3

So I go to the following directory

/Users/kaidiwang/.opam/system/build/cil.1.7.3

to execute

./configure

The terminal told me that I didn’t install ocamlfind. So I tried to install it using

opam install ocamlfind

and terminal told me I had installed it. But the response from the following command is none.

which ocamlfind

So I guess the computer cannot find it while opam knows where it is. With the following code, I got all path related to opam:

eval $(opam config env) or eval 'opam config env'

and the response is:

CAML_LD_LIBRARY_PATH="/Users/kaidiwang/.opam/system/lib/stublibs:/usr/local/lib/ocaml/stublibs"; export CAML_LD_LIBRARY_PATH;
OPAMUTF8MSGS="1"; export OPAMUTF8MSGS;
MANPATH=":/Users/kaidiwang/.opam/system/man"; export MANPATH;
PERL5LIB="/Users/kaidiwang/.opam/system/lib/perl5:"; export PERL5LIB;
OCAML_TOPLEVEL_PATH="/Users/kaidiwang/.opam/system/lib/toplevel"; export OCAML_TOPLEVEL_PATH;
PATH="/Users/kaidiwang/.opam/system/bin:/anaconda2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/Applications/Wireshark.app/Contents/MacOS"; export PATH;

And I found ocamlfind in this directory

/Users/kaidiwang/.opam/system/bin

To help computer to find ocamlfind, I copy ocamlfind into the following directory

/usr/local/bin

Then I execute the following command

./configure

under

/Users/kaidiwang/.opam/system/build/cil.1.7.3

The final result is

CIL configuration:
  (optional) cl.exe found:    HAS_MSVC           no
  gcc to use                  CC                 gcc
  default compiler            DEFAULT_COMPILER   _GNUCC
  CIL version                 CIL_VERSION        1.7.3
  CIL features                CIL_FEATURES       
  Extra source directories    EXTRASRCDIRS  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值