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

ASF GitHub Bot commented on TS-4560:
------------------------------------

GitHub user jpeach opened a pull request:

    https://github.com/apache/trafficserver/pull/720

    TS-4560: Fix C++ API shared_ptr detection.

    Since ink_autoconf.h is not installed, we can't use it to figure
    out which shared_ptr implementation to use. Further, Traffic Server
    might not have been built with the same toolchain that 3rd party
    plugins are using.
    
    Since shared_ptr is used in the C++ API headers, both Traffic Server
    and the plugins need to agree on which implementation to use. The
    best (but not perfect) solution is to hardcode it into the header
    file during the Traffic Server build. This means that both parties
    are consistent and any remaining problems could be attributed to
    C++ standard library compatibility.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jpeach/trafficserver fix/4560

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafficserver/pull/720.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #720
    
----
commit b9c29f62db44573e390a203123c864f71fdf935f
Author: James Peach <jpe...@apache.org>
Date:   2016-06-16T23:51:40Z

    TS-4560: Fix C++ API shared_ptr detection.
    
    Since ink_autoconf.h is not installed, we can't use it to figure
    out which shared_ptr implementation to use. Further, Traffic Server
    might not have been built with the same toolchain that 3rd party
    plugins are using.
    
    Since shared_ptr is used in the C++ API headers, both Traffic Server
    and the plugins need to agree on which implementation to use. The
    best (but not perfect) solution is to hardcode it into the header
    file during the Traffic Server build. This means that both parties
    are consistent and any remaining problems could be attributed to
    C++ standard library compatibility.

----


> C++ API should not depend on ink_autoconf.h
> -------------------------------------------
>
>                 Key: TS-4560
>                 URL: https://issues.apache.org/jira/browse/TS-4560
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: CPP API
>            Reporter: James Peach
>            Assignee: James Peach
>
> {{atscppapi/shared_ptr.h}} includes {{ink_autoconf.h}}. {{ink_autoconf.h}} is 
> not installed (and must not be installed). This makes it impossible for 
> people to consume the C++ API.
> It is totally reasonable IMHO to expect to be able to build plugins with a 
> different toolchain than Traffic Server was built with. Consider installing 
> {{devtoolset-3}} and building plugins against a distribution package, or 
> building plugins with clang. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to