<div dir="rtl"><div dir="ltr">Try to build without checking out compiler-rt, check out only llvm and clang.</div><div dir="ltr"><br></div><div dir="ltr"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div dir="ltr">2016-03-29 6:55 GMT+03:00 Edward Diener via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span>:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">When I try to build the latest llvm/clang on Windows with mingw-64/gcc-5.3 I get a slew of errors:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[4/1059] Building C object projects/co...file-i386.dir/InstrProfilingUtil.c.obj<br>
FAILED: C:\Utilities\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\bin\gcc<br>
.exe  -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MA<br>
CROS -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-missing-field-initializ<br>
ers -pedantic -Wno-long-long -Wno-comment -Wall -O3  -Iprojects/compiler-rt/lib/<br>
profile -IE:/Programming/VersionControl/llvm/projects/compiler-rt/lib/profile -I<br>
include -IE:/Programming/VersionControl/llvm/include    -UNDEBUG  -m32 -DCOMPILE<br>
R_RT_HAS_ATOMICS=1 -MMD -MT projects/compiler-rt/lib/profile/CMakeFiles/clang_rt<br>
.profile-i386.dir/InstrProfilingUtil.c.obj -MF projects/compiler-rt/lib/profile/<br>
CMakeFiles/clang_rt.profile-i386.dir/InstrProfilingUtil.c.obj.d -o projects/comp<br>
iler-rt/lib/profile/CMakeFiles/clang_rt.profile-i386.dir/InstrProfilingUtil.c.ob<br>
j   -c E:/Programming/VersionControl/llvm/projects/compiler-rt/lib/profile/Instr<br>
ProfilingUtil.c<br>
E:/Programming/VersionControl/llvm/projects/compiler-rt/lib/profile/InstrProfili<br>
ngUtil.c:21:25: fatal error: sys/utsname.h: No such file or directory<br>
compilation terminated.<br>
[4/1059] Building C object projects/co..._rt.profile-i386.dir/WindowsMMap.c.obj<br>
FAILED: C:\Utilities\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\bin\gcc<br>
.exe  -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MA<br>
CROS -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-missing-field-initializ<br>
ers -pedantic -Wno-long-long -Wno-comment -Wall -O3  -Iprojects/compiler-rt/lib/<br>
profile -IE:/Programming/VersionControl/llvm/projects/compiler-rt/lib/profile -I<br>
include -IE:/Programming/VersionControl/llvm/include    -UNDEBUG  -m32 -DCOMPILE<br>
R_RT_HAS_ATOMICS=1 -MMD -MT projects/compiler-rt/lib/profile/CMakeFiles/clang_rt<br>
.profile-i386.dir/WindowsMMap.c.obj -MF projects/compiler-rt/lib/profile/CMakeFi<br>
les/clang_rt.profile-i386.dir/WindowsMMap.c.obj.d -o projects/compiler-rt/lib/pr<br>
ofile/CMakeFiles/clang_rt.profile-i386.dir/WindowsMMap.c.obj   -c E:/Programming<br>
/VersionControl/llvm/projects/compiler-rt/lib/profile/WindowsMMap.c<br>
E:/Programming/VersionControl/llvm/projects/compiler-rt/lib/profile/WindowsMMap.<br>
c: In function 'mmap':<br>
E:/Programming/VersionControl/llvm/projects/compiler-rt/lib/profile/WindowsMMap.<br>
c:42:3: error: unknown type name 'DWORD'<br>
   DWORD flProtect;<br>
   ^<br>
E:/Programming/VersionControl/llvm/projects/compiler-rt/lib/profile/WindowsMMap.<br>
c:45:19: error: 'PAGE_EXECUTE_READWRITE' undeclared (first use in this function)<br>
<br>
       flProtect = PAGE_EXECUTE_READWRITE;<br>
                   ^<br>
E:/Programming/VersionControl/llvm/projects/compiler-rt/lib/profile/WindowsMMap.<br>
c:45:19: note: each undeclared identifier is reported only once for each functio<br>
n it appears in<br>
E:/Programming/VersionControl/llvm/projects/compiler-rt/lib/profile/WindowsMMap.<br>
c:47:19: error: 'PAGE_READWRITE' undeclared (first use in this function)<br>
       flProtect = PAGE_READWRITE;<br>
                   ^<br>
E:/Programming/VersionControl/llvm/projects/compiler-rt/lib/profile/WindowsMMap.<br>
c:50:19: error: 'PAGE_EXECUTE_READ' undeclared (first use in this function)<br>
       flProtect = PAGE_EXECUTE_READ;<br>
                   ^<br>
E:/Programming/VersionControl/llvm/projects/compiler-rt/lib/profile/WindowsMMap.<br>
c:52:19: error: 'PAGE_EXECUTE' undeclared (first use in this function)<br>
       flProtect = PAGE_EXECUTE;<br>
                   ^<br>
E:/Programming/VersionControl/llvm/projects/compiler-rt/lib/profile/WindowsMMap.<br>
c:54:17: error: 'PAGE_READONLY' undeclared (first use in this function)<br>
     flProtect = PAGE_READONLY;<br>
</blockquote>
<br>
etc. etc.<br>
<br>
Previous builds of llvm/clang with mingw-64/gcc on Windows worked fine.<br>
<br>
Any ideas why this got broken and what is needed to fix it so I can build the latest clang on Windows with gcc ?<br>
<br>
I use CMake to configure and generate the build using ninja with gcc as the compiler, and then I use ninja to kick off the build.<br>
<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>