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

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

GitHub user felixbuenemann opened a pull request:

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

    TS-4397: Fix build on i386 caused by type mismatch

    It seems lua_Integer is 32-Bit on i386 while it's 54-Bit on x86-64 causing 
the existing code to fail with:
    
    ```
    metrics.cc: In function ‘bool metrics_binding_initialize(BindingInstance&)’:
    metrics.cc:339:58: error: call of overloaded ‘bind_constant(const char 
[20], int64_t)’ is ambiguous
       binding.bind_constant("metrics.update.pass", int64_t(0));
    ```
    
    See [Bug TS-4397](https://issues.apache.org/jira/browse/TS-4397) for more 
info.

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

    $ git pull https://github.com/felixbuenemann/trafficserver TS-4397

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

    https://github.com/apache/trafficserver/pull/607.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 #607
    
----
commit 9cf86f300d525d1feb41b07afc9b87b44b6c7ec9
Author: Felix Bünemann <[email protected]>
Date:   2016-04-30T06:09:24Z

    Fix build on i386 caused by type mismatch
    
    It seems lua_Integer is 32-Bit on i386 while it's 54-Bit on x86-64
    causing the existing code to fail with:
    
    metrics.cc: In function ‘bool metrics_binding_initialize(BindingInstance&)’:
    metrics.cc:339:58: error: call of overloaded ‘bind_constant(const char 
[20], int64_t)’ is ambiguous
       binding.bind_constant("metrics.update.pass", int64_t(0));

----


> Build on i386 fails due to lua_Integer type mismatch in traffic_manager 
> metrics
> -------------------------------------------------------------------------------
>
>                 Key: TS-4397
>                 URL: https://issues.apache.org/jira/browse/TS-4397
>             Project: Traffic Server
>          Issue Type: Bug
>            Reporter: Felix Buenemann
>
> Currently building master at 4c3fe2aac5e6b45839238b4ae207dff798939e61 fails, 
> because a call to bind_constant in metrics.cc uses int64_t type casting 
> instead of the correct lua_Integer type.
> This causes the following compile error on i386:
>  {noformat}
> metrics.cc: In function ‘bool metrics_binding_initialize(BindingInstance&)’:
> metrics.cc:339:58: error: call of overloaded ‘bind_constant(const char [20], 
> int64_t)’ is ambiguous
>    binding.bind_constant("metrics.update.pass", int64_t(0));
>                                                           ^
> metrics.cc:339:58: note: candidates are:
> In file included from metrics.cc:29:0:
> ../../lib/bindings/bindings.h:44:8: note: bool 
> BindingInstance::bind_constant(const char*, lua_Integer)
>    bool bind_constant(const char *name, lua_Integer value);
>         ^
> ../../lib/bindings/bindings.h:45:8: note: bool 
> BindingInstance::bind_constant(const char*, const char*)
>    bool bind_constant(const char *name, const char *value);
>         ^
> {noformat}
> I have identified the problem and will provide a pull request on GitHub.



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

Reply via email to