Closed mesosteros closed 9 years ago
Tested in my Ubuntu VM and also got a similar result:
==> comeonin
could not compile dependency comeonin, mix compile failed. You can recompile this dependency with `mix deps.compile comeonin` or update it with `mix deps.update comeonin`
** (Mix.Error) Could not compile Comeonin.
Please make sure that you are using Erlang / OTP version 17.0 or later
and that you have a C compiler installed.
Please follow the directions below for the operating system you are
using:
Windows: One option is to install a recent version of Visual Studio (the
free Community edition will be enough for this task). Then try running
`mix deps.compile comeonin` from the `Developer Command Prompt`.
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 package
`build essential`.
mix.exs:24: Mix.Tasks.Compile.Comeonin.handle_error/0
(elixir) lib/enum.ex:977: anonymous fn/3 in Enum.map/2
(elixir) lib/enum.ex:1261: Enum."-reduce/3-lists^foldl/2-0-"/3
(elixir) lib/enum.ex:977: Enum.map/2
(mix) lib/mix/tasks/compile.all.ex:15: Mix.Tasks.Compile.All.run/1
(mix) lib/mix/tasks/compile.ex:64: Mix.Tasks.Compile.run/1
(mix) lib/mix/tasks/deps.compile.ex:105: anonymous fn/2 in Mix.Tasks.Deps.Compile.do_mix/1
(mix) lib/mix/project.ex:196: Mix.Project.in_project/4
I checked and I have both gcc and make installed. Also the build-essential package.
Installing Visual Studio Express in order to get nmake and also installing directly erlang+otp allowed me to further progress. I'm now with the following error:
C:\Users\mesos_000\Desktop\elixir Projects\testeAddict>mix deps.compile comeonin
==> comeonin
Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
'priv\bcrypt_nif.dll' is up-to-date
Compiled lib/comeonin/config.ex
Compiled lib/comeonin/pbkdf2_base64.ex
Compiled lib/comeonin/bcrypt_base64.ex
Compiled lib/comeonin/tools.ex
Compiled lib/comeonin.ex
Compiled lib/comeonin/password.ex
Compiled lib/comeonin/pbkdf2.ex
== Compilation error on file lib/comeonin/bcrypt.ex ==
** (MatchError) no match of right hand side value: {:error, :on_load_failure}
(stdlib) erl_eval.erl:669: :erl_eval.do_apply/6
could not compile dependency comeonin, mix compile failed. You can recompile this dependency with `mix deps.compile comeonin` or update it with `mix deps.update comeonin`
On my Ubuntu VM, installing erlang solved the issue.
@mesosteros hey! Sorry you're bumping into those issues :/ I don't currently have a Windows machine, have you tried asking for help to the comeonin guys? People at #elixir-lang at freenode are also extremely helpful.
@mesosteros updated the comeonin dependency, according to #52 it has more helpful build messages.
@trenpixster Tried it again to no avail. I keep getting the bcrypt error.
Just to be sure, did you update the addict reference on your mix.exs
to 0.1.0
? Also did you try running mix deps.clean --all
and mix deps.get
?
Yes. I tried it on a whole new project in fact. I've digged a bit further down and it seems this is related to a node-gyp issue which is a dependency of bcrypt which in turn is a dependency of comeonin. I'm trying a solution from the node-gyp project page and will let you know if it fixes this. (https://github.com/nodejs/node-gyp/issues/629)
No luck.
Have you considered using docker? :stuck_out_tongue:
No. Can't use docker for what I want... but I did manage to get through it... finally... I deleted the bcrypt.ex file from the /deps/comeonin/lib/comeonin/ folder... then mix phoenix.server ran smoothly.
Interesting hack, glad it worked! Kinda sucks that you'll have to remind to do that every time though. Closing this one for now, thanks for explaining the solution to your issue here :+1:
Finally managed to get through the issue without deleting bcrypt.ex. I created a symlink to my profile folder as it was non-ASCII standard (mesos_000 instead of mesos). I did it like so:
Run Command Prompt (as administrator):
cd C:\Users
mklink /d mesos mesos_000
Then run the Developer Command Prompt installed with Visual Studio 2015 (from the start menu -> applications), also as administrator, going to
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\
and running the command vcvarsall.bat amd64
Finally, I created a completely new phoenix project in my elixir projects folder, added
{:addict, ">= 0.1.0"}
mix deps.get
mix deps.compile comeonin
and pronto.
Awesome! It'd be cool to also add that information to the comeonin project :+1:
I tried installing addict in my Phoenix Project however I'm getting an error. I tried the exact same process on a colleague's Mac OS X and he does not get the error, while I on Windows do. The error comes from the comeonin dependency. I've also tried it in both Phoenix 0.14 and the 0.15 update that was released yesterday.
Steps to recreate:
defp deps do [{:phoenix, "~> 0.15"}, {:phoenix_ecto, "~> 0.8"}, {:postgrex, ">= 0.0.0"}, {:phoenix_html, "~> 1.4"}, {:phoenix_live_reload, "~> 0.5", only: :dev}, {:addict, "~> 0.0.5"}, {:cowboy, "~> 1.0"}] end
Compile dependencies:
$ mix deps.get
Results:
Run Phoenix project again:
$ mix phoenix.server
Results (here's the error):
Attempt suggestions:
$ mix deps.compile comeonin
Results:
Result: same error as above.
Results: