[swift-users] Compile error trying to follow Swift for Windows MSVC instructions

Eric Wing ewmailing at gmail.com
Tue Nov 28 12:00:38 CST 2017


On 11/14/17, Saleem Abdulrasool <compnerd at compnerd.org> wrote:
> I’ve not used the MSVC build mode very much.  I suspect that this is a name
> lookup failure and needs a namespace qualification.  I’ll look into
> tweaking that when I’m near a computer.  In the mean time, I recommend
> using the cross-compile or possibly trying with clang-cl.
>

Thank you for the response.
I installed the nightly build of LLVM for Windows (64-bit) and tried clang-cl.


The compile got stuck building LLVM/Clang in step 6 of the
instructions. The error is pasted below. Any idea how to fix this?


Also, are there any deeper instructions on the cross-compiling
instructions? This is all very foreign to me for Windows since the
usual workflow is around Visual Studio. Reading the fist step shows
the keyword "export", which is not a valid keyword in the Windows
cmd.exe. So I'm already missing a lot of needed context.

Thanks,
Eric



[252/2299] Building CXX object
tools\clang\lib\DirectoryWa...keFiles\clangDirectoryWatcher.dir\DirectoryWatcher.cpp.obj
FAILED: tools/clang/lib/DirectoryWatcher/CMakeFiles/clangDirectoryWatcher.dir/DirectoryWatcher.cpp.obj
C:\LLVM64\bin\clang-cl.exe  /nologo -DGTEST_HAS_RTTI=0 -DUNICODE
-D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS
-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS
-D_DEBUG_POINTER_IMPL="" -D_GNU_SOURCE -D_HAS_EXCEPTIONS=0
-D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-Itools\clang\lib\DirectoryWatcher
-IC:\Source\SWIFT\llvm\tools\clang\lib\DirectoryWatcher
-IC:\Source\SWIFT\llvm\tools\clang\include -Itools\clang\include
-Iinclude -IC:\Source\SWIFT\llvm\include
-fms-compatibility-version=19.00 -Z7 /Zc:inline /Zc:strictStrings /Oi
/Zc:rvalueCast /Brepro -Wall -W -Wno-unused-parameter -Wwrite-strings
-Wcast-qual -Wmissing-field-initializers -Wcovered-switch-default
-Wdelete-non-virtual-dtor -Wstring-conversion /MD /O1 /Ob1   -UNDEBUG
/EHs-c- /GR- /showIncludes
/Fotools\clang\lib\DirectoryWatcher\CMakeFiles\clangDirectoryWatcher.dir\DirectoryWatcher.cpp.obj
/Fdtools\clang\lib\DirectoryWatcher\CMakeFiles\clangDirectoryWatcher.dir\clangDirectoryWatcher.pdb
-c C:\Source\SWIFT\llvm\tools\clang\lib\DirectoryWatcher\DirectoryWatcher.cpp
In file included from
C:\Source\SWIFT\llvm\tools\clang\lib\DirectoryWatcher\DirectoryWatcher.cpp:13:
In file included from
C:\Source\SWIFT\llvm\tools\clang\include\clang/DirectoryWatcher/DirectoryWatcher.h:17:
C:\Source\SWIFT\llvm\tools\clang\include\clang/Index/IndexDataStore.h(41,5):
 error: unknown type name 'timespec'
    timespec ModTime;
    ^
C:\Source\SWIFT\llvm\tools\clang\include\clang/Index/IndexDataStore.h(74,5):
 error: unknown type name 'timespec'
    timespec ModTime;
    ^
2 errors generated.
[254/2299] Building CXX object
tools\clang\lib\Tooling\Refactor\CMakeFiles\clangToolingRefactor.dir\TypeUtils.cpp.obj
ninja: build stopped: subcommand failed.


More information about the swift-users mailing list