[fusion] trouble building boost fusion with Intel compiler on Windows and Linux

Hello, We are having trouble building boost_fusion version 1.61 with Intel compiler (version 17.0) on Linux, and on Windows with vs2015 (and other versions of visual studio). The problem can be fixed if I made this change to boost/fusion/container/vector/detail/config.hpp : // Sometimes, MSVC 12 shows compile error with std::size_t of template parameter . #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1800)) \ || BOOST_INTEL /* add this line */ # if defined(BOOST_FUSION_HAS_VARIADIC_VECTOR) # undef BOOST_FUSION_HAS_VARIADIC_VECTOR # endif #endif Symptom on Windows: ile ..\..\..\bin.v2\libs\fusion\test\fold.test\cc848a939769f1f7cf08091b8a228ddb\algorithm\fold.obj.rsp "algorithm\fold.cpp" -Fo"..\..\..\bin.v2\libs\fusion\test\fold.test\cc848a939769f1f7cf08091b8a228ddb\algorithm\fold.obj" -TP /Z7 /Od /Ob0 /W3 /GR /MDd /Zc:forScope /Zc:wchar_t /nologo /Qwn5 /Qwd985 -Qoption,c,--arg_dep_lookup /Qvc14 -Qpchi- /wd4675 /EHs -c -DBOOST_ALL_NO_LIB=1 "-I..\..\.." compile-c-c++ ..\..\..\bin.v2\libs\fusion\test\fold.test\cc848a939769f1f7cf08091b8a228ddb\algorithm\fold.obj icl @"..\..\..\bin.v2\libs\fusion\test\fold.test\cc848a939769f1f7cf08091b8a228ddb\algorithm\fold.obj.rsp" fold.cpp ../../../boost/fusion/container/vector/vector.hpp(71): error: namespace "boost::fusion::vector_detail::result_of" has no member "value_at_c" : boost::is_convertible<Sequence, typename result_of::value_at_c<This, 0>::type> ^ detected during: instantiation of class "boost::fusion::vector_detail::is_convertible_to_first<Sequence, This, <unnamed>> [with Sequence=int, This=boost::fusion::vector<int>, <unnamed>=1]" at line 305 instantiation of "boost::fusion::vector<T...>::vector(U &&...) [with T=<int>, U=<int>]" at line 159 of "algorithm\fold.cpp" Symptom on Linux: The original failure on Linux (zip.test in boost_fusion) "icpc" -c -xc++ -O0 -g -w1 -inline-level=0 -fPIC -m64 -DBOOST_ALL_NO_LIB=1 -I"../../.." -c -o "../../../bin.v2/libs/fusion/test/zip.test/intl-lnx/dbg/algorithm/zip.o" "algorithm/zip.cpp" ../../../boost/fusion/container/vector/vector.hpp(230): error: pack "U" does not have the same number of elements as "I" : store<I, T>(std::forward<U>(var))... ^ detected during: instantiation of "boost::fusion::vector_detail::vector_data<boost::fusion::detail::index_sequence<I...>, T...>::vector_data(boost::fusion::vector_detail::each_elem, U &&...) [with I=<0UL, 1UL>, T=<boost::fusion::vector_iterator<const boost::fusion::vector<int, int>, 0>, boost::fusion::vector_iterator<const boost::fusion::vector<char, char>, 0>>, U=<const boost::fusion::transform_view<const boost::fusion::vector<const boost::fusion::vector<int, int> &, const boost::fusion::vector<char, char> &>, boost::fusion::detail::poly_begin, boost::fusion::void_> &>]" at line 306 instantiation of "boost::fusion::vector<T...>::vector(U &&...) [with T=<boost::fusion::vector_iterator<const boost::fusion::vector<int, int>, 0>, boost::fusion::vector_iterator<const boost::fusion::vector<char, char>, 0>>, U=<const boost::fusion::transform_view<const boost::fusion::vector<const boost::fusion::vector<int, int> &, const boost::fusion::vector<char, char> &>, boost::fusion::detail::poly_begin, boost::fusion::void_> &>]" at line 41 of "../../../boost/fusion/view/zip_view/zip_view_iterator.hpp" Thanks and regards, Melanie Blower (I work for Intel on the Intel C++ compiler)

