【问题标题】:Unable to install z3无法安装 z3
【发布时间】:2014-01-17 18:10:30
【问题描述】:

我正在尝试使用 make/g++ 和 Python 从源代码(v. 4.3.1.,2013 年 11 月,z3-89c1785b7322)构建 Z3,结果如下

 autoconf                       -- succeeded
 ./configure                    -- succeeded
 python scripts/mk_make.py      -- error message, given below

Traceback (most recent call last):

File "scripts/mk_make.py", line 20, in <module>
mk_makefile()

File "/home/davidg/z3/scripts/mk_util.py", line 854, in mk_makefile
c.mk_makefile(out)

File "/home/davidg/z3/scripts/mk_util.py", line 666, in mk_makefile
for cppfile in self.src_files():

File "/home/davidg/z3/scripts/mk_util.py", line 659, in src_files
return get_cpp_files(self.ex_dir)

File "/home/davidg/z3/scripts/mk_util.py", line 246, in get_cpp_files
return filter(lambda f: f.endswith('.cpp'), os.listdir(path))

OSError: [Errno 2] No such file or directory: 'examples/c++'

我不知道这是否应该是一个致命错误。继续,好像不是,

 cd build
 make

似乎成功了,以“Z3 已成功构建”消息结束。下一步

 sudo make install

因错误而失败

 No rule to make target `install`

(“卸载”也没有目标。)

感谢任何帮助

【问题讨论】:

    标签: installation z3


    【解决方案1】:

    连同 Z3 源代码,您应该已经收到了示例目录。配置失败,因为它找不到examples/c++ 目录(其中应该有一个名为example.cpp 的文件)。此时只写入了部分 Makefile,足以让 main 目标成功,但安装目标尚未写入 Makefile,这就是它失败的原因。

    【讨论】:

      【解决方案2】:

      现在看起来它不再是 v4.8.8 的问题了。 z3 可以按照以下命令构建和安装

      git clone https://github.com/Z3Prover/z3.git
      cd z3
      
      python3 scripts/mk_make.py --python
      cd build
      make
      sudo make install
      
      pip3 install z3-solver
      

      这将提供 C/C++ 和 Python API。

      发件人:https://medium.com/@seunghyunchae7/installing-z3-theorem-prover-on-macos-bcc0b28bd485

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2016-06-06
        • 2012-11-02
        • 1970-01-01
        • 2018-07-01
        • 1970-01-01
        • 1970-01-01
        • 2019-11-12
        相关资源
        最近更新 更多