You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2021/03/13 17:30:10 UTC

[GitHub] [couchdb] janl commented on issue #3115: Erlang/OTP 23 Support

janl commented on issue #3115:
URL: https://github.com/apache/couchdb/issues/3115#issuecomment-798669543


   I’ve started digging through these.
   
   - [x] fixing `-Ilerl_interface` is relatively easy, we are not using it anywhere, so we can just hotwire our local rebar copy:
   
   ```diff
   diff --git a/src/rebar_port_compiler.erl b/src/rebar_port_compiler.erl
   index 9679c80..44f7b0d 100644
   --- a/src/rebar_port_compiler.erl
   +++ b/src/rebar_port_compiler.erl
   @@ -673,7 +673,7 @@ default_env() ->
                           "\" "
                          ])},
         {"ERL_EI_LIBDIR", lists:concat(["\"", erl_interface_dir(lib), "\""])},
   -     {"ERL_LDFLAGS"  , " -L$ERL_EI_LIBDIR -lerl_interface -lei"},
   +     {"ERL_LDFLAGS"  , " -L$ERL_EI_LIBDIR -lei"},
         {"ERLANG_ARCH"  , rebar_utils:wordsize()},
         {"ERLANG_TARGET", rebar_utils:get_arch()},
    ```
   - [x] `get_stacktrace()` is not getting removed until 24, so we have one more release to go, but the diff is totally bearable IMHO: https://github.com/apache/couchdb/pull/new/feat/3.x/otp23
   
   - [x] snappy needs to allow 23:
   
   ```diff
   diff --git a/rebar.config b/rebar.config
   index 1785295..250cd2a 100644
   --- a/rebar.config
   +++ b/rebar.config
   @@ -1,4 +1,4 @@
   -{require_otp_vsn, "R14|R15|R16|17|18|19|20|21|22"}.
   +{require_otp_vsn, "R14|R15|R16|17|18|19|20|21|22|23"}.
    
    {erl_opts, [debug_info, warn_unused_vars, warn_shadow_vars, warn_unused_import]}.
    {port_sources, ["c_src/*.cc", 
   ```
   
   - [ ] jiffy needs…I don’t know ;D @davisp help:
   
   ```
   escript enc compile
   Uncaught error in rebar_core: {'EXIT',
                                  {undef,
                                   [{rebar_utils,get_cwd,[],[]},
                                    {rebar_config,new,0,[]},
                                    {rebar,init_config,1,[]},
                                    {rebar,run,1,[]},
                                    {rebar,main,1,[]},
                                    {escript,run,2,
                                     [{file,"escript.erl"},{line,758}]},
                                    {escript,start,1,
                                     [{file,"escript.erl"},{line,277}]},
                                    {init,start_em,1,[]}]}}
   =ERROR REPORT==== 13-Mar-2021::18:16:56.267938 ===
   Loading of /Users/jan/Work/asf/couchdb/src/jiffy/enc/enc/ebin/rebar_utils.beam failed: badfile
   
   =ERROR REPORT==== 13-Mar-2021::18:16:56.267930 ===
   beam/beam_load.c(1624): Error loading module rebar_utils:
     please re-compile this module with an 23 compiler (old-style fun with indices: 1/4)
   
   
   =ERROR REPORT==== 13-Mar-2021::18:16:56.278168 ===
   Loading of /Users/jan/Work/asf/couchdb/src/jiffy/enc/enc/ebin/rebar_utils.beam failed: badfile
   
   =ERROR REPORT==== 13-Mar-2021::18:16:56.278160 ===
   beam/beam_load.c(1624): Error loading module rebar_utils:
     please re-compile this module with an 23 compiler (old-style fun with indices: 1/4)
   
   
   escript: exception error: undefined function rebar_utils:delayed_halt/1
     in function  escript:run/2 (escript.erl, line 758)
     in call from escript:start/1 (escript.erl, line 277)
     in call from init:start_em/1 
     in call from init:do_boot/3 
   ```
   
   —
   
   That’s as far as I got this time around.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org