[question] included rebar is compiled for erlang R15 releases, any specific reasons? #29

Closed
abhinavsingh opened this Issue Nov 1, 2012 · 4 comments

Comments

Projects
None yet
3 participants

Hi Ulf,

I have been using previous releases of gproc successfully with erlang R14* releases. Today I upgraded groc to HEAD and found included rebar is compiled with R15 release as indicated by the error below:

gproc $ erl1404 make
./rebar get-deps

=ERROR REPORT==== 1-Nov-2012::14:29:23 ===
Loading of /Users/abhinavsingh/Dev/gproc/rebar/rebar.beam failed: badfile
escript: exception error: undefined function rebar:main/1
  in function  escript:run/2
  in call from escript:start/1
  in call from init:start_it/1
  in call from init:start_em/1

=ERROR REPORT==== 1-Nov-2012::14:29:23 ===
beam/beam_load.c(1365): Error loading module rebar:
  use of opcode 153; this emulator supports only up to 152

However this succeeds:

gproc $ erl1501 make

Is there any specific reason for R15 based rebar?

Note: erl1404 and erl1501 are just aliases to different erlang release I have on my dev machine

Owner

uwiger commented Nov 1, 2012

Of course, this is a problem with including rebar in the first place, and gproc's Makefile now uses rebar from the path, if it exists. I suppose I could ensure that the include rebar is compiled with R14, for maximum compatibility... only, the latest rebar source doesn't seem to compile with R14B04, which is what I have installed - and the rebar repos doesn't have many helpful tags.

If you have a working rebar compiled with r14, and can verify that it works well for gproc in both R14 and R15, you are welcome to submit a patch.

Contributor

norton commented Nov 1, 2012

I typically compile rebar with R13B04.

 $ ./rebar --version
 rebar 2.0.0 R13B04 20121101_133034 git 2.0.0-233-g3ef1383

 $ ./rebar --version
 rebar 2.0.0 R14B04 20121101_133151 git 2.0.0-233-g3ef1383

The latest rebar/rebar (git://github.com/rebar/rebar.git) master builds OK for me.

Owner

uwiger commented Nov 1, 2012

Indeed, I tried again, and it worked this time.

I've pushed to master with the latest rebar built using OTP R14B04.

Let me know if there are any problems.

2012/11/1 Joseph Wayne Norton notifications@github.com

I typically compile rebar with R13B04.

$ ./rebar --version
rebar 2.0.0 R13B04 20121101_133034 git 2.0.0-233-g3ef1383

$ ./rebar --version
rebar 2.0.0 R14B04 20121101_133151 git 2.0.0-233-g3ef1383

The latest rebar/rebar (git://github.com/rebar/rebar.git) master builds
OK for me.


Reply to this email directly or view it on GitHubhttps://github.com/uwiger/gproc/issues/29#issuecomment-9980254.

@uwiger I added something on these lines inside Makefile:

REBAR=./rebar
REBAR_URL=http://cloud.github.com/downloads/basho/rebar/rebar

rebar:
    wget -q -O $REBAR $REBAR_URL
    chmod u+x $REBAR

This will fetch rebar which is built with commit dc472b built 23 April 2012 with Erlang R14B04
Also, just to confirm, latest pushed rebar works fine too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment