[ 
https://issues.apache.org/jira/browse/LOGCXX-551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17517177#comment-17517177
 ] 

Robert Middleton commented on LOGCXX-551:
-----------------------------------------

{quote}I think this is because since Boost 1.55.0, this is no longer required
{quote}
So with PR #107, I have just discovered that this was because the version of 
CMake that was being used did not have the proper transitive dependencies on 
Boost, hence the failure.  So I'm pretty sure the check for all the 
components(thread chrono atomic) should fix that particular problem(I should be 
able to properly reproduce this now).
{quote}The CMake we use sets the default standard at C++14
{quote}
Have you tried building log4cxx with a C++14 standard?  That would not have 
shared_mutex, so it should fall back to boost at that point.  I think that 
would solve your problem, but without understanding the linker error that 
you're getting I'm not positive.  I would have expected you to get a compile 
failure if you need to compile your application with something older than C++17.

> CMake documented build option for Boost vs C++17 Implementation for 
> shared_mutex
> --------------------------------------------------------------------------------
>
>                 Key: LOGCXX-551
>                 URL: https://issues.apache.org/jira/browse/LOGCXX-551
>             Project: Log4cxx
>          Issue Type: Wish
>          Components: Build, Documentation
>    Affects Versions: 0.12.1
>            Reporter: Nicholas Clark
>            Assignee: Robert Middleton
>            Priority: Minor
>             Fix For: 0.13.0
>
>
> There was a recent approach to detecting if boost' implementation is needed, 
> but I feel that it is not succinct and cannot be when it comes to linker 
> issues. Referencing PR: 
> [https://github.com/apache/logging-log4cxx/pull/107.|https://github.com/apache/logging-log4cxx/pull/107]
> I have large applications that use shared_mutex, but require boost' 
> implementation as not all components linked are able to use C+\+17 
> implementation at this time. A problem occurs during linkage when log4cxx is 
> built using C+\+17's implementation but our other component is built using 
> boost' implementation.
>  
> *Workaround:*
> We currently can force cmake into using Boost' implementation by passing:
> {code:java}
> -DSTD_SHARED_MUTEX_FOUND=0{code}
> This isn't a documented 'feature'. I would like a documented approach to 
> this. If -DSTD_SHARED_MUTEX_FOUND=0 is what we should use for this feature 
> request, then it should be documented as such. I am putting forth this issue 
> as current usage is not documented as supported and thus I suspect it may be 
> lost in future commits.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to