Hello,
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.
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:
Problem signature:
Problem Event Name: APPCRASH
Application Name: ld.exe
Application Version: 0.0.0.0
Application Timestamp: 5222b8a9
Fault Module Name: ld.exe
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 5222b8a9
Exception Code: c0000005
Exception Offset: 00034d98
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 4105
Additional Information 1: 7151
Additional Information 2: 7151a73bf833b82e616f341fb6bc2635
Additional Information 3: 7b98
Additional Information 4: 7b98c89d9ec70855f86cad8f1de194c2
When I select “close the program” I get the following error report:
collect2.exe: error: ld returned 5 exit status
Which causes the build to fail. I have attached a copy of the verbose output of the link command as out2.txt.
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?
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.
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?
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.
Any insight anyone can provide will be greatly appreciated.
Thanks.
out2.txt (9.27 KB)
error.txt (5.26 KB)