Lew Baxter
Lew Baxter

Reputation: 23

Error when building z3 on unix: cannot find -lrt

During make, I get an error with:

g++ -o bin/external/z3 obj/external/act_cache.o : : obj/external/smtlib_frontend.o obj/external/z3_log_frontend.o -lrt -lpthread -fopenmp -static

The message is /usr/lib/ ..... /i586-suse-linux/bin/ld: cannot find -lrt

followed by similar messages about -lpthread -lm -lc.

Upvotes: 0

Views: 1223

Answers (1)

Leonardo de Moura
Leonardo de Moura

Reputation: 21475

The problem may be the -static option. See the following thread: http://www.linuxforums.org/forum/programming-scripting/35135-cant-find-some-libraries.html

The new build system for Z3 does not use static libraries. If you are feeling adventurous, you can try the "unstable" branch which uses the new build system. Here are the instruction to build Z3 using it:

git clone https://git01.codeplex.com/z3
cd z3
git checkout -b unstable
git pull origin unstable
autoconf
./configure
python scripts/mk_make.py
cd build
make

The git related commands can be replace with the .zip file downloaded from:
http://z3.codeplex.com/SourceControl/changeset/view/946a06cddbe4

Upvotes: 1

Related Questions