<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 --- - LLVM 3.2 fails to link with Mesa 9.0.2 on Windows; missing link libraries"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=61299">61299</a>
          </td>
        </tr>

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

        <tr>
          <th>Summary</th>
          <td>LLVM 3.2 fails to link with Mesa 9.0.2 on Windows; missing link libraries
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Windows (All)
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>keith.kriewall@attachmate.com
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86 (IA32)
          </td>
        </tr>

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

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

        <tr>
          <th>Component</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Linking of Mesa 9.0.2 with LLVM 3.2 fails with unresolved external symbol:

LLVMJIT.lib(JITMemoryManager.obj) : error LNK2019: unresolved external symbol
"p
ublic: virtual __thiscall
llvm::RTDyldMemoryManager::~RTDyldMemoryManager(void)"
 (??1RTDyldMemoryManager@llvm@@UAE@XZ) referenced in function "public: virtual
_
_thiscall llvm::JITMemoryManager::~JITMemoryManager(void)"
(??1JITMemoryManager@
llvm@@UAE@XZ)

The problem appears to be that the link library list in
\Mesa-9.0.2\scons\llvm.py is missing two LLVM libraries (LLVMRuntimeDyld and
LLVMObject).

Workaround is to modify llvm.py at line 95 to read:

        if llvm_version >= distutils.version.LooseVersion('3.0'):
            # 3.0
            env.Prepend(LIBS = [
                'LLVMBitWriter', 'LLVMX86Disassembler', 'LLVMX86AsmParser',
                'LLVMX86CodeGen', 'LLVMX86Desc', 'LLVMSelectionDAG',
                'LLVMAsmPrinter', 'LLVMMCParser', 'LLVMX86AsmPrinter',
                'LLVMX86Utils', 'LLVMX86Info', 'LLVMJIT',
                'LLVMExecutionEngine', 'LLVMCodeGen', 'LLVMScalarOpts',
                'LLVMInstCombine', 'LLVMTransformUtils', 'LLVMipa',
                'LLVMAnalysis', 'LLVMTarget', 'LLVMMC', 'LLVMCore',
                'LLVMSupport', 'LLVMRuntimeDyld', 'LLVMObject'
            ])</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>