[jira] [Created] (THRIFT-1300) Test failures with parallel builds (make -j)

2011-08-26 Thread Diwaker Gupta (JIRA)
Test failures with parallel builds (make -j)


 Key: THRIFT-1300
 URL: https://issues.apache.org/jira/browse/THRIFT-1300
 Project: Thrift
  Issue Type: Bug
  Components: Test Suite
Affects Versions: 0.7
Reporter: Diwaker Gupta


Simply running 'make' works fine -- builds the library, builds the tests etc.

Running 'make -j 12' fails when building the tests. Note that this worked fine 
with 0.6.0.

{noformat}
../../compiler/cpp/thrift --gen cpp:templates,cob_style -r 
../../test/ThriftTest.thrift
if /bin/bash ../../libtool --tag=CXX --mode=compile 
x86_64-unknown-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../.. 
-I../../lib/cpp/src -Igen-cpp  -O2 -Wall -pipe  -L -I  -Wall -O2 
-Wall -pipe -MT ThriftTest_types.lo -MD -MP -MF ".deps/ThriftTest_types.Tpo" -c 
-o ThriftTest_types.lo `test -f 'gen-cpp/ThriftTest_types.cpp' || echo 
'./'`gen-cpp/ThriftTest_types.cpp; \
then mv -f ".deps/ThriftTest_types.Tpo" ".deps/ThriftTest_types.Plo"; 
else rm -f ".deps/ThriftTest_types.Tpo"; exit 1; fi
../../compiler/cpp/thrift --gen cpp ../../test/StressTest.thrift
../../compiler/cpp/thrift --gen cpp ../../test/StressTest.thrift
make[4]: *** No rule to make target `gen-cpp/Service.cpp', needed by 
`Service.lo'.  Stop.
make[4]: *** Waiting for unfinished jobs
{noformat}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (THRIFT-1299) If SSL is available, 'thrift' binary links against it

2011-08-26 Thread Diwaker Gupta (JIRA)
If SSL is available, 'thrift' binary links against it
-

 Key: THRIFT-1299
 URL: https://issues.apache.org/jira/browse/THRIFT-1299
 Project: Thrift
  Issue Type: Bug
  Components: Build Process, C++ - Compiler, C++ - Library
Affects Versions: 0.7
Reporter: Diwaker Gupta
Priority: Minor


Inspection of compiler/cpp/Makefile and lib/cpp/Makefile reveals that for 
building both the thrift compiler as well as the C++ libraries, the same set of 
libraries (in the variable LIBS) are used. When OpenSSL is available, this has 
the unintended consequence that the thrift compiler links libssl (and 
potentially libcrypto), even though it doesn't need to. In theory there is no 
harm in linking against additional shared libraries but it can be an issue in 
practice. Specifically, if OpenSSL etc are installed in a custom location (such 
as when building a custom toolchain), the thrift binary will fail to run unless 
LD_LIBRARY_PATH is set every time thrift needs to run.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (THRIFT-1298) Standard scheme doesn't read or write metadata along with field values

2011-08-26 Thread Armaan Sarkar (JIRA)
Standard scheme doesn't read or write metadata along with field values
--

 Key: THRIFT-1298
 URL: https://issues.apache.org/jira/browse/THRIFT-1298
 Project: Thrift
  Issue Type: Bug
  Components: Java - Compiler
Affects Versions: 0.8
Reporter: Armaan Sarkar
Assignee: Armaan Sarkar
 Fix For: 0.8


Metadata (such as field type, length, etc) is not read or written to by the 
standard scheme. This is not the intended functionality. It causes problems 
reading structs that were written before pluggable serializers came into 
effect. Since the standard scheme is the default serializer it must function 
exactly like thrift serialization did in the past (complete with metadata 
surrounding the fields).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (THRIFT-1296) SSL detection is broken

