[jira] [Commented] (PROTON-554) pn_data_put_long call fails on 64x Linux 2.6.32-5-amd64

2014-04-17 Thread Denis Savrukov (JIRA)

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

Denis Savrukov commented on PROTON-554:
---

Rafael, everything works well now!!!

Thanks,
Denis

> pn_data_put_long call fails on 64x Linux 2.6.32-5-amd64
> ---
>
> Key: PROTON-554
> URL: https://issues.apache.org/jira/browse/PROTON-554
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: php-binding
>Affects Versions: 0.6
> Environment: Linux 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 
> x86_64 GNU/Linux
> PHP 5.4.26-1~dotdeb.0 (cli) (built: Mar  7 2014 08:58:03) 
> Copyright (c) 1997-2014 The PHP Group
> Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
> with Xdebug v2.2.4, Copyright (c) 2002-2014, by Derick Rethans
> with Suhosin v0.9.34-dev, Copyright (c) 2007-2012, by SektionEins GmbH
>Reporter: Denis Savrukov
>Assignee: Rafael H. Schloming
> Fix For: 0.7
>
> Attachments: qpid-proton-0.6-build-swig20.log, 
> qpid-proton-0.6-build.log, workaround.patch
>
>
> Fatal error: Type error in argument 2 of pn_data_put_long. Expected 
> SWIGTYPE_p_long_long



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (PROTON-554) pn_data_put_long call fails on 64x Linux 2.6.32-5-amd64

2014-04-16 Thread Rafael H. Schloming (JIRA)

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

Rafael H. Schloming commented on PROTON-554:


I've added a compat.swg with the macros from the workaround patch that gets 
conditionally included from php.i when older versions of swig are detected. 
This has fixed the issue in the environments where I have been able to 
reproduce it. I'm going to close this issue for now. Please let me know if it 
is still a problem for you.

> pn_data_put_long call fails on 64x Linux 2.6.32-5-amd64
> ---
>
> Key: PROTON-554
> URL: https://issues.apache.org/jira/browse/PROTON-554
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: php-binding
>Affects Versions: 0.6
> Environment: Linux 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 
> x86_64 GNU/Linux
> PHP 5.4.26-1~dotdeb.0 (cli) (built: Mar  7 2014 08:58:03) 
> Copyright (c) 1997-2014 The PHP Group
> Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
> with Xdebug v2.2.4, Copyright (c) 2002-2014, by Derick Rethans
> with Suhosin v0.9.34-dev, Copyright (c) 2007-2012, by SektionEins GmbH
>Reporter: Denis Savrukov
> Fix For: 0.7
>
> Attachments: qpid-proton-0.6-build-swig20.log, 
> qpid-proton-0.6-build.log, workaround.patch
>
>
> Fatal error: Type error in argument 2 of pn_data_put_long. Expected 
> SWIGTYPE_p_long_long



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (PROTON-554) pn_data_put_long call fails on 64x Linux 2.6.32-5-amd64

2014-04-15 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on PROTON-554:


