[llvm-bugs] [Bug 40128] New: Trunk doesn't build with libz3-dev of ubuntu 18.04

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Dec 21 01:49:34 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=40128

            Bug ID: 40128
           Summary: Trunk doesn't build with libz3-dev of ubuntu 18.04
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
          Assignee: dcoughlin at apple.com
          Reporter: pmatos at linki.tools
                CC: dcoughlin at apple.com, llvm-bugs at lists.llvm.org

Start a docker machine with ubuntu 18.04.
Install libz3-dev and compile llvm/clang trunk with: 
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
-DCLANG_ANALYZER_ENABLE_Z3_SOLVER=ON -G Ninja ../llvm

You'll get from clang 
FAILED:
tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/clangStaticAnalyzerCore.dir/Z3ConstraintManager.cpp.o 
/usr/bin/c++  -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-Itools/clang/lib/StaticAnalyzer/Core
-I/root/llvm/tools/clang/lib/StaticAnalyzer/Core
-I/root/llvm/tools/clang/include -Itools/clang/include -Iinclude
-I/root/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time
-std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual
-Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough
-Wno-maybe-uninitialized -Wno-class-memaccess -Wno-noexcept-type
-Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections
-fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing   
-fno-exceptions -fno-rtti -MD -MT
tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/clangStaticAnalyzerCore.dir/Z3ConstraintManager.cpp.o
-MF
tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/clangStaticAnalyzerCore.dir/Z3ConstraintManager.cpp.o.d
-o
tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/clangStaticAnalyzerCore.dir/Z3ConstraintManager.cpp.o
-c /root/llvm/tools/clang/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp
/root/llvm/tools/clang/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp: In
function 'void {anonymous}::Z3ErrorHandler(Z3_context, Z3_error_code)':
/root/llvm/tools/clang/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp:49:57:
error: cannot convert 'Z3_context' {aka '_Z3_context*'} to 'Z3_error_code'
                            llvm::Twine(Z3_get_error_msg(Context, Error)));
                                                         ^~~~~~~
In file included from /usr/include/z3.h:26,
                 from
/root/llvm/tools/clang/lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp:23:
/usr/include/z3_api.h:5314:53: note:   initializing argument 1 of 'const char*
Z3_get_error_msg(Z3_error_code)'
     Z3_string Z3_API Z3_get_error_msg(Z3_error_code err);
                                       ~~~~~~~~~~~~~~^~~

My guess is that cmake needs a stricter check for the version of libz3.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181221/4cf87735/attachment-0001.html>


More information about the llvm-bugs mailing list