thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Partridge, Lucas (GE Aviation)" <Lucas.Partri...@ge.com>
Subject RE: Re:Re: make success but make check failed
Date Fri, 24 Jul 2015 08:43:53 GMT
You don't use Thrift to directly convert code in one language to another.  Instead you define
an interface in a .thrift file using only the language at https://thrift.apache.org/docs/idl
. Then you run the Thrift compiler against that .thrift file to generate client and server
stubs in your language(s) of choice.  So, for example, you could implement the interface methods
for your server in Perl and have them called by clients generated in Java; or vice versa.

Lucas.

-----Original Message-----
From: 罗辉 [mailto:luohui@celloud.cn] 
Sent: 24 July 2015 07:39
To: user; semicircle21
Subject: Re:Re: make success but make check failed

Sorry for uncorrect info, I copied tutorial/perl/PerlServer.pl to test/test.thrift and run
"thrift --gen perl test/test.thrift"
I want to try to write some perl code and thrift can transform it into java code and run successfully.







Best wishes.


San.Luo
Celloud








在2015年07月24 12时47分,"刘博强"<semicircle21@gmail.com>写道:

2: what's your tutorial.thrift looks like?
It's strange because there's no token 'use' in:
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apache_thrift_blob_trunk_tutorial_tutorial.thrift&d=AwIGaQ&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI&r=c1CCNND4PG-Q_V2AJWDWrugZAXQ8Y3EE_f_mAHcpXcs&m=XMfTX1OgOl1QLQnaH0icQA2pZNluPS3EcYR0NIpIBWc&s=An-a0VIfA9dp7HFy91edJDKYzT5F_iNaP6RyzqmoG1s&e=


Have you tried compile it for java?

On Thu, Jul 23, 2015 at 5:07 PM, 罗辉 <luohui@celloud.cn> wrote:

> Hi there:
>        I'm new to thrift and have 2 questions here:
> 1. Following the installation guild, I run "./configure 
> --prefix=/usr/local/thrift/ --with-cshare=no --with-java=yes 
> --with-erlang=no --with-python=no --with-php=no 
> --with-php_extension=no --with-ruby=no --with-haskell=no --with-go=no 
> --with-perl=yes --with-lua=no","make" and "make install" successfully but run "make check"
> failed.
>  error message:
>
>
> BUILD FAILED
> /opt/thrift-0.9.2/lib/java/build.xml:202: Test 
> org.apache.thrift.protocol.TestTSimpleJSONProtocol failed Total time: 
> 25 seconds
> make[3]: *** [check-local] Error 1
> make[3]: Leaving directory `/opt/thrift-0.9.2/lib/java'
> make[2]: *** [check-am] Error 2
> make[2]: Leaving directory `/opt/thrift-0.9.2/lib/java'
> make[1]: *** [check-recursive] Error 1
> make[1]: Leaving directory `/opt/thrift-0.9.2/lib'
> make: *** [check-recursive] Error 1
> I am not very clear why this test failed. And where is the make check 
> log presents?
>
>
> 2.I copied tutorial.thrift to test/test.thrift and run "thrift --gen 
> perl test/test.thrift"
> however it failed with error message  :
> [ERROR:/opt/thrift-0.9.2/test/test.thrift:22] (last token was 'use') 
> Cannot use reserved language keyword: "use"
>
> check the test.thrift:
> line 22:use strict;
>
> who to solve these 2 problems?Any ideas will be appreciated.
>
>
>
>
>
>
>
>
> Best wishes.
>
>
> San.Luo
> Celloud
>
> Mailbox:luohui@celloud.cn
> Website:www.celloud.org
> Address:2109,Building 4,Zhubang 2000, Chao Yang Road,Chao Yang 
> District,Beijing,China
>  ZipCode:100020
>
>
>
>
>
>
>
>
>
>
>
>
Mime
View raw message