Commit 1587715 from r...@apache.org in branch 'proton/trunk'
[ https://svn.apache.org/r1587715 ]

PROTON-554: candidate fix for long long support on older versions of swig

> pn_data_put_long call fails on 64x Linux 2.6.32-5-amd64
> ---
>
> Key: PROTON-554
> URL: https://issues.apache.org/jira/browse/PROTON-554
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: php-binding
>Affects Versions: 0.6
> Environment: Linux 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 
> x86_64 GNU/Linux
> PHP 5.4.26-1~dotdeb.0 (cli) (built: Mar  7 2014 08:58:03) 
> Copyright (c) 1997-2014 The PHP Group
> Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
> with Xdebug v2.2.4, Copyright (c) 2002-2014, by Derick Rethans
> with Suhosin v0.9.34-dev, Copyright (c) 2007-2012, by SektionEins GmbH
>Reporter: Denis Savrukov
> Attachments: qpid-proton-0.6-build-swig20.log, 
> qpid-proton-0.6-build.log, workaround.patch
>
>
> Fatal error: Type error in argument 2 of pn_data_put_long. Expected 
> SWIGTYPE_p_long_long



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (PROTON-554) pn_data_put_long call fails on 64x Linux 2.6.32-5-amd64

2014-04-14 Thread Rafael H. Schloming (JIRA)

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

Rafael H. Schloming commented on PROTON-554:


I've attached the workaround as a patch file for convenience. I'm not sure why 
the swig 2.0 based isn't working for you. The php support in swig 2.0 appears 
to be a good bit more complete, so ideally it would be nice to be able to use 
swig 2.0 directly rather than manually back porting the bits and pieces that 
are needed.

> pn_data_put_long call fails on 64x Linux 2.6.32-5-amd64
> ---
>
> Key: PROTON-554
> URL: https://issues.apache.org/jira/browse/PROTON-554
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: php-binding
>Affects Versions: 0.6
> Environment: Linux 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 
> x86_64 GNU/Linux
> PHP 5.4.26-1~dotdeb.0 (cli) (built: Mar  7 2014 08:58:03) 
> Copyright (c) 1997-2014 The PHP Group
> Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
> with Xdebug v2.2.4, Copyright (c) 2002-2014, by Derick Rethans
> with Suhosin v0.9.34-dev, Copyright (c) 2007-2012, by SektionEins GmbH
>Reporter: Denis Savrukov
> Attachments: qpid-proton-0.6-build-swig20.log, 
> qpid-proton-0.6-build.log, workaround.patch
>
>
> Fatal error: Type error in argument 2 of pn_data_put_long. Expected 
> SWIGTYPE_p_long_long



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (PROTON-554) pn_data_put_long call fails on 64x Linux 2.6.32-5-amd64

2014-04-14 Thread Rafael H. Schloming (JIRA)

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

Rafael H. Schloming commented on PROTON-554:


I managed to find a debian 6 environment and I can confirm seeing the same 
behaviour. I was able to work around it by backporting the following macros 
from swig 2.0:

Index: proton-c/bindings/php/php.i
===
--- proton-c/bindings/php/php.i (revision 1587223)
+++ proton-c/bindings/php/php.i (working copy)
@@ -22,7 +22,38 @@
 // provided by SWIG development libraries
 %include php.swg
 
+%define CONVERT_LONG_LONG_IN(lvar,t,invar)
+  switch ((*(invar))->type) {
+  case IS_DOUBLE:
+  lvar = (t) (*(invar))->value.dval;
+  break;
+  case IS_STRING: {
+  char * endptr;
+  errno = 0;
+  lvar = (t) strtoll((*(invar))->value.str.val, &endptr, 10);
+  if (*endptr && !errno) break;
+  /* FALL THRU */
+  }
+  default:
+  convert_to_long_ex(invar);
+  lvar = (t) (*(invar))->value.lval;
+  }
+%enddef
 
+%pass_by_val(long long, CONVERT_LONG_LONG_IN);
+
+%typemap(out) long long
+%{
+  if ((long long)LONG_MIN <= $1 && $1 <= (long long)LONG_MAX) {
+return_value->value.lval = (long)($1);
+return_value->type = IS_LONG;
+  } else {
+char temp[256];
+sprintf(temp, "%lld", (long long)$1);
+ZVAL_STRING(return_value, temp, 1);
+  }
+%}
+
 %header %{
 /* Include the headers needed by the code in this wrapper file */
 #include 


> pn_data_put_long call fails on 64x Linux 2.6.32-5-amd64
> ---
>
> Key: PROTON-554
> URL: https://issues.apache.org/jira/browse/PROTON-554
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: php-binding
>Affects Versions: 0.6
> Environment: Linux 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 
> x86_64 GNU/Linux
> PHP 5.4.26-1~dotdeb.0 (cli) (built: Mar  7 2014 08:58:03) 
> Copyright (c) 1997-2014 The PHP Group
> Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
> with Xdebug v2.2.4, Copyright (c) 2002-2014, by Derick Rethans
> with Suhosin v0.9.34-dev, Copyright (c) 2007-2012, by SektionEins GmbH
>Reporter: Denis Savrukov
> Attachments: qpid-proton-0.6-build-swig20.log, 
> qpid-proton-0.6-build.log
>
>
> Fatal error: Type error in argument 2 of pn_data_put_long. Expected 
> SWIGTYPE_p_long_long



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (PROTON-554) pn_data_put_long call fails on 64x Linux 2.6.32-5-amd64

2014-04-14 Thread Denis Savrukov (JIRA)

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

Denis Savrukov commented on PROTON-554:
---

Rafael? :) Is there something about the problem? Thanks!

> pn_data_put_long call fails on 64x Linux 2.6.32-5-amd64
> ---
>
> Key: PROTON-554
> URL: https://issues.apache.org/jira/browse/PROTON-554
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: php-binding
>Affects Versions: 0.6
> Environment: Linux 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 
> x86_64 GNU/Linux
> PHP 5.4.26-1~dotdeb.0 (cli) (built: Mar  7 2014 08:58:03) 
> Copyright (c) 1997-2014 The PHP Group
> Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
> with Xdebug v2.2.4, Copyright (c) 2002-2014, by Derick Rethans
> with Suhosin v0.9.34-dev, Copyright (c) 2007-2012, by SektionEins GmbH
>Reporter: Denis Savrukov
> Attachments: qpid-proton-0.6-build-swig20.log, 
> qpid-proton-0.6-build.log
>
>
> Fatal error: Type error in argument 2 of pn_data_put_long. Expected 
> SWIGTYPE_p_long_long



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (PROTON-554) pn_data_put_long call fails on 64x Linux 2.6.32-5-amd64

2014-04-10 Thread Denis Savrukov (JIRA)

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

Denis Savrukov commented on PROTON-554:
---

Rafael, 
qpid-proton-0.6-build-swig20.log - cproton built against SWIG 2.0
SWIG 2.0 we used - 
http://backports.debian.org/debian-backports/pool/main/s/swig2.0/swig2.0_2.0.7-2~bpo60+1.dsc

> pn_data_put_long call fails on 64x Linux 2.6.32-5-amd64
> ---
>
> Key: PROTON-554
> URL: https://issues.apache.org/jira/browse/PROTON-554
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: php-binding
>Affects Versions: 0.6
> Environment: Linux 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 
> x86_64 GNU/Linux
> PHP 5.4.26-1~dotdeb.0 (cli) (built: Mar  7 2014 08:58:03) 
> Copyright (c) 1997-2014 The PHP Group
> Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
> with Xdebug v2.2.4, Copyright (c) 2002-2014, by Derick Rethans
> with Suhosin v0.9.34-dev, Copyright (c) 2007-2012, by SektionEins GmbH
>Reporter: Denis Savrukov
> Attachments: qpid-proton-0.6-build-swig20.log, 
> qpid-proton-0.6-build.log
>
>
> Fatal error: Type error in argument 2 of pn_data_put_long. Expected 
> SWIGTYPE_p_long_long



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (PROTON-554) pn_data_put_long call fails on 64x Linux 2.6.32-5-amd64

2014-04-10 Thread Denis Savrukov (JIRA)

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

Denis Savrukov commented on PROTON-554:
---

OS name: Debian 6
we tried SWIG swig2.0, built cproton module, but everything was working before 
had been broken at all, functions stopped return any appropriate resources, but 
zero-integers instead
a little bit later I'll provide swig 2.0 build-log

> pn_data_put_long call fails on 64x Linux 2.6.32-5-amd64
> ---
>
> Key: PROTON-554
> URL: https://issues.apache.org/jira/browse/PROTON-554
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: php-binding
>Affects Versions: 0.6
> Environment: Linux 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 
> x86_64 GNU/Linux
> PHP 5.4.26-1~dotdeb.0 (cli) (built: Mar  7 2014 08:58:03) 
> Copyright (c) 1997-2014 The PHP Group
> Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
> with Xdebug v2.2.4, Copyright (c) 2002-2014, by Derick Rethans
> with Suhosin v0.9.34-dev, Copyright (c) 2007-2012, by SektionEins GmbH
>Reporter: Denis Savrukov
> Attachments: qpid-proton-0.6-build.log
>
>
> Fatal error: Type error in argument 2 of pn_data_put_long. Expected 
> SWIGTYPE_p_long_long



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (PROTON-554) pn_data_put_long call fails on 64x Linux 2.6.32-5-amd64

2014-04-10 Thread Rafael H. Schloming (JIRA)

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

Rafael H. Schloming commented on PROTON-554:


I'm afraid I haven't had much luck reproducing the issue. I don't currently 
have access to a system running the same versions you are. (What distro/version 
are you on?) My best guess is that it is either related to the older version of 
swig you are using, or that for some reason with the particular versions in 
your environment some of the typedefs necessary for swig to figure out that the 
given type is in fact an integral type are missing.

Would it be possible for you to try some newer versions of swig so we can try 
to isolate the environmental factors that trigger the issue?

> pn_data_put_long call fails on 64x Linux 2.6.32-5-amd64
> ---
>
> Key: PROTON-554
> URL: https://issues.apache.org/jira/browse/PROTON-554
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: php-binding
>Affects Versions: 0.6
> Environment: Linux 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 
> x86_64 GNU/Linux
> PHP 5.4.26-1~dotdeb.0 (cli) (built: Mar  7 2014 08:58:03) 
> Copyright (c) 1997-2014 The PHP Group
> Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
> with Xdebug v2.2.4, Copyright (c) 2002-2014, by Derick Rethans
> with Suhosin v0.9.34-dev, Copyright (c) 2007-2012, by SektionEins GmbH
>Reporter: Denis Savrukov
> Attachments: qpid-proton-0.6-build.log
>
>
> Fatal error: Type error in argument 2 of pn_data_put_long. Expected 
> SWIGTYPE_p_long_long



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (PROTON-554) pn_data_put_long call fails on 64x Linux 2.6.32-5-amd64

2014-04-10 Thread Denis Savrukov (JIRA)

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

Denis Savrukov commented on PROTON-554:
---

Rafael? :)

