-
Notifications
You must be signed in to change notification settings - Fork 86
Building the app: OSX Potential issues
The following outlines some possible build issues seen by users in the past on Mac OSX.
Each issue happens following a run of:
mix deps.get
mix ecto.create # <= issues occur here
If you see an error similar to this:
Updating package registry...
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult rebar3.crashdump
===> When submitting a bug report, please include the output of `rebar3 report "your command"
** (Mix) Could not compile dependency :idna,
This may be the result of a flawed erlang installation. If you built your erlang from source, you may wish to rebuild with all options enabled or use a pre-packaged build such as the ESL Erlang installer found here: https://www.erlang-solutions.com/resources/download.html
If you see an error similar to this:
Makefile: No such file or directory make: No rule to make target Makefile. Stop. (Mix) Could not compile with make (exit status: 2). Depending on your OS, make sure to follow these instructions:
Mac OS X: You need to have gcc and make installed. Try running the commands "gcc --version" and / or "make --version". If these programs are not installed, you will be prompted to install them.
Linux: You need to have gcc and make installed. If you are using Ubuntu or any other Debian-based system, install the packages "build-essential". Also install "erlang-dev" package if not included in your Erlang/OTP version. If you're on Fedora, run "dnf group install 'Development Tools'".
First, follow the instructions here: https://github.com/riverrun/comeonin/wiki/Requirements
BUT change the following line:
sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2
to:
sudo ln -s /usr/bin/gcc /usr/local/bin/gcc-4.2
Then you will need to blank out your .profile
(or .bash_profile
, etc) file if you are using any shell other than /bin/sh
.
The Makefile appears to attempt to use
/bin/sh
and gets confused by other shells, especially if they have aliases or complicated environment setups as anyone who has used a shell for more than a couple months is likely to.
If you see an error similar to this:
** (CompileError) lib/code_corps_web/controllers/token_controller.ex:4: module Comeonin.Bcrypt is not loaded and could not be found
(stdlib) erl_eval.erl:670: :erl_eval.do_apply/6
(elixir) lib/kernel/parallel_compiler.ex:121: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/1
Do the steps for issue 2 above.
Then add the bcrypt_elixir
dependency to the main mix.exs
file.
You may need to run mix
deps.get
at this point to fetch the dependency)
Finally change the Makefile
for the bcrypt
build itself (this will be under deps/bcrypt_elixir
) itself: hardcode the path to erlang instead of relying on the eval
the Makefile
uses.
This
eval
appears to get log file paths mixed into the erlang executable path.