-
Notifications
You must be signed in to change notification settings - Fork 66
Requirements
Elixir version 1.4 or later and Erlang/OTP version 18.0 or later.
You also need to have a C compiler, such as gcc, installed. For more information about installing the C dependencies, please read the directions below for the operating system you are using.
If you want to use Argon2, you will need to have a version of Erlang that supports dirty schedulers. This is available by default in Erlang 20.
You will need to install the C compiler and development tools. It is easier to install these tools as a group, but if you want to install them individually, you will need to install gcc
, make
and glibc
(libc6-dev
on Ubuntu / Debian).
We recommend downloading Erlang from erlang solutions, as the version of Erlang in the Ubuntu repositories is usually quite old.
If you install Erlang from the Ubuntu repositories, you will need to install erlang-dev
as well.
To install the C compilation tools:
sudo apt-get install build-essential
To install the C compilation tools:
dnf group install 'Development Tools'
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.
If you are using El Capitan
, you also need to deactivate the new rootless mode by running the following commands:
sudo nvram boot-args="rootless=0"; osascript -e 'tell app "loginwindow" to «event aevtrrst»'
sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2
If, when compiling Comeonin, you get an error which ends with /bin/sh -- no such file or directory
, it means that the compiler cannot find the default shell. This might be due to the default shell not being set, but it might also be due to a problem with the bash_profile
, or zsh_profile
file see this issue for details.
The easiest option is to install a recent version of Visual C++ Build Tools (on the downloads page, click on Other Tools and Frameworks, and then you will see the link for the C++ build tools).
After installing Visual C++ Build Tools, look in the Program Files (x86)
folder and search for Microsoft Visual Studio
. Note down the full path
of the folder with the highest version number.
Open the run
command and type in the following command (make sure that
the path and version number are correct):
For Visual Studio 2019:
Try looking for the vsdevcmd or vcvarsall.bat file, and then try one of the commands below (make sure that the path and version number are correct).
For Visual Studio 2017:
cmd /K "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd" -arch=x64
For Visual Studio 2015:
cmd /K "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
This should open up a command prompt with the necessary environment variables set,
and from which you will be able to run the commands mix compile
, mix deps.compile
and mix test
. Note that the last argument on command above, i.e. "amd64" is required even if
your computer is Intel-based.
You can also run the command from within your project folder with PowerShell, using
mix compile
right after should now work as expected.
If the above method does not work, there are two other options, both of which use Visual Studio.
The first, and most straightforward, option:
-
Install a recent version of Visual Studio (you can download the community edition for free). When you install Visual Studio, make sure you also install the C / C++ tools.
-
After installing VS, look in the
Program Files (x86)
folder and search forMicrosoft Visual Studio
. Note down the full path of the folder with the highest version number. -
Open the
run
command and type in the following command (make sure that the path and version number are correct):cmd /K "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
-
This should open up a command prompt with the necessary environment variables set, and from which you will be able to run the commands
mix compile
,mix deps.compile
andmix test
. -
Once you know that the above command works, you can create a shortcut for it so that it is easy to open in the future.
This second option is if you want to develop in Visual Studio:
- After installing Visual Studio, go to File > New > Project.
- Choose C++, it will prompt to install the module.
- Close and restart Visual Studio.
- Go to search > "Developer Command Prompt for VS2015".
- cd to the VC directory, run
vcvarsall.bat amd64
-- this must be run every time you open a new Command Prompt. - cd to your project and run
mix deps.get
, and thenmix deps.compile
.
If you still have problems building Comeonin, see this issue and / or this issue for other possible solutions.
See: https://msdn.microsoft.com/en-us/library/f2ccy3wt.aspx for more details about setting the environment variables.
See: https://msdn.microsoft.com/en-us/library/60k1461a.aspx for more details about C / C++ support in Visual Studio 2015.