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 2020/08/30 17:08:21 UTC

[GitHub] [couchdb] maciozo opened a new issue #3115: Erlang/OTP 23 Support

maciozo opened a new issue #3115:
URL: https://github.com/apache/couchdb/issues/3115


   [NOTE]: # ( ^^ Provide a general summary of the request in the title above. ^^ )
   
   ## Summary
   
   Would it be possible to add support for OTP 23?
   
   ## Desired Behaviour
   
   Support for building/running CouchDB with OTP 23.
   
   ## Possible Solution
   
   I tried just adding the appropriate version numbers to `rebar.config.script` as was done in #2070, but the build fails when attempting to link `b64url`.
   
   ```
   ==> b64url (compile)
   Compiled src/b64url.erl
   Compiling c_src/b64url.c
   /usr/bin/ld: cannot find -lerl_interface
   collect2: error: ld returned 1 exit status
   ERROR: sh(cc c_src/b64url.o $LDFLAGS -shared  -L"/usr/lib/erlang/lib/erl_interface-4.0/lib" -lerl_interface -lei -o priv/b64url.so)
   failed with return code 1 and the following output:
   /usr/bin/ld: cannot find -lerl_interface
   collect2: error: ld returned 1 exit status
   ```
   
   Some deprecated parts of `erl_interface` were removed in OTP 23 (https://www.erlang.org/news/140).
   
   There may, or course, be further incompatibilities.
   
   ## Additional context
   
   Void Linux has moved on to OTP 23.
   


----------------------------------------------------------------
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



[GitHub] [couchdb] janl edited a comment on issue #3115: Erlang/OTP 23 Support

Posted by GitBox <gi...@apache.org>.
janl edited a comment 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", 
   ```
   - [x] jiffy needs… ~I don’t know ;D @davisp help:~ h/t @rnewson jiffy `main` already supports 23,
   
   —
   
   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



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

Posted by GitBox <gi...@apache.org>.
wohali commented on issue #3115:
URL: https://github.com/apache/couchdb/issues/3115#issuecomment-815264693


   It looks like @janl fixed this with #3422, but I don't see those commits on main yet.
   
   @nickva can you cherry-pick #3422 onto main, then we can close this? Thanks!


-- 
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



[GitHub] [couchdb] wohali edited a comment on issue #3115: Erlang/OTP 23 Support

Posted by GitBox <gi...@apache.org>.
wohali edited a comment on issue #3115:
URL: https://github.com/apache/couchdb/issues/3115#issuecomment-819059556


   @nickva This is now blocking my CI work @ https://github.com/apache/couchdb/pull/3504, I'm going to go ahead and cherry pick to main (with a PR) unless you feel strongly the cleanup should happen first.


-- 
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



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

Posted by GitBox <gi...@apache.org>.
wohali commented on issue #3115:
URL: https://github.com/apache/couchdb/issues/3115#issuecomment-729031967


   FYI:
   
   ```irc
   16:59 <+rnewson> couchdb goes quite wrong on 21/22
   16:59 <+rnewson> the mochiweb modules thingy
   16:59 <+rnewson> (at least)
   16:59 <+rnewson> Wohali: I think it's all fixable but hard to keep 18/19 support
   16:59 <+rnewson> I didn't get deep into it, but it bites me whenever I forget to add
                    erlang 20 to my path
   17:00 <+rnewson> cloudant is on 20 all over afaik
   ```


----------------------------------------------------------------
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



[GitHub] [couchdb] janl edited a comment on issue #3115: Erlang/OTP 23 Support

Posted by GitBox <gi...@apache.org>.
janl edited a comment 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:
   
   https://github.com/apache/couchdb-rebar/pull/2
   
   ```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 https://github.com/apache/couchdb-snappy/pull/12
   
   ```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", 
   ```
   - [x] jiffy needs… ~I don’t know ;D @davisp help:~ h/t @rnewson jiffy `main` already supports 23,
   
   —
   
   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



[GitHub] [couchdb] nickva closed issue #3115: Erlang/OTP 23 Support

Posted by GitBox <gi...@apache.org>.
nickva closed issue #3115:
URL: https://github.com/apache/couchdb/issues/3115


   


-- 
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



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

Posted by GitBox <gi...@apache.org>.
wohali commented on issue #3115:
URL: https://github.com/apache/couchdb/issues/3115#issuecomment-683849187


   @iilyak My understanding from IBM is that there have been issues in production with Erlang 21+, which is why the official binary packages we have on couchdb.org are built against 20.3.8.latest. If you or @rnewson or @davisp have updated info as to what's safe to move to, we could consider moving ahead, but the earliest would be **3.2.0**. The impending 3.1.1 patch release would be too minor to change Erlang versions.


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
janl commented on issue #3115:
URL: https://github.com/apache/couchdb/issues/3115#issuecomment-798903420


   Erlang 20 is now fixed: https://github.com/apache/couchdb/pull/3422/commits/70334b3f9e85dd558c2a64ca222ceebe8f33a9c3#diff-a07a3d3b357a34c4acb80b2e178e9a19e6c2ed9d91cb0aa8d53cadabb1ae8bd0R95
   
   This is mainly a draft to show how it can be done. I’m happy to see a bike shed about making this cleaner.
   
   I’m a bit confused tho, this broke builds tagged with 21 and 22, but I didn’t dig too deep in it. Are we sure our per-version builds are actually using the versions they say they do?


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
janl commented on issue #3115:
URL: https://github.com/apache/couchdb/issues/3115#issuecomment-798773435


   I gave this a spin and with the changes outlined here on 3.x, I got `make check` to pass on Erlang 23.
   
   @iilyak Do you have more pointers on the logging behaviour. I found this reference in the Erlang 22 release notes:
   
   > gen_* behaviours: If logging of the last N messages through sys:log/2,3 is active for the server, this log is included in the terminate report.
   
   — https://www.erlang.org/news/132
   
   But I’m not sure if that’s what you mean.


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
davisp commented on issue #3115:
URL: https://github.com/apache/couchdb/issues/3115#issuecomment-684998115


   The only known bad versions I know of were explicitly excluded in the
   rebar.config.script.
   
   On Mon, Aug 31, 2020 at 10:25 AM Joan Touzet <no...@github.com>
   wrote:
   
   > @iilyak <https://github.com/iilyak> My understanding from IBM is that
   > there have been issues in production with Erlang 21+, which is why the
   > official binary packages we have on couchdb.org are built against
   > 20.3.8.latest. If you or @rnewson <https://github.com/rnewson> or @davisp
   > <https://github.com/davisp> have updated info as to what's safe to move
   > to, we could consider moving ahead, but the earliest would be *3.2.0*.
   > The impending 3.1.1 patch release would be too minor to change Erlang
   > versions.
   >
   > —
   > You are receiving this because you were mentioned.
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/couchdb/issues/3115#issuecomment-683849187>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/AAAE3WLVBFJTVHIAXZCQXUDSDO6GZANCNFSM4QPXHR7A>
   > .
   >
   


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
maciozo commented on issue #3115:
URL: https://github.com/apache/couchdb/issues/3115#issuecomment-683747592


   Having to stick macros in all over the code does sound like a bit of a pain, unless it can be done with a find/replace without breaking everything.
   
   I have basically zero knowledge of Erlang or how it works, but I do find it a bit strange that they'd remove existing syntax, and expect dependant projects to keep up. Unless it's common for Erlang projects to only support specific OTP versions?


----------------------------------------------------------------
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



[GitHub] [couchdb] janl edited a comment on issue #3115: Erlang/OTP 23 Support

Posted by GitBox <gi...@apache.org>.
janl edited a comment 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:
   
   https://github.com/apache/couchdb-rebar/pull/2
   
   ```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] this needs some more work to support <23 properly, made a logic bubu that I can fix up tomorrow.
   
   - [x] snappy needs to allow 23 https://github.com/apache/couchdb-snappy/pull/12
   
   ```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", 
   ```
   - [x] jiffy needs… ~I don’t know ;D @davisp help:~ h/t @rnewson jiffy `main` already supports 23,
   
   —
   
   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



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

Posted by GitBox <gi...@apache.org>.
iilyak commented on issue #3115:
URL: https://github.com/apache/couchdb/issues/3115#issuecomment-785298912


   Keep in mind that couch_log need to be updated as well to match the changes in OTP logging infrastructure. I did a test and logging of crashes from gen_server doesn't work on otp 22 and I am sure wouldn't be working on 23 without changes.


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
wohali commented on issue #3115:
URL: https://github.com/apache/couchdb/issues/3115#issuecomment-819059556


   @nickva This is now blocking my CI work, I'm going to go ahead and cherry pick to main (with a PR) unless you feel strongly the cleanup should happen first.


-- 
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



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

Posted by GitBox <gi...@apache.org>.
wohali commented on issue #3115:
URL: https://github.com/apache/couchdb/issues/3115#issuecomment-798957904


   I don't see it, our PRs currently build against 20.3.8.11, 20.3.8.25 and 22.2.3. We don't build against any 21 in Jenkins and we don't have 23 in Jenkins yet.


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
nickva commented on issue #3115:
URL: https://github.com/apache/couchdb/issues/3115#issuecomment-831506267


   We have OTP 23 support now in both main and 3.x branches. I think we can close this


-- 
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



[GitHub] [couchdb] wohali edited a comment on issue #3115: Erlang/OTP 23 Support

Posted by GitBox <gi...@apache.org>.
wohali edited a comment on issue #3115:
URL: https://github.com/apache/couchdb/issues/3115#issuecomment-819059556


   @nickva Though this is blocking my CI work @ https://github.com/apache/couchdb/pull/3504 , I'm instead just merging that to `3.x` and you can pull my CI changes forward to main when you do this - as discussed on IRC. You'll also need to pull forward #3505 .
   
   Thanks! 


-- 
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



[GitHub] [couchdb] janl edited a comment on issue #3115: Erlang/OTP 23 Support

Posted by GitBox <gi...@apache.org>.
janl edited a comment 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:
   
   https://github.com/apache/couchdb-rebar/pull/2
   
   ```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
     - [ ] this needs some more work to support <23 properly, made a logic bubu that I can fix up tomorrow.
   
   - [x] snappy needs to allow 23 https://github.com/apache/couchdb-snappy/pull/12
   
   ```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", 
   ```
   - [x] jiffy needs… ~I don’t know ;D @davisp help:~ h/t @rnewson jiffy `main` already supports 23,
   
   —
   
   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



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

Posted by GitBox <gi...@apache.org>.
iilyak commented on issue #3115:
URL: https://github.com/apache/couchdb/issues/3115#issuecomment-683761170


   Another option is to deprecate erlang prior to 21. However it could be a tougher call because I think we have platforms which do not support 21 yet. Our current position is expressed here https://github.com/apache/couchdb/issues/2934#issuecomment-641473765. 


----------------------------------------------------------------
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



[GitHub] [couchdb] janl edited a comment on issue #3115: Erlang/OTP 23 Support

Posted by GitBox <gi...@apache.org>.
janl edited a comment 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 https://github.com/apache/couchdb-snappy/pull/12
   
   ```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", 
   ```
   - [x] jiffy needs… ~I don’t know ;D @davisp help:~ h/t @rnewson jiffy `main` already supports 23,
   
   —
   
   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



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

Posted by GitBox <gi...@apache.org>.
jaydoane commented on issue #3115:
URL: https://github.com/apache/couchdb/issues/3115#issuecomment-683487791


   Another problem is that we currently have a lot of this kind of compiler warning:
   ```
   /proj/couchdb-3/src/chttpd/src/chttpd.erl:279: Warning: erlang:get_stacktrace/0: deprecated; use the new try/catch syntax for retrieving the stack backtrace
   ```
   But we can't replace those with the new try/catch syntax while we need to support versions [previous to OTP 21](https://github.com/erlang/otp/pull/1783#issuecomment-381607232). However, that same thread shows [some workarounds](https://github.com/erlang/otp/pull/1783#issuecomment-386190970) that we could presumably use to patch all the existing incompatible code.


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
nickva commented on issue #3115:
URL: https://github.com/apache/couchdb/issues/3115#issuecomment-817416908


   @wohali good idea. I will do that. Beforehand I think we may want to clean up some of the applications in `main` which only work in 3.x (rexi, mem3, etc). I have a head-start on that already and will see how it looks in the next few days, then will port Jan's Erlang 23 support to `main`.


-- 
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



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

Posted by GitBox <gi...@apache.org>.
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



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

Posted by GitBox <gi...@apache.org>.
janl commented on issue #3115:
URL: https://github.com/apache/couchdb/issues/3115#issuecomment-799531491


   @wohali agreed that the logs show that now, there was just some intermittent state there when they were failing. The UI there is also not very intuitive, so I may have turned myself 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