在Os X 10.5.8中使用clang-2.9编译Z3

在Os X 10.5.8中使用clang-2.9编译Z3,z3,clang++,Z3,Clang++,我想使用Z3Py,我正在尝试按照中的说明安装Z3 我获得以下信息: dhcp-154:z3-89c1785b7322 mgarcia$ ./configure CXX=clang++ checking whether we are using the GNU C++ compiler... no checking whether clang++ accepts -g... no checking for gcc... gcc checking whether we are using the G

我想使用Z3Py,我正在尝试按照中的说明安装Z3 我获得以下信息:

dhcp-154:z3-89c1785b7322 mgarcia$ ./configure CXX=clang++
checking whether we are using the GNU C++ compiler... no
checking whether clang++ accepts -g... no
checking for gcc... gcc
checking whether we are using the GNU C compiler... no
checking whether gcc accepts -g... no
checking for gcc option to accept ISO C89... unsupported
checking whether make sets $(MAKE)... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for a sed that does not truncate output... /usr/bin/sed
checking for int *... no
checking size of int *... 4
configure: creating ./config.status
config.status: creating scripts/config-debug.mk
config.status: creating scripts/config-release.mk
Z3 was configured with success.
Host platform:  osx
Compiler:       clang++
Arithmetic:     internal
Python:         python
Prefix:         /usr
64-bit:         no
当我做这个动作时,我会出错,例如:

In file included from ../src/muz_qe/dl_smt_relation.cpp:32:
../src/smt/expr_context_simplifier.h:78:10: error: expected parameter declarator
    void assert(expr* e) { m_solver.assert_expr(e); }

/usr/include/assert.h:85:23: note: instantiated from:
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)

In file included from ../src/muz_qe/dl_smt_relation.cpp:32:
../src/smt/expr_context_simplifier.h:78:10: error: expected ')'
../src/smt/expr_context_simplifier.h:78:10: note: to match this '('
    void assert(expr* e) { m_solver.assert_expr(e); }
因此,我不知道这是一个与代码相关的问题,还是我仍然缺少一些东西。或者,也许,我使用的是非常旧的版本


谢谢您的回答。

我这里没有类似的系统可以测试,但我相信这是因为您的系统库使用了

#define assert(x) (__builtin_expect...

定义
assert
函数。碰巧我们的一个类中的一个函数也被称为
assert
,预处理器用#define的其余部分替换了它。似乎Z3的不稳定分支已经解决了这个问题,您可以从源代码下载中获得,方法是在单击下载之前将分支选择器从“master”切换到“unstable”。

谢谢,我终于意识到我的C编译器没有创建可执行文件,现在我遇到了一些新问题
dhcp-154:build mgarcia$make src/shell/datalog_frontend.cpp cc1plus:error:unrecogned命令行选项“-fopenmp”make:**[shell/datalog_frontend.o]error 1
所以我想我需要安装其他东西。-fopenmp指的是OpenMP编译器扩展和库,许多现代编译器都支持它。据我所知,clang++不支持它,Z3配置脚本应该禁用它。脚本(python scripts/mk_make.py)可能无法识别clang++,或者向其传递了不正确的选项。您可以通过检查脚本的输出来验证这一点。另外,我刚刚发现mac上较旧版本的gcc可能不支持OpenMP。如果您从clang切换到gcc,您能告诉我们,
gcc--version
说明了什么吗?更多信息:请注意,今天不稳定的分支发生了变化,它在mk_make中添加了新的OpenMP检查。您可以更新并重试吗?这是
gcc-版本:i686-apple-darwin9-gcc-4.0.1:没有输入文件
无论如何,我将与新分支联系。