> pn_data_put_long call fails on 64x Linux 2.6.32-5-amd64
> ---
>
> Key: PROTON-554
> URL: https://issues.apache.org/jira/browse/PROTON-554
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: php-binding
>Affects Versions: 0.6
> Environment: Linux 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 
> x86_64 GNU/Linux
> PHP 5.4.26-1~dotdeb.0 (cli) (built: Mar  7 2014 08:58:03) 
> Copyright (c) 1997-2014 The PHP Group
> Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
> with Xdebug v2.2.4, Copyright (c) 2002-2014, by Derick Rethans
> with Suhosin v0.9.34-dev, Copyright (c) 2007-2012, by SektionEins GmbH
>Reporter: Denis Savrukov
> Attachments: qpid-proton-0.6-build.log
>
>
> Fatal error: Type error in argument 2 of pn_data_put_long. Expected 
> SWIGTYPE_p_long_long



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (PROTON-554) pn_data_put_long call fails on 64x Linux 2.6.32-5-amd64

2014-04-07 Thread Denis Savrukov (JIRA)

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

Denis Savrukov commented on PROTON-554:
---

Here you are, swig 1.3.40-3 Generate scripting interfaces to C/C++ code


> pn_data_put_long call fails on 64x Linux 2.6.32-5-amd64
> ---
>
> Key: PROTON-554
> URL: https://issues.apache.org/jira/browse/PROTON-554
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: php-binding
>Affects Versions: 0.6
> Environment: Linux 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 
> x86_64 GNU/Linux
> PHP 5.4.26-1~dotdeb.0 (cli) (built: Mar  7 2014 08:58:03) 
> Copyright (c) 1997-2014 The PHP Group
> Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
> with Xdebug v2.2.4, Copyright (c) 2002-2014, by Derick Rethans
> with Suhosin v0.9.34-dev, Copyright (c) 2007-2012, by SektionEins GmbH
>Reporter: Denis Savrukov
> Attachments: qpid-proton-0.6-build.log
>
>
> Fatal error: Type error in argument 2 of pn_data_put_long. Expected 
> SWIGTYPE_p_long_long



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (PROTON-554) pn_data_put_long call fails on 64x Linux 2.6.32-5-amd64

2014-04-04 Thread Rafael H. Schloming (JIRA)

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

Rafael H. Schloming commented on PROTON-554:


I don't seem to have this problem on my system. Do you know what version of 
swig your system is using? Did you build proton yourself and if so could you 
supply the build output?

> pn_data_put_long call fails on 64x Linux 2.6.32-5-amd64
> ---
>
> Key: PROTON-554
> URL: https://issues.apache.org/jira/browse/PROTON-554
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: php-binding
>Affects Versions: 0.6
> Environment: Linux 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 
> x86_64 GNU/Linux
> PHP 5.4.26-1~dotdeb.0 (cli) (built: Mar  7 2014 08:58:03) 
> Copyright (c) 1997-2014 The PHP Group
> Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
> with Xdebug v2.2.4, Copyright (c) 2002-2014, by Derick Rethans
> with Suhosin v0.9.34-dev, Copyright (c) 2007-2012, by SektionEins GmbH
>Reporter: Denis Savrukov
>
> Fatal error: Type error in argument 2 of pn_data_put_long. Expected 
> SWIGTYPE_p_long_long



--
This message was sent by Atlassian JIRA
(v6.2#6252)