Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3421

rebar as dependency instead of bundling (was: rebar fails if PWD contains Unicode)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.9.3
    • 0.10.0
    • None
    • Fedora release 23 (Twenty Three)
      Linux localhost.localdomain 4.2.5-300.fc23.x86_64 #1 SMP Tue Oct 27 04:29:56 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
      PWD=/home/lyokha/Загрузки/thrift-0.9.3

    Description

      When I build erlang support in a directory which contains Unicode characters I get following error:

      make[3]: вход в каталог «/home/lyokha/Загрузки/thrift-0.9.3/lib/erl»
      ./rebar get-deps
      ==> erl (get-deps)
      Uncaught error in rebar_core: {'EXIT',
                                     {badarg,
                                      [{re,split,
                                        [[80,87,68,61,47,104,111,109,101,47,108,121,
                                          111,107,104,97,47,1047,1072,1075,1088,
                                          1091,1079,1082,1080,47,116,104,114,105,
                                          102,116,45,48,46,57,46,51,47,108,105,98,
                                          47,101,114,108],
                                         "=",
                                         [{return,list},{parts,2}]],
                                        [{file,"re.erl"},{line,170}]},
                                       {rebar_port_compiler,'-os_env/0-lc$^0/1-0-',
                                        1,[]},
                                       {rebar_port_compiler,'-os_env/0-lc$^0/1-0-',
                                        1,[]},
                                       {rebar_port_compiler,os_env,0,[]},
                                       {rebar_port_compiler,setup_env,1,[]},
                                       {rebar_core,'-setup_envs/2-lc$^0/1-0-',2,[]},
                                       {rebar_core,setup_envs,2,[]},
                                       {rebar_core,execute,4,[]}]}}
      

      The reason of this is that thrift uses very old prebuilt rebar:

      rebar version: 2 date: 20110618_061440 vcs: git 3e41385
      

      It does not include unicode option for re:split. Newer rebar (since 20 Nov 2012 https://github.com/rebar/rebar/commit/61c353dcfdafb87107cc5472709d229c26a8cb6c revision) has this option.

      Workaround:

      install erlang-rebar package in the system and replace all ./rebar entries with rebar in lib/erl/Makefile.am (before running ./configure) or in lib/erl/Makefile (after running ./configure).

      Better fix would be inclusion of a newer prebuilt rebar or create dependency on a system rebar.

      Attachments

        Issue Links

          Activity

            People

              roger Roger Meier
              lyokha Alexey Radkov
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: