Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building z3 on mac os x

Tags:

build

z3

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.

like image 566
prosseek Avatar asked Jan 02 '13 23:01

prosseek


People also ask

Does Mac OS X have a GUI?

In Mac OS X, the graphical user interface (GUI) is based on the Aqua theme, menu bar, and iOS-like features.

How do I find my OSX build?

From the Apple menu  in the corner of your screen, choose About This Mac. You should see the macOS name, such as macOS Monterey or macOS Big Sur, followed by its version number. If you need to know the build number as well, click the version number to see it.

What system does Mac OS X use?

Mac OS X / OS X / macOS It is a Unix-based operating system built on NeXTSTEP and other technology developed at NeXT from the late 1980s until early 1997, when Apple purchased the company and its CEO Steve Jobs returned to Apple.


2 Answers

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

like image 111
Leonardo de Moura Avatar answered Oct 23 '22 02:10

Leonardo de Moura


Alternatively, you can use Homebrew:

> brew install z3
like image 2
João Matos Avatar answered Oct 23 '22 03:10

João Matos