<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        color:black;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The test is expecting clang-cl (the VS-compatible driver) to complain about the /TP option and having a .lib file passed as input, when the command line also
 specifies /c (compilation only, no linking).  But clang-cl is not behaving as expected, it is happily producing a command to run the linker.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Sorry I don't have any idea what could cause this behavior, I know almost nothing about that driver.  Somebody else will have to offer a suggestion.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">--paulr<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></a></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";color:windowtext">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> barbara [mailto:barbara@copperspice.com]
<br>
<b>Sent:</b> Thursday, May 07, 2015 12:40 PM<br>
<b>To:</b> Robinson, Paul<br>
<b>Cc:</b> cfe-dev@cs.uiuc.edu Developers<br>
<b>Subject:</b> Re: [cfe-dev] Clang unit test failure / Windows<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">I am unsure if I ran this correctly as llvm-lit is a Python script. I passed the name of the first test which failed, Driver/cl-inputs.c. The following is the last part of the output. The first 14 Commands passed.<br>
<br>
Sorry, but I have no idea what the problem is. I really wish I did.  I willing to try any test you might be able to suggest.
<br>
<br>
Barbara<br>
<br>
<br>
Command 15: "D:/clang/build64_r/./bin\FileCheck.EXE" "-check-prefix=TPlib" "D:\clang\llvm\tools\clang\test\Driver\cl-inputs.c"<br>
Command 15 Result: 1<br>
Command 15 Output:<br>
<br>
Command 15 Stderr:<br>
D:\clang\llvm\tools\clang\test\Driver\cl-inputs.c:38:11: error: expected string not found in input<br>
<br>
// TPlib: warning: cl-test.lib: 'linker' input unused<br>
<br>
          ^<br>
<br>
<stdin>:1:1: note: scanning from here<br>
<br>
clang version 3.6.0 (tags/RELEASE_360/final)<br>
<br>
^<br>
<br>
<stdin>:5:33: note: possible intended match here<br>
<br>
 "link.exe" "-out:/.exe" "-nologo" "c:/" "cl-test.lib"<br>
<br>
                                ^<br>
--<br>
<br>
********************<br>
Testing Time: 0.41s<br>
********************<br>
Failing Tests (1):<br>
    Clang :: Driver/cl-inputs.c<br>
<br>
  Unexpected Failures: 1<br>
<br>
<br>
<br>
<br>
On 5/7/2015 7:54 AM, Robinson, Paul wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">The "make clang-test" should have given you a report listing the filenames of the tests that failed.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">In the same directory where you find the clang that you just built, there should also be a program named llvm-lit.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">If you run that llvm-lit with an argument that is the filename of one of the tests that failed, it should run just that test. With the –v option you will also
 get more details about why it failed.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">(The name you pass to llvm-lit needs to be a proper path relative to your current directory, i.e. if "dir path\to\test" works, then "my-build-dir\llvm-lit path\to\test"
 should also work.)</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">HTH</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">--paulr</span><o:p></o:p></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";color:windowtext">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
<a href="mailto:cfe-dev-bounces@cs.uiuc.edu">cfe-dev-bounces@cs.uiuc.edu</a> [<a href="mailto:cfe-dev-bounces@cs.uiuc.edu">mailto:cfe-dev-bounces@cs.uiuc.edu</a>]
<b>On Behalf Of </b>barbara<br>
<b>Sent:</b> Thursday, May 07, 2015 8:35 AM<br>
<b>To:</b> Yaron Keren<br>
<b>Cc:</b> <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a> Developers<br>
<b>Subject:</b> Re: [cfe-dev] Clang unit test failure / Windows</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Good to know there should not be any errors running the clang-tests.  I am worried that since I do not have VS installed clang is depending on some specific MS header or dll.
<br>
<br>
Sadly, I am not a clang expert and there are so many test failing that I am not sure which one to run. All I could find was "make clang-test".  If someone can give me just a hint of how to run a specific test maybe I can post the result?
<br>
<br>
<br>
Barbara<br>
<br>
<br>
<br>
<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">I see no unexpected failures. With that many tests failing, it's very likely all fail for the same reason, so please try running any of the failing tests with -v argument and looking into why it fails.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">2015-05-07 8:29 GMT+03:00 barbara <<a href="mailto:barbara@copperspice.com" target="_blank">barbara@copperspice.com</a>>:<o:p></o:p></p>
</div>
<blockquote style="border-top:none;border-left:solid #CCCCCC 1.0pt;border-bottom:none;border-right:solid #CCCCCC 1.0pt;padding:0in 6.0pt 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:4.8pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I tried building again from scratch and had to restart make three times. This time I did not alter either of the two makefiles. I am bewildered why there would be issues with the generated makefiles. This seems
 likes an issue. <br>
<br>
Clang built, but again there are 268 clang-test failures.  I checked and msys is the first entry in my path. I am very confused and sadly since so many tests fail I have no idea where to start looking.  I am guessing you have zero "unexpected failures"?
<br>
<br>
Is there anything else you or someone can suggest? I know this should work so there has to be some set up, cmake, or make problem I am missing.
<br>
<span style="color:#888888"><br>
<br>
<span class="hoenzb">Barbara</span><br>
<br>
<br>
</span><o:p></o:p></p>
</div>
<div>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal">I am running the clang and LLVM tests. There is also a buildbot running them after every revision.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">That MSYS should work. My experience was that you need to run make twice but not edit any file.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">My guess is that you may have a non-msys grep or other utility on the PATH before the msys bin dir so it runs instead.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Try to put the msys/bin as the first directory in the PATH and restart the command window.<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">You can try running one of the failing tests with -v argument and looking into why it fails.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal">The bug tracker is at<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">  <a href="https://llvm.org/bugs/" target="_blank">https://llvm.org/bugs/</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">if you can provide a patch (fix) for the build problem please do. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">2015-05-05 23:31 GMT+03:00 barbara <<a href="mailto:barbara@copperspice.com" target="_blank">barbara@copperspice.com</a>>:<o:p></o:p></p>
</div>
<blockquote style="border-top:none;border-left:solid #CCCCCC 1.0pt;border-bottom:none;border-right:solid #CCCCCC 1.0pt;padding:0in 6.0pt 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:4.8pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal">Yaron, <br>
<br>
I am using MSYS which I downloaded from here:<br>
<a href="https://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/" target="_blank">https://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/</a><br>
<br>
I do not believe this is MSYS2. Is there a difference and if so, could this be my entire issues?<br>
  <br>
Have you built clang and run the "clang-tests" on Windows?  <br>
<br>
Is there anyone in clang development that would be interested in the erroneous make files and the Windows problems? I would be fine submitting bug reports if I knew this might be worked on.  If someone can advise me which bug tracker to use I will gladly post
 something. <br>
<br>
Thanks, <br>
<br>
Barbara <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><br>
<br>
<br>
On 5/5/2015 9:54 AM, Yaron Keren wrote:<o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal">I have seen the export problem. As you say it resolved itself after restarting the make. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">You need mingw gcc 4.8 at least. mingw-w64 and all tools versions sounds OK.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">compiler-rt not required. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Are you using MSYS2 for the shell functionality?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">2015-05-05 20:42 GMT+03:00 barbara <<a href="mailto:barbara@copperspice.com" target="_blank">barbara@copperspice.com</a>>:<o:p></o:p></p>
</div>
<blockquote style="border-top:none;border-left:solid #CCCCCC 1.0pt;border-bottom:none;border-right:solid #CCCCCC 1.0pt;padding:0in 6.0pt 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:4.8pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal">Yaron,<br>
<br>
Thanks for your response. Unfortunately this did not resolve the issue.<br>
<br>
I am extremely confused and unable to find the correct combination to build libclang.dll and libclang.dll.a for for Windows 32-bit and Windows 64-bit.  There are multiple sets of directions and sadly they do not agree with each other.
<br>
<br>
I have tried the -G "Unix MakeFiles",   <span style="font-family:"Helvetica","sans-serif"">
-G "MSYS Makefiles" ,  and -G "Mingw Makefiles"  </span>so far.  All three produce the dll and .a files.
<br>
<br>
a)    However, the build requires hand changes to two makefiles due to backslash problems.  I am unable to find out if this is a know bug or not.<br>
<br>
b)    The build crashes around 98% saying it is unable to find the libclang-exports. If I restart the build it completes successfully. This feels like a dependency order problem.
<br>
<br>
c)    After building, no matter which cmake setup I use, the "make clang-test" fails with just over 260 Unexpected Failures. Is there any known problem with these tests on Windows?<br>
<br>
<br>
I need a version of clang which is not compiled with MSVC.  I have tried gcc 4.7.2 and gcc 4.8.1 (MinGW-W64).  I am using Python 2.7.9. CMake version 3.2.2 and GNU Make 3.82.90. 
<br>
<br>
On some sets of the instructions there is an indication I need to install compiler-rt, which I have not done.  This was not required for the very simple build on Debian which worked flawlessly.  Is this required?
<br>
<br>
I was told clang is being supported on Windows so I strongly believe some combination of what I am doing is not correct and I am out of ideas. I am grateful for any suggestions, ideas, or information about how to build clang and have this work.
<br>
<span style="color:#888888"><br>
<br>
Barbara</span> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><br>
<br>
<br>
On 5/4/2015 7:16 PM, Yaron Keren wrote:<o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal">Hi<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">1 Use  -G "Unix Makefiles"<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">2 Do not use MSYS 2, lots of the tests fail.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Yaron<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">2015-05-05 5:50 GMT+03:00 barbara <<a href="mailto:barbara@copperspice.com" target="_blank">barbara@copperspice.com</a>>:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-family:"Helvetica","sans-serif"">I downloaded clang 3.6 and built on Windows Vista using MinGW 4.8.1 and CMake 3.2.2<br>
<br>
1    ran: cmake -G "MSYS Makefiles" ../llvm<br>
<br>
2    There are two generated  make files which have backslash problems around line 54. These were simple to edit by hand however I believe this should not be required.<br>
<br>
(a)  tools/lto/CMakeFiles/LTO_exports.dir/build.make<br>
(b) tools/clang/tools/libclang/CMakeFiles/libclang_exports.dir/build.make<br>
<br>
3    clang builds, however it must be restarted a few times.<br>
<br>
4    After the build was done I ran clang-test and it failed with 269 unexpected failures.<br>
<br>
5    Linking libclang with our application appears to work. At run time, calling "clang_parseTranslationUnit2()" returns an extremely large number for the error code.<br>
<br>
I am happy to try any suggestions.</span><span style="font-family:"Helvetica","sans-serif";color:#888888"><br>
<br>
<br>
Barbara</span><o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</blockquote>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</blockquote>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</blockquote>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</blockquote>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>