Subject: [boost] [build][wave][thread][date-time] 1.65.0 clang on Windows build failures
From: Konstantin Ivlev (tomskside_at_[hidden])
Date: 2017-08-28 12:20:56


Hi,

I am trying to compile boost 1.65.0 on Windows via clang 4.0.1 with the
following user-config.jam:
using clang : 4.0 :

 "C:/Program Files/LLVM/bin/clang.exe" :
 <compileflags>-fmsc-version=1910
 <ranlib>"C:/Program Files/LLVM/bin/llvm-ranlib.exe"
 <archiver>"C:/Program Files/LLVM/bin/llvm-ar.exe"
 <linkflags>-fuse-ld=lld ;

and there are few issues.

1. clang.jam ignores ranlib/archiver settings. currently there is the PR
https://github.com/boostorg/build/pull/232 against clang-darwin.jam, and I
suppose the same should be applied to the clang-linux.jam.

2. there are numerous errors in boost wave:
.\boost/wave/grammars/cpp_expression_grammar.hpp:829:18: error: case value
evaluates to -804257404, which cannot be narrowed to type 'unsigned int'
[-Wc++11-narrowing]
            case T_CPPCOMMENT: // contains newline

(about 100 errors of such kind for various enumerations)

3. WinAPI-related errors in boost::date_time & boost::thread, e.g.

In file included from libs\coroutine\src\windows\stack_traits.cpp:23:
In file included from .\boost/thread.hpp:13:
In file included from .\boost/thread/thread.hpp:12:
In file included from .\boost/thread/thread_only.hpp:15:
In file included from .\boost/thread/win32/thread_data.hpp:10:
In file included from .\boost/thread/thread_time.hpp:10:
In file included from .\boost/date_time/microsec_time_clock.hpp:23:
.\boost/date_time/filetime_functions.hpp:57:46: error: conflicting types
for 'GetSystemTimeAsFileTime'
        __declspec(dllimport) void __stdcall GetSystemTimeAsFileTime(FILETIME*
lpFileTime);
                                             ^
C:\Program Files (x86)\Windows
Kits\10\include\10.0.15063.0\um\sysinfoapi.h:159:1:
note: previous declaration is here
GetSystemTimeAsFileTime(
^

seems like stack_traits.cpp unconditionally includes windows.h,
while BOOST_USE_WINDOWS_H is not defined in case of clang build, so
filetime_functions.hpp defines its own WinAPI prototypes. probably shall be
somehow fixed in boost config?

any advice on how to proceed with these issues?