<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 - FileCheck linking with Z3 despite -DCLANG_ANALYZER_ENABLE_Z3_SOLVER=OFF"
   href="https://bugs.llvm.org/show_bug.cgi?id=42921">42921</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>FileCheck linking with Z3 despite -DCLANG_ANALYZER_ENABLE_Z3_SOLVER=OFF
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Build scripts
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>9.0
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>All
          </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>cmake
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>brooks@freebsd.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>In LLVM 8.0.0, support was added for Z3.  In the FreeBSD port (think package)
we added -DCLANG_ANALYZER_ENABLE_Z3_SOLVER=OFF to the cmake arguments list to
avoid requiring it.  Somewhere between the 8.0 and 9.0 branch, that stopped
being sufficient and libz3 is being found and FileCheck is being linked to it. 
On some of our platforms where our base compiler is still an ancient GCC, this
is posing a bootstrapping challenge.

Here's an example ldd output (it seems to me that FileCheck may simply be being
overlinked):
$ ldd work/stage/usr/local/bin/FileCheck90 
work/stage/usr/local/bin/FileCheck90:
        libthr.so.3 => /lib/libthr.so.3 (0x80089d000)
        libz.so.6 => /lib/libz.so.6 (0x800ac5000)
        librt.so.1 => /usr/lib/librt.so.1 (0x800cdd000)
        libexecinfo.so.1 => /usr/lib/libexecinfo.so.1 (0x800ee3000)
        libncurses.so.8 => /lib/libncurses.so.8 (0x8010e6000)
        libm.so.5 => /lib/libm.so.5 (0x80133b000)
        libz3.so.0 => /usr/local/lib/libz3.so.0 (0x801600000)
        libc++.so.1 => /usr/lib/libc++.so.1 (0x802a9c000)
        libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x802d6a000)
        libc.so.7 => /lib/libc.so.7 (0x802f89000)
        libelf.so.2 => /lib/libelf.so.2 (0x803345000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x80355c000)</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>