1

I am trying to use eflame to profile CouchDB code to investigate some performance issues in my application. I tried adding the eflame dependency in rebar.config.script (https://github.com/apache/couchdb/blob/master/rebar.config.script)

However I get an error when I run configure to build CouchDB (2.0.0) from its source:

Dependency not available: eflame-.* ({git,
                                      "git://github.com/proger/eflame.git",
                                      {branch,"master"}})
ERROR: compile failed while processing /tmp/couchdb: rebar_abort
Makefile:67: recipe for target 'couch' failed

My change in the rebar.config.script in CouchDB source was adding a single line below (with a comma in the previous line of course)

{eflame, {url, "git://github.com/proger/eflame.git"}, {branch ,"master"}}

I tried various combinations of specifying the dependency as shown in rebar documentation but without any success.(I took into account the order of arguments in the MakeDep function in the rebar.config.script and accordingly tried to pass the arguments)

Any pointers to resolve will be greatly appreciated. Thanks! (Note : I am not familiar with Erlang or rebar , so please excuse any obvious mistakes)

Rohit
  • 583
  • 6
  • 9

2 Answers2

1

It looks like what's missing in your case is the second argument of the tuple, that requires the version number. You can use an asterix there if you don't need a specific one:

{eflame, ".*", {git, "git://github.com/proger/eflame.git", {branch, "master"}}}

Alternatively, if you are using rebar3, you could use the hex package:

{eflame, "1.0.1"}
Máté
  • 2,294
  • 3
  • 18
  • 25
  • Thank you for the response. Sorry I should have made it clearer. The change which I made is in a file from which rebar.config is derived i.e. line 67 in https://github.com/apache/couchdb/blob/master/rebar.config.script .So the ".*" is added in the function MakeDep – Rohit May 30 '17 at 10:23
  • I see, ok. In that case I don't think this answer would be much help. I can remove this if you like. – Máté May 30 '17 at 11:23
  • no problem.Thank you ..It did help me better state the question. I edited the question now.. – Rohit May 30 '17 at 14:10
0

There were two issues here

1)The version of rebar I was using was not > 1.5
2)I had to add get-deps before doing a rebar compile as given in this rebar dependencies issue post

Rohit
  • 583
  • 6
  • 9