Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Frank_R_1
Beginner
286 Views

boost 1.75.0 intel oneApi 2021.2.0 problem

Hi,

the following code does not compile

a.cxx

###########

#include <boost/asio.hpp>

int main() {
return 0;
}

 

icl.exe -IN:/development/incubation/boost/1.75.0/WINDOWS64_VC14/include -Qdiag-error=47,61,68,140,147,167,172,265,266,300,476,556,592,879,1011,1736 -Qdiag-disable=82,193,383,504,869,981,1738,1744,1879,2012,2013,2014,2015,2017,2021,2022,2025,2027,2047,2048,2259,2289,2304,2305,3280,3346,3457,11074,11075 -Qstd=c++17 a.cxx
Intel(R) C++ Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.2.0 Build 20210228_000000
Copyright (C) 1985-2021 Intel Corporation. All rights reserved.

a.cxx
Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately. For example:
- add -D_WIN32_WINNT=0x0601 to the compiler command line; or
- add _WIN32_WINNT=0x0601 to your project's Preprocessor Definitions.
Assuming _WIN32_WINNT=0x0601 (i.e. Windows 7 target).
N:/development/incubation/boost/1.75.0/WINDOWS64_VC14/include/boost/asio/detail/win_iocp_overlapped_ptr.hpp(158): error: no instance of overloaded function "asio_query_fn::impl::operator()" matches the argument list
argument types are: (const boost::asio::io_context::executor_type, const boost::asio::execution::detail::context_t<0>)
object type is: const asio_query_fn::impl
return &boost::asio::query(ex, execution::context).impl_;
^
N:/development/incubation/boost/1.75.0/WINDOWS64_VC14/include/boost/asio/query.hpp(226): note: this candidate was rejected because at least one template argument could not be deduced
operator()(
^
N:/development/incubation/boost/1.75.0/WINDOWS64_VC14/include/boost/asio/query.hpp(212): note: this candidate was rejected because at least one template argument could not be deduced
operator()(
^
N:/development/incubation/boost/1.75.0/WINDOWS64_VC14/include/boost/asio/query.hpp(195): note: this candidate was rejected because at least one template argument could not be deduced
operator()(
^

compilation aborted for a.cxx (code 2)

 

 

Best regards

Frank

0 Kudos
9 Replies
AbhishekD_Intel
Moderator
250 Views

Hi Frank,


Thanks for reaching out to us.

Please give us your environment details where you are getting the errors.

Also, give us the complete error logs so as to get more clarity on your issue.



Warm Regards,

Abhishek


Frank_R_1
Beginner
246 Views

Hi,

setup:

Windows 10 64bit enterprise

Intel oneApi 2021.2.0 C++ classic

Boost 1.75.0

Visual Studio 2019 16.9.3

 

Frank

Frank_R_1
Beginner
243 Views

Hi,

the error is in the original post.

On RHEL 7.9, devtoolset-9, and Intel oneApi 2021.2.0 and Boost 1.75.0 it works.

Frank

AbhishekD_Intel
Moderator
209 Views

Hi Frank,


Thanks for the details. We are also able to reproduce the same set of errors on the Windows10 system. We are looking into this issue internally.

Meanwhile, you can also try compiling the same code with the ICX compiler.



Warm Regards,

Abhishek


Viet_H_Intel
Moderator
197 Views

Hi Frank,


Would a.cxx be compiled successfully with cl? Can you please try and give us the output of?

>cl.exe -IN:/development/incubation/boost/1.75.0/WINDOWS64_VC14/include /c /W0 /std:c++17 a.cxx

Thanks,



Frank_R_1
Beginner
161 Views

cl.exe -IN:/development/incubation/boost/1.75.0/WINDOWS64_VC14/include -c -W0 -std:c++17 a.cxx
Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29914 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

a.cxx
Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately. For example:
- add -D_WIN32_WINNT=0x0601 to the compiler command line; or
- add _WIN32_WINNT=0x0601 to your project's Preprocessor Definitions.
Assuming _WIN32_WINNT=0x0601 (i.e. Windows 7 target).
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.28.29910\include\ostream(257): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.28.29910\include\ostream(250): note: while compiling class template member function 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(unsigned short)'
N:/development/incubation/boost/1.75.0/WINDOWS64_VC14/include\boost/asio/ip/detail/impl/endpoint.ipp(188): note: see reference to function template instantiation 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(unsigned short)' being compiled
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.28.29910\include\istream(711): note: see reference to class template instantiation 'std::basic_ostream<char,std::char_traits<char>>' being compiled
N:/development/incubation/boost/1.75.0/WINDOWS64_VC14/include\boost/asio/basic_socket_iostream.hpp(144): note: see reference to class template instantiation 'std::basic_iostream<char,std::char_traits<char>>' being compiled
N:/development/incubation/boost/1.75.0/WINDOWS64_VC14/include\boost/asio/basic_socket_iostream.hpp(395): note: see reference to class template instantiation 'boost::asio::basic_socket_iostream<Protocol,Clock,WaitTraits>' being compiled

 

Frank_R_1
Beginner
159 Views

Hi,

icx does compile it:

'/c/Program Files (x86)/Intel/oneAPI/compiler/2021.2.0/windows/bin/icx.exe' -IN:/development/incubation/boost/1.75.0/WINDOWS64_VC14/include -c -W0 -Qstd:c++17 a.cxx
Intel(R) oneAPI DPC++/C++ Compiler for applications running on Intel(R) 64, Version 2021.2.0 Build 20210317
Copyright (C) 1985-2021 Intel Corporation. All rights reserved.

Viet_H_Intel
Moderator
115 Views

Hi Frank,


Can you provide us a preprocessed file?

icl.exe -IN:/development/incubation/boost/1.75.0/WINDOWS64_VC14/include /E /W0 /std:c++17 a.cxx >test.cxx


Thanks,


Frank_R_1
Beginner
105 Views

Hi,

here is the output!

 

Frank

Reply