## Issue Addressed Windows incompatibility. ## Proposed Changes On windows, lighthouse needs to default to STDIN as tty doesn't exist. Also Windows uses ACLs for file permissions. So to mirror chmod 600, we will remove every entry in a file's ACL and add only a single SID that is an alias for the file owner. Beyond that, there were several changes made to different unit tests because windows has slightly different error messages as well as frustrating nuances around killing a process :/ ## Additional Info Tested on my Windows VM and it appears to work, also compiled & tested on Linux with these changes. Permissions look correct on both platforms now. Just waiting for my validator to activate on Prater so I can test running full validator client on windows. Co-authored-by: ethDreamer <37123614+ethDreamer@users.noreply.github.com> Co-authored-by: Michael Sproul <micsproul@gmail.com>
3.6 KiB
Installation: Build from Source
Lighthouse builds on Linux, macOS, and Windows (native Windows support in BETA, we also support Windows via WSL).
Compilation should be easy. In fact, if you already have Rust and the build dependencies installed, all you need is:
git clone https://github.com/sigp/lighthouse.git
cd lighthouse
git checkout stable
make
If this doesn't work or is not clear enough, see the Detailed Instructions below. If you have further issues, see Troubleshooting. If you'd prefer to use Docker, see the Docker Guide.
Updating lighthouse
You can update Lighthouse to a specific version by running the commands below. The lighthouse
directory will be the location you cloned Lighthouse to during the installation process.
${VERSION}
will be the version you wish to build in the format vX.X.X
.
cd lighthouse
git fetch
git checkout ${VERSION}
make
Detailed Instructions
- Install the build dependencies for your platform
- Check the Dependencies section for additional information.
- Clone the Lighthouse repository.
- Run
$ git clone https://github.com/sigp/lighthouse.git
- Change into the newly created directory with
$ cd lighthouse
- Run
- Build Lighthouse with
$ make
. - Installation was successful if
$ lighthouse --help
displays the command-line documentation.
First time compilation may take several minutes. If you experience any failures, please reach out on discord or create an issue.
Dependencies
Installing Rust
The best way to install Rust (regardless of platform) is usually with rustup
- Use the
stable
toolchain (it's the default).
Windows Support
These instructions are for compiling or running Lighthouse natively on Windows, which is currently in BETA testing. Lighthouse can also run successfully under the Windows Subsystem for Linux (WSL). If using Ubuntu under WSL, you should follow the instructions for Ubuntu listed in the Dependencies (Ubuntu) section.
- Install Git
- Install Chocolatey Package Manager for Windows
- Install
make
viachoco install make
- Install
cmake
viachoco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'
- Install
Ubuntu
Several dependencies may be required to compile Lighthouse. The following packages may be required in addition a base Ubuntu Server installation:
sudo apt install -y git gcc g++ make cmake pkg-config
macOS
You will need cmake
. You can install via homebrew:
brew install cmake
Troubleshooting
Command is not found
Lighthouse will be installed to CARGO_HOME
or $HOME/.cargo
. This directory
needs to be on your PATH
before you can run $ lighthouse
.
See "Configuring the PATH
environment variable"
(rust-lang.org) for more information.
Compilation error
Make sure you are running the latest version of Rust. If you have installed Rust using rustup, simply type $ rustup update
.
If compilation fails with (signal: 9, SIGKILL: kill)
, this could mean your machine ran out of
memory during compilation. If you are on a resource-constrained device you can
look into cross compilation.
If compilation fails with error: linking with cc failed: exit code: 1
, try running cargo clean
.