Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Program fails to compile after including header : <boost/process.hpp> #92

Open
kkumar45 opened this issue Jun 26, 2019 · 7 comments
Open

Comments

@kkumar45
Copy link

kkumar45 commented Jun 26, 2019

I am facing an issue while upgrading to Boost 1.70.0. There are many files in my project that includes <boost/process.hpp>.

I have written a program that demonstrates the problem.

#include <boost/process.hpp>

int main()
{
    return 0;
}

Compilation line :
g++ -std=c++14 test_process.hpp -Iboost_1_70_0 -DBOOST_ASIO_ENABLE_OLD_SERVICES

My program fails to compile with below error:

In file included from boost_1_70_0/boost/process/detail/async_handler.hpp:16:0,
                 from boost_1_70_0/boost/process/async_system.hpp:23,
                 from boost_1_70_0/boost/process.hpp:24,
                 from test_process.hpp:1:
boost_1_70_0/boost/process/detail/posix/asio_fwd.hpp:33:46: error: conflicting declaration ‘typedef class boost::asio::basic_signal_set<boost::asio::signal_set_service> boost::asio::signal_set’
 typedef basic_signal_set<signal_set_service> signal_set;
                                              ^~~~~~~~~~
In file included from boost_1_70_0/boost/process/detail/posix/sigchld_service.hpp:12:0,
                 from boost_1_70_0/boost/process/detail/posix/io_context_ref.hpp:20,
                 from boost_1_70_0/boost/process/async.hpp:42,
                 from boost_1_70_0/boost/process.hpp:23,
                 from test_process.hpp:1:
boost_1_70_0/boost/asio/signal_set.hpp:25:28: note: previous declaration as ‘typedef class boost::asio::basic_signal_set<> boost::asio::signal_set’
 typedef basic_signal_set<> signal_set;
                            ^~~~~~~~~~
In file included from boost_1_70_0/boost/process/detail/async_handler.hpp:16:0,
                 from boost_1_70_0/boost/process/async_system.hpp:23,
                 from boost_1_70_0/boost/process.hpp:24,
                 from test_process.hpp:1:
boost_1_70_0/boost/process/detail/posix/asio_fwd.hpp:50:60: error: conflicting declaration ‘typedef class boost::asio::posix::basic_stream_descriptor<boost::asio::posix::stream_descriptor_service> boost::asio::posix::stream_descriptor’
 typedef basic_stream_descriptor<stream_descriptor_service> stream_descriptor;
                                                            ^~~~~~~~~~~~~~~~~
In file included from boost_1_70_0/boost/process/detail/posix/async_pipe.hpp:11:0,
                 from boost_1_70_0/boost/process/async_pipe.hpp:18,
                 from boost_1_70_0/boost/process/detail/posix/async_in.hpp:16,
                 from boost_1_70_0/boost/process/async.hpp:43,
                 from boost_1_70_0/boost/process.hpp:23,
                 from test_process.hpp:1:
boost_1_70_0/boost/asio/posix/stream_descriptor.hpp:30:35: note: previous declaration as ‘typedef class boost::asio::posix::basic_stream_descriptor<> boost::asio::posix::stream_descriptor’
 typedef basic_stream_descriptor<> stream_descriptor;
@kkumar45
Copy link
Author

kkumar45 commented Jul 4, 2019

Can anyone reproduce it?

@klemens-morgenstern
Copy link
Collaborator

I updated boost.process to work woth the current asio interface and dropped support for the old classes. Well at least my forward declarations don't support that, maybe the easiest one is to just comment them out.

@kkumar45
Copy link
Author

Thanks

@kkumar45 kkumar45 reopened this Aug 7, 2019
@kkumar45
Copy link
Author

kkumar45 commented Aug 7, 2019

@klemens-morgenstern will this be fixed in next boost version ?

@HLXEasy
Copy link

HLXEasy commented Oct 4, 2020

Any news on this? Stumbling into the same issue if I try to compile with 1.73 on a Mac. Same code with 1.68.0_1 builds without issues.

@klemens-morgenstern
Copy link
Collaborator

There were some more asio Api changes we adapted. I hope that fixed the issue by now.

@HLXEasy
Copy link

HLXEasy commented Oct 6, 2020

@klemens-morgenstern Thx for the response! So that's on release 1.74 I assume? Need to check, if/when homebrew-boost get's updated then...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants