<div dir="ltr">Thanks everyone. <div>I was able to compile it using the instructions Jose sent from this page: <a href="http://mesa3d.org/llvmpipe.html">http://mesa3d.org/llvmpipe.html</a>.</div><div>However, I believe there's a typo in that page. In the text I've pasted below, the highlighted RELEASE should be DEBUG.</div><div><br></div><div>Thanks again,</div><div> Shervin</div><div><br></div><div><br></div><div><span style="color:rgb(0,0,0);font-family:'Lucida Grande',Geneva,Arial,Verdana,sans-serif;font-size:14px">For Windows you will need to build LLVM from source with MSVC or MINGW (either natively or through cross compilers) and CMake, and set the LLVM environment variable to the directory you installed it to. LLVM will be statically linked, so when building on MSVC it needs to be built with a matching CRT as Mesa, and you'll need to pass -DLLVM_USE_CRT_<span style="background-color:rgb(255,255,0)">RELEASE</span>=MTd for debug and checked builds, -DLLVM_USE_CRT_RELEASE=MTd for profile and release builds. You can build only the x86 target by passing -DLLVM_TARGETS_TO_BUILD=X86 to cmake.</span><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 10, 2015 at 1:21 AM, Predut, Marius <span dir="ltr"><<a href="mailto:marius.predut@intel.com" target="_blank">marius.predut@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal">Try to make local changes and remove this from file:<u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:navy">#if</span><span style="font-size:10.0pt;font-family:"Courier New";color:silver">
</span><span style="font-size:10.0pt;font-family:"Courier New"">defined<span style="color:black">(</span>_MSC_VER<span style="color:black">)</span><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:olive">static</span><span style="font-size:10.0pt;font-family:"Courier New";color:silver">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:olive">double</span><span style="font-size:10.0pt;font-family:"Courier New";color:silver">
</span><span style="font-size:10.0pt;font-family:"Courier New"">copysign<span style="color:black">(</span><span style="color:olive">double</span><span style="color:silver">
</span>x<span style="color:black">,</span><span style="color:silver"> </span><span style="color:olive">double</span><span style="color:silver">
</span>y<span style="color:black">)<u></u><u></u></span></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";color:black">…<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:navy">#endif<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:navy">It needs because vs 2013 has his own copysign function as standard api and then back here<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">marius<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Shervin Sharifi [mailto:<a href="mailto:shervin0@gmail.com" target="_blank">shervin0@gmail.com</a>]
<br>
<b>Sent:</b> Thursday, April 09, 2015 8:45 PM<br>
<b>To:</b> Predut, Marius<br>
<b>Cc:</b> <a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<b>Subject:</b> Re: [Mesa-dev] Problem with LLVM on Windows with MSVC<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Thank you. <u></u><u></u></p>
<div>
<p class="MsoNormal">I have compiled llvm with /MDd options, but Mesa doesn't accept that and asks for /MTd.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">So I compiled llvm with /MTd and it worked.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">However, I prefer to change Mesa to dynamic option, but I don't know how to do that. I tried the following, but got another error:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The only thing I found is this in the scons\gallium.py:<u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"> if env['platform'] == 'windows' and msvc:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> # Choose the appropriate MSVC CRT<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> # <a href="http://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx" target="_blank">
http://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> if env['build'] in ('debug', 'checked'):<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> env.Append(CCFLAGS = ['/MTd'])<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> env.Append(SHCCFLAGS = ['/LDd'])<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> else:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> env.Append(CCFLAGS = ['/MT'])<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> env.Append(SHCCFLAGS = ['/LD'])<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I changed the /MTd to /MDd and compiled. I got the following error, so I'm not sure if this is the right way of doing it. <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">src\glsl\ir_constant_expression.cpp(57) : error C2491: 'copysign' : definition of dllimport function not allowed<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks, <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> Shervin<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">P.S. You're right Marius. It was a typo. I missed the i at the end when copying the command line ("gd" instead of "gdi"). <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Thu, Apr 9, 2015 at 9:42 AM, Predut, Marius <<a href="mailto:marius.predut@intel.com" target="_blank">marius.predut@intel.com</a>> wrote:<u></u><u></u></p>
<div>
<div>
<p>Indeed seems you have some incompatible libraries (one build static and other dynamic –dll)<u></u><u></u></p>
<p><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=732124" target="_blank">https://bugzilla.mozilla.org/show_bug.cgi?id=732124</a><u></u><u></u></p>
<p>but what suppose `libgl-gd' target? Is this a typo mismatch?<u></u><u></u></p>
<p>Try to build llvm in a dynamic mode , may be it will solve your problems<u></u><u></u></p>
<p> <u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">marius</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> mesa-dev [mailto:<a href="mailto:mesa-dev-bounces@lists.freedesktop.org" target="_blank">mesa-dev-bounces@lists.freedesktop.org</a>]
<b>On Behalf Of </b>Shervin Sharifi<br>
<b>Sent:</b> Thursday, April 09, 2015 2:57 AM<br>
<b>To:</b> <a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<b>Subject:</b> [Mesa-dev] Problem with LLVM on Windows with MSVC</span><u></u><u></u></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> I'm trying to build mesa on windows (MSVC) with gles support and with llvm.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> Here are the keys I'm using:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">scons.py gles=yes llvm=yes platform=windows libgl-gd<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> I'm getting a bunch of errors like this:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">LLVMCore.lib(ValueSymbolTable.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in mesa.lib(uniform_query.obj)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">I understand that this is due to mismatch between the runtime libraries, but I don't know how to fix it.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Should I change the CRT in llvm or in mesa? How should I do that? <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> Thanks, <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> Shervin <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>
</blockquote></div><br></div>