Modify

Opened 5 years ago

Closed 5 years ago

#7336 closed Bugs (fixed)

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 (1)

7336.patch (4.3 KB) - added by viboes 5 years ago.
Documentation fix

Download all attachments as: .zip

Change History (8)

comment:1 Changed 5 years ago by viboes

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

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: Changed 5 years 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: Changed 5 years 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 5 years 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 5 years ago by viboes

  • Milestone changed from To Be Determined to Boost 1.52.0

Changed 5 years ago by viboes

Documentation fix

comment:6 Changed 5 years ago by viboes

Committed in trunk revision [80459].

comment:7 Changed 5 years ago by viboes

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

Committed revision 80516.

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain viboes.
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.