We are having trouble building boost_fusion version 1.61 with Intel compiler (version 17.0) on Linux, and on Windows with vs2015 (and other versions of visual studio).
The problem can be fixed if I made this change to boost/fusion/container/vector/detail/config.hpp :
// Sometimes, MSVC 12 shows compile error with std::size_t of template parameter . #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1800)) \ || BOOST_INTEL /* add this line */ # if defined(BOOST_FUSION_HAS_VARIADIC_VECTOR) # undef BOOST_FUSION_HAS_VARIADIC_VECTOR # endif #endif `BOOST_WORKAROUND(BOOST_INTEL, BOOST_TESTED_AT(xxxx))` is preferred in
Hi Blower, Thank you for reporting. On 11/04/2016 11:27 PM, Blower, Melanie wrote: this case (replace xxxx to known to fail version number, like 1700). However, I can't test because I have no intel compiler on any platform. So, it is great if you open a pull-request, https://github.com/boostorg/fusion/pulls . Thanks, Kohei Takahashi

-----Original Message----- From: Boost [mailto:boost-bounces@lists.boost.org] On Behalf Of Kohei Takahashi
However, I can't test because I have no intel compiler on any platform.
If you are interested in testing their Boost library with the Intel compiler, please send me an email directly and I can assist in arranging for a noncommercial license. Melanie dot blower at intel dot com.
So, it is great if you open a pull-request, https://github.com/boostorg/fusion/pulls . I will see about this, thanks for the suggestion.
Best regards, Melanie Blower

