dalmatinerdb / ddb_proxy

Proxy for other metric protocols
MIT License
9 stars 5 forks source link

trouble building #17

Open jonathanstrong opened 7 years ago

jonathanstrong commented 7 years ago

I'm trying to get dalmatinerdb up but having trouble building this proxy. I have very little experience with erlang or the build tools that are used. Here is the rebar3 crashdump I receive:

Error: function_clause
[{relx,format_error,
       [{error,eacces}],
       [{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/relx.erl"},
        {line,220}]},
 {relx,report_error,2,
       [{file,"/home/tristan/Devel/rebar3/_build/default/lib/relx/src/relx.erl"},
        {line,336}]},
 {rebar_relx,do,4,
             [{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_relx.erl"},
              {line,38}]},
 {rebar3_cuttlefish_release,do,1,
                            [{file,"/home/jstrong/src/ddb_proxy/_build/default/plugins/rebar3_cuttlefish/src/rebar3_cuttlefish_release.erl"},
                             {line,89}]},
 {rebar_core,do,2,
             [{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_core.erl"},
              {line,153}]},
 {rebar3,main,1,
         [{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar3.erl"},
          {line,66}]},
 {escript,run,2,[{file,"escript.erl"},{line,757}]},
 {escript,start,1,[{file,"escript.erl"},{line,277}]}]

Any help would be greatly appreciated!

Licenser commented 7 years ago

Hi this is related to https://github.com/dalmatinerdb/dalmatinerdb/issues/119 sadly based on a bug in the rebar3 build tool on OSX you can still use the docker compose example to get a version up and running to test on your mac: https://github.com/dalmatinerdb/docker-ddb-compose

Licenser commented 7 years ago

Some testing the following is a workaround:

chmod -R u+w /usr/local/Cellar/erlang/*/lib/erlang/lib/*/ebin/*.app
jonathanstrong commented 7 years ago

my apologies, should have mentioned my system in the initial post: running Ubuntu 16.04. Not sure if the fix would still apply.

Licenser commented 7 years ago

the fix for the moment (as ugly as it is) is to give the user permissions to write the .app files the rebar3 threat has some details on to why. I suspect does apply to ubuntu just on a different path depending on where your erlang is installed :)

jonathanstrong commented 7 years ago

hmm, just found the .app files and ran `sudo chmod u+w -R /usr/lib/erlang/lib//ebin/*.appbut got what looks to be the same error message. I checked all the .app files have-rw-r--r--` permissions. is that right?

Licenser commented 7 years ago

if it's owned by you then yes. if it's not owned by you I suspect it gets a more complicated. The original suggested permissions are 0666 (I think that's rw for everyone) the u+w works as long as you own the files anywyas.

jonathanstrong commented 7 years ago

they are owned by root, not me (jstrong). is it as simple as sudo rebar3 release?

Licenser commented 7 years ago

Sure worth giving a try I guess :)

jonathanstrong commented 7 years ago

gah - yes - that was it. can't believe I spent this much time on this. assumed I was just building it locally, not needing permissions. Thanks!

Licenser commented 7 years ago

It's a bug, it should just work, sadly it's a bug so deep into build tool land that we can't just fix it in the project :)