<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=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Segoe UI";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
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;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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 lang=EN-CA link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hello,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I have been trying to build the SVN trunk head revision of LLVM/Clang in order to use the latest static analyzer. I have reinstalled the latest MinGW/MSYS with GCC 4.8.1 and updated all components. I am using the Cmake build tools to build LLVM/Clang. I have CMake 2.8.10.2 installed. Cmake generates build files for MSYS Makefiles.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>When I run make everything seems to go well until it tries to link liblibclang (at about 91% of the build I believe). This link fails with an APPCRASH error being caught by Windows (ld.exe has stopped working…). The problem details reported by Windows 7 are:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='text-autospace:none'><b><span style='font-size:9.0pt;font-family:"Segoe UI","sans-serif";color:#0066CC'>Problem signature:<o:p></o:p></span></b></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Segoe UI","sans-serif";color:black'>  Problem Event Name:                        APPCRASH<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Segoe UI","sans-serif";color:black'>  Application Name:                             ld.exe<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Segoe UI","sans-serif";color:black'>  Application Version:                           0.0.0.0<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Segoe UI","sans-serif";color:black'>  Application Timestamp:                     5222b8a9<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Segoe UI","sans-serif";color:black'>  Fault Module Name:                          ld.exe<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Segoe UI","sans-serif";color:black'>  Fault Module Version:                        0.0.0.0<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Segoe UI","sans-serif";color:black'>  Fault Module Timestamp:                  5222b8a9<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Segoe UI","sans-serif";color:black'>  Exception Code:                                  c0000005<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Segoe UI","sans-serif";color:black'>  Exception Offset:                                00034d98<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Segoe UI","sans-serif";color:black'>  OS Version:                                          6.1.7601.2.1.0.256.48<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Segoe UI","sans-serif";color:black'>  Locale ID:                                             4105<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Segoe UI","sans-serif";color:black'>  Additional Information 1:                  7151<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Segoe UI","sans-serif";color:black'>  Additional Information 2:                  7151a73bf833b82e616f341fb6bc2635<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Segoe UI","sans-serif";color:black'>  Additional Information 3:                  7b98<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Segoe UI","sans-serif";color:black'>  Additional Information 4:                  7b98c89d9ec70855f86cad8f1de194c2<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>When I select “close the program” I get the following error report:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>collect2.exe: error: ld returned 5 exit status<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Which causes the build to fail. I have attached a copy of the verbose output of the link command as out2.txt. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>This appears to be an access violation problem with ld.exe from MInGW. Has anyone built the head of LLVM/Clang using the latest MinGW tools? Is this a known problem with the current MinGW? Is there a work around to get this link to succeed?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Since I had successfully built an older version of LLVM/Clang with and older version of MinGW (4.7.2 if my memory is correct), I tried to build the last release version, release 3.3, of LLVM/Clang using the same MinGW 4.8.1 and Cmake. This time I get a compiler error attached as error.txt while building clangBasic.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The name _stat64i32 is defined in the file stat.h included from MinGW/include/sys/stat.h. It looks like FileManager.h is declaring these functions before stat.h is included, and then FileManager.cpp is defining them after stat.h is included which causes the stat type to be replaced by _stat64i32 by macro definitions. I don’t see how this is supposed to work. Again is this a known problem with release 3.3 and MInGW? <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I noticed that the signature of this function has been changed in head revision to use a type FileData instead of the struct stat directly, so perhaps this problem has been addressed already. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Any insight anyone can provide will be greatly appreciated. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='mso-fareast-language:EN-CA'>--<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-CA'>Dennis Cote<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-CA'>Harding Instruments<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-CA'>780-462-7100 x34<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>