代码之家  ›  专栏  ›  技术社区  ›  smeeb

Apache Thrift未在Mac上安装[已关闭]

  •  2
  • smeeb  · 技术社区  · 10 年前

    此处为Mac OSX 10.10.5(优胜美地)。我正在尝试找到一种工具,它将:

    1. 给定一个定义/配置文件,生成一个本地C网络/套接字客户端(库);和
    2. 给定一个定义/配置文件,生成一个Java网络/套接字服务器

    实际上,两个工件都将(很可能)在同一台机器上运行,但只有一个 成为本地C和其他 成为Java。

    相信 Thrift 是一个可以完成这项工作的工具,但如果不是,或者有其他/更好/更容易使用的工具,那么我当然愿意接受其他建议。


    一开始,我就有点期待“节俭”会以某种形式出现,随时可以按原样运行。相反,根据 documentation 看起来你必须自己建造。输入疼痛。

    我下载了柏油球( v0.9.3 )然后导航到解压缩目录。然后我跑 ./configure (正如那些文件所说的那样),这产生了巨大的产出,最令人怀疑的是:

    Building C++ Library ......... : yes
    Building C (GLib) Library .... : no     <--- heh?
    Building Java Library ........ : no     <--- heh?
    Building C# Library .......... : no
    Building Python Library ...... : yes
    Building Ruby Library ........ : no
    Building Haxe Library ........ : no
    Building Haskell Library ..... : no
    Building Perl Library ........ : yes
    Building PHP Library ......... : yes
    Building Erlang Library ...... : no
    Building Go Library .......... : no
    Building D Library ........... : no
    Building NodeJS Library ...... : yes
    Building Lua Library ......... : no
    

    现在我不知道 任何东西 关于节俭,但在我看来 建造“图书馆”/“发电机”等。对于C或Java,我特别感兴趣的两种语言!!! (1) 关于为什么有什么想法吗?

    接下来,指令状态为运行 make ,这会产生无法识别的编译器错误:

    ...blah blah blah lots of compiler output, blah blah blah...
    
    src/thrift/transport/TSSLSocket.cpp:147:24: error: use of undeclared identifier 'TLSv1_1_method'; did you mean 'TLSv1_method'?
        ctx_ = SSL_CTX_new(TLSv1_1_method());
                           ^~~~~~~~~~~~~~
                           TLSv1_method
    
    src/thrift/transport/TSSLSocket.cpp:149:24: error: use of undeclared identifier 'TLSv1_2_method'; did you mean 'TLSv1_method'?
        ctx_ = SSL_CTX_new(TLSv1_2_method());
                           ^~~~~~~~~~~~~~
                           TLSv1_method
    
    74 warnings and 2 errors generated.
    make[4]: *** [src/thrift/transport/TSSLSocket.lo] Error 1
    make[3]: *** [all-recursive] Error 1
    make[2]: *** [all-recursive] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all] Error 2
    

    (2) 知道如何在这里进行故障排除吗?!?

    看来我要绕谷仓三圈了。在文档的其他方面,我需要构建其他几个库(Boost和 libevent ),我也遇到了各种各样的麻烦,这些构建的说明(例如 lib事件 我不喜欢Mac默认附带的Bison版本等)。

    Thrift是一款完全可以在Mac OS上运行的应用程序吗?为什么我需要经历这座大楼的动静?

    所以最重要的是: (3) 如果它存在,我在哪里可以找到一个可以运行的Thrift Mac可执行文件?如果它不存在,还有其他更容易安装/运行的工具吗?

    1 回复  |  直到 10 年前
        1
  •  5
  •   smeeb    10 年前

    最后,它很简单:

    brew install thrift