<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - MESA checks on configure for llvm 3.4.2 and fails to build with 3.4.2 being installed"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=81785">81785</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>MESA checks on configure for llvm 3.4.2 and fails to build with 3.4.2 being installed
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>major
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>darkvision@gmx.eu
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>git
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Mesa core
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I have LLVM 3.4.2 installed but mesa-git/configure fails to build and requests
llvm >= 3.4.2 to be installed.

configure seem to check for LLVM_VERSION_PATCH in llvm/Config/config.h but that
isn't defined and therefore LLVM_VERSION_PATCH is set to "0".
The LLVM_REQUIRED_VERSION_PATCH is set to "2" and thus the compare of
LLVM_VERSION_PATCH=0 vs.LLVM_REQUIRED_VERSION_PATCH=2 will fail.

This is the code that failes:

if ac_fn_c_compute_int "$LINENO" "LLVM_VERSION_PATCH" "LLVM_VERSION_PATCH"
"#include \"${LLVM_INCLUDEDIR}/llvm/Config/config.h\""; then :
else
  LLVM_VERSION_PATCH=0
fi

and

radeon_llvm_check() {
    if test "x$enable_gallium_llvm" != "xyes"; then
        as_fn_error $? "--enable-gallium-llvm is required when building $1"
"$LINENO" 5
    fi
    LLVM_REQUIRED_VERSION_MAJOR="3"
    LLVM_REQUIRED_VERSION_MINOR="4"
    LLVM_REQUIRED_VERSION_PATCH="2"
    if test "${LLVM_VERSION_INT}${LLVM_VERSION_PATCH}" -lt
"${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}${LLVM_REQUIRED_VERSION_PATCH}";
then
        as_fn_error $? "LLVM
$LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR.$LLVM_REQUIRED_VERSION_PATCH
or newer is required for $1" "$LINENO" 5
    fi</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>