Building z3 on mac os x

2019-05-01 17:04发布

I'm trying to build Z3 on mac os x.

Following README file, I just executed

autoconf
./configure
make

to get an error "omp.h" file not found.

I copied the omp.h file from /usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin11/4.2.1/include to lib directory to solve this issue.

Then, I got lib/buffer.h:243:13: error: use of undeclared identifier 'push_back' error in building the code.

What could be the solution? I have gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00) on Mac OS X 10.7.5.

标签: build z3
2条回答
你好瞎i
2楼-- · 2019-05-01 17:32

The next release (Z3 v4.3.2) will have better support for OSX, clang, and older versions of gcc. You should be able to compile the release candidate using the following instructions. rc is the branch that contains the current release candidate.

git clone https://git01.codeplex.com/z3 -b rc
cd z3
python scripts/mk_make.py
cd build
make

BTW, the link http://z3.codeplex.com/releases/view/95640 does not contain the latest release (Z3 v4.3.1). We don't create zip files with source code anymore because codeplex automatically generates them for any version. See this link for additional details.

EDIT on February 2013, we started to provide nightly builds for all major platforms (including OSX). Here are instruction on how to download these pre-compiled binaries. END EDIT

查看更多
Deceive 欺骗
3楼-- · 2019-05-01 17:50

Alternatively, you can use Homebrew:

> brew install z3
查看更多
登录 后发表回答