On Fri, 4 Nov 2016 14:27:01 +0000 "Blower, Melanie" <melanie.blower@intel.com> wrote:
Hello,
We are having trouble building boost_fusion version 1.61 with Intel compiler (version 17.0) on Linux, and on Windows with vs2015 (and other versions of visual studio).
The problem can be fixed if I made this change to boost/fusion/container/vector/detail/config.hpp :
// Sometimes, MSVC 12 shows compile error with std::size_t of template parameter . #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1800)) \ || BOOST_INTEL /* add this line */ # if defined(BOOST_FUSION_HAS_VARIADIC_VECTOR) # undef BOOST_FUSION_HAS_VARIADIC_VECTOR # endif #endif
Symptom on Windows: ile ..\..\..\bin.v2\libs\fusion\test\fold.test\cc848a939769f1f7cf08091b8a228ddb\algorithm\fold.obj.rsp "algorithm\fold.cpp" -Fo"..\..\..\bin.v2\libs\fusion\test\fold.test\cc848a939769f1f7cf08091b8a228ddb\algorithm\fold.obj" -TP /Z7 /Od /Ob0 /W3 /GR /MDd /Zc:forScope /Zc:wchar_t /nologo /Qwn5 /Qwd985 -Qoption,c,--arg_dep_lookup /Qvc14 -Qpchi- /wd4675 /EHs -c -DBOOST_ALL_NO_LIB=1 "-I..\..\.." compile-c-c++ ..\..\..\bin.v2\libs\fusion\test\fold.test\cc848a939769f1f7cf08091b8a228ddb\algorithm\fold.obj
icl @"..\..\..\bin.v2\libs\fusion\test\fold.test\cc848a939769f1f7cf08091b8a228ddb\algorithm\fold.obj.rsp"
fold.cpp ../../../boost/fusion/container/vector/vector.hpp(71): error: namespace "boost::fusion::vector_detail::result_of" has no member "value_at_c" : boost::is_convertible<Sequence, typename result_of::value_at_c<This, 0>::type> ^ detected during: instantiation of class "boost::fusion::vector_detail::is_convertible_to_first<Sequence, This, <unnamed>> [with Sequence=int, This=boost::fusion::vector<int>, <unnamed>=1]" at line 305 instantiation of "boost::fusion::vector<T...>::vector(U &&...) [with T=<int>, U=<int>]" at line 159 of "algorithm\fold.cpp"
Symptom on Linux: The original failure on Linux (zip.test in boost_fusion)
"icpc" -c -xc++ -O0 -g -w1 -inline-level=0 -fPIC -m64 -DBOOST_ALL_NO_LIB=1 -I"../../.." -c -o "../../../bin.v2/libs/fusion/test/zip.test/intl-lnx/dbg/algorithm/zip.o" "algorithm/zip.cpp"
../../../boost/fusion/container/vector/vector.hpp(230): error: pack "U" does not have the same number of elements as "I" : store<I, T>(std::forward<U>(var))... ^ detected during: instantiation of "boost::fusion::vector_detail::vector_data<boost::fusion::detail::index_sequence<I...>, T...>::vector_data(boost::fusion::vector_detail::each_elem, U &&...) [with I=<0UL, 1UL>, T=<boost::fusion::vector_iterator<const boost::fusion::vector<int, int>, 0>, boost::fusion::vector_iterator<const boost::fusion::vector<char, char>, 0>>, U=<const boost::fusion::transform_view<const char>boost::fusion::vector<const boost::fusion::vector<int, int> &, char>const boost::fusion::vector<char, char> &>, char>boost::fusion::detail::poly_begin, boost::fusion::void_> &>]" at char>line 306 instantiation of "boost::fusion::vector<T...>::vector(U char>&&...) [with T=<boost::fusion::vector_iterator<const char>boost::fusion::vector<int, int>, 0>, char>boost::fusion::vector_iterator<const boost::fusion::vector<char, char>char>, 0>>, U=<const boost::fusion::transform_view<const char>char>boost::fusion::vector<const boost::fusion::vector<int, int> char>char>&, const boost::fusion::vector<char, char> &>, char>char>boost::fusion::detail::poly_begin, boost::fusion::void_> char>char>&>]" at line 41 of char>char>"../../../boost/fusion/view/zip_view/zip_view_iterator.hpp"
Thanks and regards, Melanie Blower (I work for Intel on the Intel C++ compiler)
This is disabling variadic vector (which hopefully compiles faster) for all versions of the Intel compiler. This might be the easiest way to fix it since no one has has access to that compiler. I also wanted to mention: - The master branch has numerous updates that should be in Boost 1.63. I think the second case is fixed but its difficult with such little context. - Try `#include <boost/fusion/sequence/intrinsic/value_at.hpp>` before any other includes to fusion for the first issue. The preprocessor output for clang is showing that the required struct is being included very indirectly, so there might be something different on that configuration that is dropping it. Also, the master branch might be worth testing - it uses the tag-dispatched specialization directly so that the `value_at` header never has to be included. Lee

-----Original Message----- From: Boost [mailto:boost-bounces@lists.boost.org] On Behalf Of Lee Clagett
This is disabling variadic vector (which hopefully compiles faster) for all versions of the Intel compiler. This might be the easiest way to fix it since no one has has access to that compiler. I also wanted to mention:
- The master branch has numerous updates that should be in Boost 1.63. I think the second case is fixed but its difficult with such little context. - Try `#include <boost/fusion/sequence/intrinsic/value_at.hpp>` before any other includes to fusion for the first issue. The preprocessor output for clang is showing that the required struct is being included very indirectly, so there might be something different on that configuration that is dropping it. Also, the master branch might be worth testing - it uses the tag-dispatched specialization directly so that the `value_at` header never has to be included.
Thanks for the suggestion, we will try this. Incidentally, usually when I am debugging a boost compilation problem on Windows, I generate the preprocessed output with cl.exe and then try to compile that with the Intel compiler. If this compilation is successful then my conclusion is that the boost macro settings are "wrong" for the Intel compiler, and I try to make changes which adjust the setting of the boost macro's until the settings matches the Microsoft compiler. In this case, the Microsoft compiler (vs2015) had a #undef which was missing for us. When I added it in, the Intel compilation passed as well. Best regards, Melanie Blower
participants (3)
-
Blower, Melanie
-
Kohei Takahashi
-
Lee Clagett