argotorg / argotorg/solidity

Old Z3 is not supported (should enforce in CMake)

Open
#13,121 5 comments 4 reactions 0 assignees View on GitHub
bug :bug: build system :building_construction: easy difficulty low effort medium impact should have smt
Dominant language
C++
Stars
25.7k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
21

Description

I have z3 4.8.13 installed.

CMake properly warns (I think for the reason that different versions may produce different outputs for the tests):
```
CMake Error at CMakeLists.txt:74 (message):
SMTChecker tests require Z3 4.8.17 for all tests to pass.

Build with -DSTRICT_Z3_VERSION=OFF if you want to use a different version.
You can also use -DUSE_Z3=OFF to build without Z3. In both cases use
--no-smt when running tests.
```

However disabling it (using `-DSTRICT_Z3_VERSION=OFF`) shows that 4.8.13 is not a supported version anymore:
```
/Projects/solidity/libsmtutil/Z3Interface.cpp:381:11: error: use of undeclared identifier 'Z3_OP_RECURSIVE'
kind == Z3_OP_RECURSIVE
^
```

Should add another version check for "not older than".

Contributor guide

Open the contributing guide

Research direction

Start in CMakeLists.txt around line 74 and inspect the existing STRICT_Z3_VERSION check, then read the Z3 version-dependent code in libsolidity/smtutil/Z3Interface.cpp around line 381. Make the configuration check reject Z3 4.8.13 and other unsupported older versions before compilation, while preserving the documented behavior for STRICT_Z3_VERSION=OFF.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.