Opened 10 years ago

Closed 10 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 10 years ago.
Documentation fix

Download all attachments as: .zip

Change History (8)

comment:1 by viboes, 10 years ago

Milestone: Boost 1.52.0To Be Determined
Owner: changed from Anthony Williams to viboes
Status: newassigned

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 by viboes, 10 years ago

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

in reply to:  2 ; comment:3 by Ivan A. Melnikov <iv@…>, 10 years ago

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.

in reply to:  3 comment:4 by viboes, 10 years ago

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 by viboes, 10 years ago

Milestone: To Be DeterminedBoost 1.52.0

by viboes, 10 years ago

Attachment: 7336.patch added

Documentation fix

comment:6 by viboes, 10 years ago

Committed in trunk revision [80459].

comment:7 by viboes, 10 years ago

Resolution: fixed
Status: assignedclosed

Committed revision 80516.

Note: See TracTickets for help on using tickets.