<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Trunk doesn't build with libz3-dev of ubuntu 18.04"
   href="https://bugs.llvm.org/show_bug.cgi?id=40128">40128</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Trunk doesn't build with libz3-dev of ubuntu 18.04
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Static Analyzer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dcoughlin@apple.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>pmatos@linki.tools
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dcoughlin@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>