Error when building z3 on unix: cannot find -lrt

女生的网名这么多〃 提交于 2020-01-06 09:55:05

问题


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.


回答1:


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


来源:https://stackoverflow.com/questions/13106042/error-when-building-z3-on-unix-cannot-find-lrt

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!