launchdarkly/erlang-server-sdk

"No Makefile to build dependency" error when running "make" and "make test"

quinlanjager opened this issue · 7 comments

When I run make using GNU Make 4.2.1 from the project root, as per the contributing guidelines, I get the following error.

Error: No Makefile to build dependency /Users/quinlan/code/work/erlang-server-sdk/deps/shotgun.
gmake: *** [erlang.mk:4388: deps] Error 2

Looking at the Shotgun repo, it looks like they don't have a Makefile and they recommend using rebar3.

Running rebar3 compile allows me to compile the SDK, but I can't run the tests with rebar3's test runner, eunit.

How should I compile the SDK and run the project's tests?

Hi @quinlanjager we didn't make it very clear in the contributing guidelines but you'll need to install erlang.mk to use make. erlang.mk was the original buildtool while rebar3 was added later. Please let us know if this resolves your issue.

Hey @torchhound, thanks for the clarification.

I did follow the MacOS installation instructions on the erlang.mk website before running gmake.

As far as I can tell I have an up to date version of erlang.mk and it looks like there is an erlang.mk file in the project already. Forgive my naivety, but am I missing something?

I'm running GNU Make 3.81 and make works on a fresh clone of the repo. I'm not sure at which version erlang.mk won't work anymore.

unix1 commented

@quinlanjager can you post your make --version output? Mine is:

$ make --version
GNU Make 4.2.1
Built for x86_64-apple-darwin17.6.0
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

@unix1 mine looks similar. Looks like my OS is at 18.2.0 where yours is at version 17.6.0.

GNU Make 4.2.1
Built for x86_64-apple-darwin18.2.0
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
unix1 commented

@quinlanjager thanks! We'll try to reproduce. In the meantime, you should be able to run tests with rebar3 ct against the latest master. If that also doesn't work, please post output.

unix1 commented

We have removed the erlang.mk dependency. Makefile now uses rebar3, so I believe this is resolved.