Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jiffy 1.0.4 fails to compile with Erlang/OTP 23.0-rc3 #197

Closed
legoscia opened this issue Apr 22, 2020 · 9 comments
Closed

jiffy 1.0.4 fails to compile with Erlang/OTP 23.0-rc3 #197

legoscia opened this issue Apr 22, 2020 · 9 comments

Comments

@legoscia
Copy link

Compiling jiffy with Erlang/OTP 23.0-rc3 fails with the following error message:

$ make
./rebar 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==== 22-Apr-2020::13:39:22.741797 ===
beam/beam_load.c(1624): Error loading module rebar_utils:
  please re-compile this module with an 23 compiler (old-style fun with indices: 3/6)


=ERROR REPORT==== 22-Apr-2020::13:39:22.741840 ===
Loading of /home/magnus/src/jiffy-upstream/rebar/rebar/ebin/rebar_utils.beam failed: badfile

=ERROR REPORT==== 22-Apr-2020::13:39:22.761395 ===
beam/beam_load.c(1624): Error loading module rebar_utils:
  please re-compile this module with an 23 compiler (old-style fun with indices: 3/6)


=ERROR REPORT==== 22-Apr-2020::13:39:22.761467 ===
Loading of /home/magnus/src/jiffy-upstream/rebar/rebar/ebin/rebar_utils.beam failed: badfile

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 
Makefile:19: recipe for target 'build' failed
make: *** [build] Error 127

This happens because release 23 dropped support for loading beam files compiled with a compiler older than R15 (see here), and the beam files inside the rebar binary were compiled with R14.

@rickpayne
Copy link

I think the same issue applies to the 'enc' escript included too...

@laktech
Copy link

laktech commented May 24, 2020

I upgrade Erlang/OTP to 23 and was having troubles building this PR. Turns out it was a problem with my version of rebar3. Under rebar 3.6.1, the build failed to produce priv/jiffy.so. rebar3 output was not helpful in identifying the problem, it quietly terminated. Running rebar3 under strace I discovered that it was complaining about not being able to find the liberl_interface shared library.

Upgrading to the latest rebar3 resolved the problem.

@darrenklein
Copy link

I struck this issue as well after upgrading to Erlang/OTP 23; however, upgrading rebar3 didn't resolve the issue for me. The PR #199 resolves this issue for me.

@stephb9959
Copy link

I forked this code into stephb9959/jiffy and removed all rebar/enc stuff. The project just uses erlang.mk and works in Erlang/OPT23. All tests pass on MacOSx and Linux. I am just looking for others to try that to see if there's value in making a pull request.

@vkatsuba
Copy link

vkatsuba commented Jul 1, 2020

I forked this code into stephb9959/jiffy and removed all rebar/enc stuff. The project just uses erlang.mk and works in Erlang/OPT23. All tests pass on MacOSx and Linux. I am just looking for others to try that to see if there's value in making a pull request.

Hi @stephb9959, I'm try add https://github.com/stephb9959/jiffy as dependency into rebar project and get error:
===> Dependency failure: source for jiffy does not contain a recognizable project and can not be built
Looks like the rebar have some conflicts with erlang.mk. Looks like for non-rebar projects was provided fix erlang/rebar3#1978 but still don't merged. So, I suppose for rebar projects need to add src/jiffy.app.src into https://github.com/stephb9959/jiffy.

@stephb9959
Copy link

Sorry @vkatsuba , this project uses erlang.mk and is made by running make instead of rebar. I put a note at the top of the readme but I forgot to mention this here. Hope this helps.

@vkatsuba
Copy link

vkatsuba commented Jul 1, 2020

Sorry @vkatsuba , this project uses erlang.mk and is made by running make instead of rebar. I put a note at the top of the readme but I forgot to mention this here. Hope this helps.

@stephb9959, sorry this my fault, I didn't pay attention to note at the top of the readme. Thanks.

@cburgmer
Copy link

This issue is now fixed with #199 and a new version is released. I hope my comment here notifies everybody subscribing to this issue here.

@legoscia
Copy link
Author

Indeed, jiffy 1.0.5 seems to work fine. Thanks @davisp !

philipcristiano added a commit to getkimball/api that referenced this issue Sep 4, 2020
philipcristiano added a commit to getkimball/api that referenced this issue Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants