Modify

Ticket #7336 (closed Bugs: fixed)

Opened 20 months ago

Last modified 20 months ago

BOOST_THREAD_DONT_USE_SYSTEM doesn't work.

Reported by: Ivan A. Melnikov <iv@…> Owned by: viboes
Milestone: Boost 1.52.0 Component: thread
Version: Boost 1.51.0 Severity: Problem
Keywords: Cc:

Description

Boost.Thread documentation says:

Boost.Thread uses by default Boost.System to define the exceptions. For backward compatibility and also for compilers that don't work well with Boost.System the user can define BOOST_THREAD_DONT_USE_SYSTEM .

But on my platform (ALT Linux x86_64, boost 1.51.0) I get the following include files chain:

   boost/thread/mutex.hpp ->
   boost/thread/pthread/mutex.hpp ->
   boost/thread/exceptions.hpp ->
   boost/system/system_error.hpp, boost/system/error_code.hpp

So I have to link with Boost.System, and it doesn't depend on how Boost.Thread was configured and build.

Attachments

7336.patch Download (4.3 KB) - added by viboes 20 months ago.
Documentation fix

Change History

comment:1 Changed 20 months ago by viboes

  • Owner changed from anthonyw to viboes
  • Status changed from new to assigned
  • Milestone changed from Boost 1.52.0 to To Be Determined

I'm sorry. I think that I wrote this documentation with the expectation that I would be nice to provide it and I didn't it at all.

I have take a look at the dependency and it will be quite complex to remove it for the next release. If I don't reach to remove the dependency for 1.52 I will remove this macro and state clearly that the dependency is needed.

There is an alternative that is to define the Boost.System undocumented BOOST_ERROR_CODE_HEADER_ONLY macro, but this is yet bugged (See #7347 duplicate symbol while BOOST_ERROR_CODE_HEADER_ONLY is defined).

comment:2 follow-up: ↓ 3 Changed 20 months ago by viboes

BTW, do you want to remove the dependency on Boost.System or the need to link with?

comment:3 in reply to: ↑ 2 ; follow-up: ↓ 4 Changed 20 months ago by Ivan A. Melnikov <iv@…>

Thank you for your answer and your work on this issue.

Replying to viboes:

BTW, do you want to remove the dependency on Boost.System or the need to link with?

To me, a clear statement that I have to link with Boost.System (or do whatever that library requires) to work with Boost.Thread is enough.

Also, BOOST_THREAD_DONT_USE_SYSTEM, if implemented, would be a switch that changes whole library ABI (exception types), which is scaring a bit.

comment:4 in reply to: ↑ 3 Changed 20 months ago by viboes

Replying to Ivan A. Melnikov <iv@…>:

Thank you for your answer and your work on this issue.

Replying to viboes:

BTW, do you want to remove the dependency on Boost.System or the need to link with?

To me, a clear statement that I have to link with Boost.System (or do whatever that library requires) to work with Boost.Thread is enough.

Great. I will fix the documentation.

Also, BOOST_THREAD_DONT_USE_SYSTEM, if implemented, would be a switch that changes whole library ABI (exception types), which is scaring a bit.

Yes, now that Boost.Thread uses Boost.Chrono and the interface for the exceptions and the error codes in futures follows the C++11 standard, disabling all this stuff will represent quite a lot of work without no clear gain.

In addition, removing the dependency to Boost.System implies removing the dependency to Boost.Chrono.

I hope that #7347 will be fixed soon so that the link to Boost.System and Boost.Chrono could be optional.

comment:5 Changed 20 months ago by viboes

  • Milestone changed from To Be Determined to Boost 1.52.0

Changed 20 months ago by viboes

Documentation fix

comment:6 Changed 20 months ago by viboes

Committed in trunk revision [80459].

comment:7 Changed 20 months ago by viboes

  • Status changed from assigned to closed
  • Resolution set to fixed

Committed revision 80516.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.