[build][wave][thread][date-time] 1.65.0 clang on Windows build failures
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?
On 08/28/17 15:20, Konstantin Ivlev via Boost wrote:
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?
The Boost.DateTime part should be fixed by this PR: https://github.com/boostorg/date_time/pull/45
thanks, Andrey, I have tried updated Boost.DateTime and it works like a
charm!
by the way, I have just filled two additional pool requests to address
similar problem with Boost.Thread:
https://github.com/boostorg/winapi/pull/44 (this is trivial one just to add
WaitForSingleObjectEx/WaitForMultipleObjectsEx)
https://github.com/boostorg/thread/pull/140
can someone take a look at them?
2017-08-29 0:23 GMT+07:00 Andrey Semashev via Boost
On 08/28/17 15:20, Konstantin Ivlev via Boost wrote:
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?
The Boost.DateTime part should be fixed by this PR:
https://github.com/boostorg/date_time/pull/45
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman /listinfo.cgi/boost
okay, I was able to compile almost everything, here is the status update
1. I've filled an issue against Boost.Wave
https://svn.boost.org/trac10/ticket/13183 (for some reason Boost.Wave
doesn't have GitHub issues as other repositories)
2. Boost.Thread was able to successfully compile
with -DBOOST_USE_WINDOWS_H=1 as MarcelRaad suggested in GitHub issue
comment. however, I am leaving my PR opened for now, because it still may
be useful to switch Boost.Thread to WinAPI, I am not sure
3. I've filled new PR against Boost.SmartPtr
https://github.com/boostorg/smart_ptr/pull/41
4. there is an issue with Boost.Log about "alignas", but I don't know how
to fix it https://github.com/boostorg/log/issues/38
any help is appreciated
2017-08-31 14:58 GMT+07:00 Konstantin Ivlev
thanks, Andrey, I have tried updated Boost.DateTime and it works like a charm! by the way, I have just filled two additional pool requests to address similar problem with Boost.Thread: https://github.com/boostorg/winapi/pull/44 (this is trivial one just to add WaitForSingleObjectEx/WaitForMultipleObjectsEx) https://github.com/boostorg/thread/pull/140
can someone take a look at them?
2017-08-29 0:23 GMT+07:00 Andrey Semashev via Boost
:
On 08/28/17 15:20, Konstantin Ivlev via Boost wrote:
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?
The Boost.DateTime part should be fixed by this PR:
https://github.com/boostorg/date_time/pull/45
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman /listinfo.cgi/boost
okay, I was able to compile almost everything, here is the status update 1. I've filled an issue against Boost.Wave https://svn.boost.org/trac10/ticket/13183 (for some reason Boost.Wave doesn't have GitHub issues as other repositories)
Sorry, it's enabled now: https://github.com/boostorg/wave/issues, I also created a new ticket from the trac ticket you created. Regards Hartmut --------------- http://boost-spirit.com http://stellar.cct.lsu.edu
2. Boost.Thread was able to successfully compile with -DBOOST_USE_WINDOWS_H=1 as MarcelRaad suggested in GitHub issue comment. however, I am leaving my PR opened for now, because it still may be useful to switch Boost.Thread to WinAPI, I am not sure 3. I've filled new PR against Boost.SmartPtr https://github.com/boostorg/smart_ptr/pull/41 4. there is an issue with Boost.Log about "alignas", but I don't know how to fix it https://github.com/boostorg/log/issues/38 any help is appreciated
2017-08-31 14:58 GMT+07:00 Konstantin Ivlev
: thanks, Andrey, I have tried updated Boost.DateTime and it works like a charm! by the way, I have just filled two additional pool requests to address similar problem with Boost.Thread: https://github.com/boostorg/winapi/pull/44 (this is trivial one just to add WaitForSingleObjectEx/WaitForMultipleObjectsEx) https://github.com/boostorg/thread/pull/140
can someone take a look at them?
2017-08-29 0:23 GMT+07:00 Andrey Semashev via Boost
:
On 08/28/17 15:20, Konstantin Ivlev via Boost wrote:
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?
The Boost.DateTime part should be fixed by this PR:
https://github.com/boostorg/date_time/pull/45
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman /listinfo.cgi/boost
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (3)
-
Andrey Semashev
-
Hartmut Kaiser
-
Konstantin Ivlev