Question

I am not a pro-user of Mac, so I am having a lot of problems to install software. I would like to run the Z3Py (Z3 API using Python). I download Z3 v4.3.1, I installed clang v2.9 using Macports-2.1.2 and finally, when I run for Z3

>autoconf
>./configure CXX=clang++  
>python scripts/mk_make.py
>cd build
>make

I obtained:

src/shell/datalog_frontend.cpp
make: clang++: Command not found
make: *** [shell/datalog_frontend.o] Error 127

Since clang++ is in /opt/local/libexec/llvm-2.9/bin

I am not able to understand what it is happening and how to solve it. I really appreciate whatever hint because after two days trying I have not find any solution.

Was it helpful?

Solution

I just tried to replicate this error report, but I was unable to do so. Z3 builds just fine with CXX=clang++ on my machine. I can only suspect that your clang++, while it may be installed, is not in the path. For instance, simply running clang++ in the console would throw the same "command not found" error. Perhaps this could be fixed by simply running

 export PATH=$PATH:/opt/local/libexec/llvm-2.9/bin

before attempting compilation. However, I suspect there would be more issues with libraries not being found after that.

I could imagine that something went wrong during the installation via MacPorts, e.g., that it requires modifications to various environment variables which are not done automatically.

As Nuno suggests, XCode (with CLI tools) may be much easier to use and they should be available for free in the AppStore.

OTHER TIPS

You should install XCode CLI tools instead. It already includes an up-to-date version of clang (2.9 is very old). I think both XCode and XCode CLI tools are free on Appstore and/or apple developer center.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top