2011-08-26 Thread Diwaker Gupta (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-1296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Diwaker Gupta updated THRIFT-1296:
--

Attachment: THRIFT-1296.patch

I've only tested on Ubuntu 10.04. Some more testing on other platforms is 
definitely needed.

> SSL detection is broken
> ---
>
> Key: THRIFT-1296
> URL: https://issues.apache.org/jira/browse/THRIFT-1296
> Project: Thrift
>  Issue Type: Bug
>  Components: Build Process
>Affects Versions: 0.7
> Environment: Ubuntu 10.04
> Building Thrift against a custom toolchain (not using system 
> packages/libraries)
>Reporter: Diwaker Gupta
> Attachments: THRIFT-1296.patch
>
>
> When using shared libraries, libssl has dependencies on libcrypto. The 
> current autoconf macro for checking SSL doesn't do the job:
> {noformat}
> configure:23665: checking for SSL_ctrl in -lssl
> configure:23690: x86_64-unknown-linux-gnu-g++ -o conftest -O2 -Wall -pipe  
> -L -I  -O2 -Wall -pipe conftest.cpp -lssl  -lrt -lpthread  >&5
> x86_64-unknown-linux-gnu/bin/ld: warning: libcrypto.so.1.0.0, needed by 
> /usr/lib/libssl.so, not found (try using -rpath or -rpath-link)
> {noformat}
> The following patch fixes this problem:
> {noformat}
> +--- configure.ac
>  configure.ac
> +@@ -312,7 +312,7 @@ dnl of the POSIX Real-Time Extensions.  This seems 
> necessary on Linux,
> + dnl and we haven't yet found a system where this is a problem.
> + AC_CHECK_LIB(rt, clock_gettime)
> + AC_CHECK_LIB(socket, setsockopt)
> +-AC_CHECK_LIB(ssl, SSL_ctrl)
> ++AC_CHECK_LIB(ssl, SSL_ctrl,[LIBS="-lssl -lcrypto $LIBS"],,-lcrypto)
> +
> + AC_TYPE_INT16_T
> + AC_TYPE_INT32_T
> {noformat}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (THRIFT-1297) Compiled javascript code does not write falsy values

2011-08-26 Thread Joris van der Wel (JIRA)

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

Joris van der Wel commented on THRIFT-1297:
---

I am not sure what is considered null in thrift.

My issue is that .write is not called at all when the expression is falsy 
(null, false, undefined, 0, '', NaN). I think the value is not sent over the 
network at all. If that is considered as null by the receiving end, it could be 
the same issue.

If null and a non existing value are not considered the same, it is a different 
issue and strict equality would be needed (!== ===)


> Compiled javascript code does not write falsy values
> 
>
> Key: THRIFT-1297
> URL: https://issues.apache.org/jira/browse/THRIFT-1297
> Project: Thrift
>  Issue Type: Bug
>  Components: JavaScript - Compiler
>Affects Versions: 0.7
> Environment: Windows 0.7 thrift compiler (pre built)
> http://www.apache.org/dyn/closer.cgi?path=/thrift/0.7.0/thrift-0.7.0.exe
> Thrift 0.7 compiled on Ubuntu shows same symptoms
>Reporter: Joris van der Wel
>Priority: Critical
>  Labels: compiler, javascript, regression
>
> I compiled cassandra.thrift using "thrift --gen js:node cassandra.thrift".
> When I use this code this results in the following error from cassandra / 
> thrift:
> {code}
> { name: 'TApplicationException',  type: 7,
>   message: 'Required field \'reversed\' was not found in serialized data! 
> Struct : SliceRange(start:null, finish:null, reversed:false, count:100)' }
> {code}
> If I look in the generated code, I find 
> {code}
> SliceRange.prototype.write = function(output) {
>   output.writeStructBegin('SliceRange');
>   if (this.start) {
> output.writeFieldBegin('start', Thrift.Type.STRING, 1);
> output.writeString(this.start);
> output.writeFieldEnd();
>   }
>   if (this.finish) {
> output.writeFieldBegin('finish', Thrift.Type.STRING, 2);
> output.writeString(this.finish);
> output.writeFieldEnd();
>   }
>   if (this.reversed) {
> output.writeFieldBegin('reversed', Thrift.Type.BOOL, 3);
> output.writeBool(this.reversed);
> output.writeFieldEnd();
>   }
>   if (this.count) {
> output.writeFieldBegin('count', Thrift.Type.I32, 4);
> output.writeI32(this.count);
> output.writeFieldEnd();
>   }
>   output.writeFieldStop();
>   output.writeStructEnd();
>   return;
> };
> {code}
> this.reversed is false and subsequently does not get sent
> If I look at the compiled version that was generated by 0.6.1 I see:
> {code}
> SliceRange.prototype.write = function(output){ 
>   output.writeStructBegin('SliceRange')
>   if (null != this.start) {
> output.writeFieldBegin('start', Thrift.Type.STRING, 1)
> output.writeString(this.start)
> output.writeFieldEnd()
>   }
>   if (null != this.finish) {
> output.writeFieldBegin('finish', Thrift.Type.STRING, 2)
> output.writeString(this.finish)
> output.writeFieldEnd()
>   }
>   if (null != this.reversed) {
> output.writeFieldBegin('reversed', Thrift.Type.BOOL, 3)
> output.writeBool(this.reversed)
> output.writeFieldEnd()
>   }
>   if (null != this.count) {
> output.writeFieldBegin('count', Thrift.Type.I32, 4)
> output.writeI32(this.count)
> output.writeFieldEnd()
>   }
>   output.writeFieldStop()
>   output.writeStructEnd()
>   return
> }
> {code}
> null is also not be completely correct, the solution would be:
> {code}
> ...
> if (undefined !== this.reversed)
> ...
> {code}
> Unless this change was intentional and breaks things because cassandra is 
> perhaps using an old thrift version?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (THRIFT-1297) Compiled javascript code does not write falsy values

2011-08-26 Thread Jake Farrell (JIRA)

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

Jake Farrell commented on THRIFT-1297:
--

Is this the same issue as THRIFT-1277 ?

> Compiled javascript code does not write falsy values
> 
>
> Key: THRIFT-1297
> URL: https://issues.apache.org/jira/browse/THRIFT-1297
> Project: Thrift
>  Issue Type: Bug
>  Components: JavaScript - Compiler
>Affects Versions: 0.7
> Environment: Windows 0.7 thrift compiler (pre built)
> http://www.apache.org/dyn/closer.cgi?path=/thrift/0.7.0/thrift-0.7.0.exe
> Thrift 0.7 compiled on Ubuntu shows same symptoms
>Reporter: Joris van der Wel
>Priority: Critical
>  Labels: compiler, javascript, regression
>
> I compiled cassandra.thrift using "thrift --gen js:node cassandra.thrift".
> When I use this code this results in the following error from cassandra / 
> thrift:
> {code}
> { name: 'TApplicationException',  type: 7,
>   message: 'Required field \'reversed\' was not found in serialized data! 
> Struct : SliceRange(start:null, finish:null, reversed:false, count:100)' }
> {code}
> If I look in the generated code, I find 
> {code}
> SliceRange.prototype.write = function(output) {
>   output.writeStructBegin('SliceRange');
>   if (this.start) {
> output.writeFieldBegin('start', Thrift.Type.STRING, 1);
> output.writeString(this.start);
> output.writeFieldEnd();
>   }
>   if (this.finish) {
> output.writeFieldBegin('finish', Thrift.Type.STRING, 2);
> output.writeString(this.finish);
> output.writeFieldEnd();
>   }
>   if (this.reversed) {
> output.writeFieldBegin('reversed', Thrift.Type.BOOL, 3);
> output.writeBool(this.reversed);
> output.writeFieldEnd();
>   }
>   if (this.count) {
> output.writeFieldBegin('count', Thrift.Type.I32, 4);
> output.writeI32(this.count);
> output.writeFieldEnd();
>   }
>   output.writeFieldStop();
>   output.writeStructEnd();
>   return;
> };
> {code}
> this.reversed is false and subsequently does not get sent
> If I look at the compiled version that was generated by 0.6.1 I see:
> {code}
> SliceRange.prototype.write = function(output){ 
>   output.writeStructBegin('SliceRange')
>   if (null != this.start) {
> output.writeFieldBegin('start', Thrift.Type.STRING, 1)
> output.writeString(this.start)
> output.writeFieldEnd()
>   }
>   if (null != this.finish) {
> output.writeFieldBegin('finish', Thrift.Type.STRING, 2)
> output.writeString(this.finish)
> output.writeFieldEnd()
>   }
>   if (null != this.reversed) {
> output.writeFieldBegin('reversed', Thrift.Type.BOOL, 3)
> output.writeBool(this.reversed)
> output.writeFieldEnd()
>   }
>   if (null != this.count) {
> output.writeFieldBegin('count', Thrift.Type.I32, 4)
> output.writeI32(this.count)
> output.writeFieldEnd()
>   }
>   output.writeFieldStop()
>   output.writeStructEnd()
>   return
> }
> {code}
> null is also not be completely correct, the solution would be:
> {code}
> ...
> if (undefined !== this.reversed)
> ...
> {code}
> Unless this change was intentional and breaks things because cassandra is 
> perhaps using an old thrift version?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (THRIFT-1297) Compiled javascript code does not write falsy values

2011-08-26 Thread Joris van der Wel (JIRA)
Compiled javascript code does not write falsy values


 Key: THRIFT-1297
 URL: https://issues.apache.org/jira/browse/THRIFT-1297
 Project: Thrift
  Issue Type: Bug
  Components: JavaScript - Compiler
Affects Versions: 0.7
 Environment: Windows 0.7 thrift compiler (pre built)
http://www.apache.org/dyn/closer.cgi?path=/thrift/0.7.0/thrift-0.7.0.exe

Thrift 0.7 compiled on Ubuntu shows same symptoms
Reporter: Joris van der Wel
Priority: Critical


I compiled cassandra.thrift using "thrift --gen js:node cassandra.thrift".

When I use this code this results in the following error from cassandra / 
thrift:
{code}
{ name: 'TApplicationException',  type: 7,
  message: 'Required field \'reversed\' was not found in serialized data! 
Struct : SliceRange(start:null, finish:null, reversed:false, count:100)' }
{code}

If I look in the generated code, I find 

{code}
SliceRange.prototype.write = function(output) {
  output.writeStructBegin('SliceRange');
  if (this.start) {
output.writeFieldBegin('start', Thrift.Type.STRING, 1);
output.writeString(this.start);
output.writeFieldEnd();
  }
  if (this.finish) {
output.writeFieldBegin('finish', Thrift.Type.STRING, 2);
output.writeString(this.finish);
output.writeFieldEnd();
  }
  if (this.reversed) {
output.writeFieldBegin('reversed', Thrift.Type.BOOL, 3);
output.writeBool(this.reversed);
output.writeFieldEnd();
  }
  if (this.count) {
output.writeFieldBegin('count', Thrift.Type.I32, 4);
output.writeI32(this.count);
output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};
{code}
this.reversed is false and subsequently does not get sent
If I look at the compiled version that was generated by 0.6.1 I see:

{code}
SliceRange.prototype.write = function(output){ 
  output.writeStructBegin('SliceRange')
  if (null != this.start) {
output.writeFieldBegin('start', Thrift.Type.STRING, 1)
output.writeString(this.start)
output.writeFieldEnd()
  }
  if (null != this.finish) {
output.writeFieldBegin('finish', Thrift.Type.STRING, 2)
output.writeString(this.finish)
output.writeFieldEnd()
  }
  if (null != this.reversed) {
output.writeFieldBegin('reversed', Thrift.Type.BOOL, 3)
output.writeBool(this.reversed)
output.writeFieldEnd()
  }
  if (null != this.count) {
output.writeFieldBegin('count', Thrift.Type.I32, 4)
output.writeI32(this.count)
output.writeFieldEnd()
  }
  output.writeFieldStop()
  output.writeStructEnd()
  return
}
{code}

null is also not be completely correct, the solution would be:
{code}
...
if (undefined !== this.reversed)
...
{code}

Unless this change was intentional and breaks things because cassandra is 
perhaps using an old thrift version?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira