[cfe-dev] Problem building latest llvm/clang on Windows using gcc-5.3
Yaron Keren via cfe-dev
cfe-dev at lists.llvm.org
Mon Mar 28 22:44:06 PDT 2016
Try to build without checking out compiler-rt, check out only llvm and
clang.
2016-03-29 6:55 GMT+03:00 Edward Diener via cfe-dev <cfe-dev at lists.llvm.org>
:
> When I try to build the latest llvm/clang on Windows with mingw-64/gcc-5.3
> I get a slew of errors:
>
> [4/1059] Building C object
>> projects/co...file-i386.dir/InstrProfilingUtil.c.obj
>> FAILED:
>> C:\Utilities\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\bin\gcc
>> .exe -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
>> -D__STDC_LIMIT_MA
>> CROS -Wall -W -Wno-unused-parameter -Wwrite-strings
>> -Wno-missing-field-initializ
>> ers -pedantic -Wno-long-long -Wno-comment -Wall -O3
>> -Iprojects/compiler-rt/lib/
>> profile
>> -IE:/Programming/VersionControl/llvm/projects/compiler-rt/lib/profile -I
>> include -IE:/Programming/VersionControl/llvm/include -UNDEBUG -m32
>> -DCOMPILE
>> R_RT_HAS_ATOMICS=1 -MMD -MT
>> projects/compiler-rt/lib/profile/CMakeFiles/clang_rt
>> .profile-i386.dir/InstrProfilingUtil.c.obj -MF
>> projects/compiler-rt/lib/profile/
>> CMakeFiles/clang_rt.profile-i386.dir/InstrProfilingUtil.c.obj.d -o
>> projects/comp
>>
>> iler-rt/lib/profile/CMakeFiles/clang_rt.profile-i386.dir/InstrProfilingUtil.c.ob
>> j -c
>> E:/Programming/VersionControl/llvm/projects/compiler-rt/lib/profile/Instr
>> ProfilingUtil.c
>>
>> E:/Programming/VersionControl/llvm/projects/compiler-rt/lib/profile/InstrProfili
>> ngUtil.c:21:25: fatal error: sys/utsname.h: No such file or directory
>> compilation terminated.
>> [4/1059] Building C object
>> projects/co..._rt.profile-i386.dir/WindowsMMap.c.obj
>> FAILED:
>> C:\Utilities\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\bin\gcc
>> .exe -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
>> -D__STDC_LIMIT_MA
>> CROS -Wall -W -Wno-unused-parameter -Wwrite-strings
>> -Wno-missing-field-initializ
>> ers -pedantic -Wno-long-long -Wno-comment -Wall -O3
>> -Iprojects/compiler-rt/lib/
>> profile
>> -IE:/Programming/VersionControl/llvm/projects/compiler-rt/lib/profile -I
>> include -IE:/Programming/VersionControl/llvm/include -UNDEBUG -m32
>> -DCOMPILE
>> R_RT_HAS_ATOMICS=1 -MMD -MT
>> projects/compiler-rt/lib/profile/CMakeFiles/clang_rt
>> .profile-i386.dir/WindowsMMap.c.obj -MF
>> projects/compiler-rt/lib/profile/CMakeFi
>> les/clang_rt.profile-i386.dir/WindowsMMap.c.obj.d -o
>> projects/compiler-rt/lib/pr
>> ofile/CMakeFiles/clang_rt.profile-i386.dir/WindowsMMap.c.obj -c
>> E:/Programming
>> /VersionControl/llvm/projects/compiler-rt/lib/profile/WindowsMMap.c
>>
>> E:/Programming/VersionControl/llvm/projects/compiler-rt/lib/profile/WindowsMMap.
>> c: In function 'mmap':
>>
>> E:/Programming/VersionControl/llvm/projects/compiler-rt/lib/profile/WindowsMMap.
>> c:42:3: error: unknown type name 'DWORD'
>> DWORD flProtect;
>> ^
>>
>> E:/Programming/VersionControl/llvm/projects/compiler-rt/lib/profile/WindowsMMap.
>> c:45:19: error: 'PAGE_EXECUTE_READWRITE' undeclared (first use in this
>> function)
>>
>> flProtect = PAGE_EXECUTE_READWRITE;
>> ^
>>
>> E:/Programming/VersionControl/llvm/projects/compiler-rt/lib/profile/WindowsMMap.
>> c:45:19: note: each undeclared identifier is reported only once for each
>> functio
>> n it appears in
>>
>> E:/Programming/VersionControl/llvm/projects/compiler-rt/lib/profile/WindowsMMap.
>> c:47:19: error: 'PAGE_READWRITE' undeclared (first use in this function)
>> flProtect = PAGE_READWRITE;
>> ^
>>
>> E:/Programming/VersionControl/llvm/projects/compiler-rt/lib/profile/WindowsMMap.
>> c:50:19: error: 'PAGE_EXECUTE_READ' undeclared (first use in this
>> function)
>> flProtect = PAGE_EXECUTE_READ;
>> ^
>>
>> E:/Programming/VersionControl/llvm/projects/compiler-rt/lib/profile/WindowsMMap.
>> c:52:19: error: 'PAGE_EXECUTE' undeclared (first use in this function)
>> flProtect = PAGE_EXECUTE;
>> ^
>>
>> E:/Programming/VersionControl/llvm/projects/compiler-rt/lib/profile/WindowsMMap.
>> c:54:17: error: 'PAGE_READONLY' undeclared (first use in this function)
>> flProtect = PAGE_READONLY;
>>
>
> etc. etc.
>
> Previous builds of llvm/clang with mingw-64/gcc on Windows worked fine.
>
> Any ideas why this got broken and what is needed to fix it so I can build
> the latest clang on Windows with gcc ?
>
> 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.
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160329/aeef2aed/attachment.html>
More information about the cfe-dev
mailing list