This script is used by many of Meta's OSS tools. It will download and build all of the necessary dependencies first, and will then invoke cmake etc to build the Eden components. This will help ensure that you build with relevant versions of all of the dependent libraries, taking into account what versions are installed locally on your system.
It's written in python so you'll need python3.6 or later on your PATH. It works on Linux, macOS and Windows.
The settings for eden's cmake builds are held in its getdeps manifests: Eden CLI: `build/fbcode_builder/manifests/eden_scm`, EdenFS: `build/fbcode_builder/manifests/eden`, and Mononoke: `build/fbcode_builder/manifests/mononoke` which you can edit locally if desired. Most getdeps commands take the manifest name as a paramenter (example below).
### Dependencies
If on Linux or MacOS (with homebrew installed) you can install system dependencies to save building them:
Specify `eden_scm` for Eden CLI, `eden` for EdenFS, or `mononoke` for Mononoke build.
It puts output in its scratch area. You can find the default scratch install location from logs or with `python3 ./build/fbcode_builder/getdeps.py show-inst-dir eden_scm`
You can also specify a `--scratch-path` argument to control
the location of the scratch directory used for the build.
There are also
`--install-dir` and `--install-prefix` arguments to provide some more
fine-grained control of the installation directories. However, given that
EdenSCM provides no compatibility guarantees between commits we generally
recommend building and installing to a temporary location, rather than
installing to the traditional system installation directories.
If you want to invoke `cmake` again to iterate on EdenFS, there is a helpful `run_cmake.py` script output in the scratch build directory. You can find the scratch build directory from logs or with `python3 ./build/fbcode_builder/getdeps.py show-build-dir eden`
### Run tests
By default `getdeps.py` will build the tests for a manifest eden_scm. To run them:
cd eden
python3 ./build/fbcode_builder/getdeps.py --allow-system-packages test eden_scm
## Build with cmake directly
If you don't want to let getdeps invoke cmake for you then by default, building the tests is disabled as part of the CMake `all` target.
To build the tests, specify `-DBUILD_TESTS=ON` to CMake at configure time.
NB if you want to invoke `cmake` again to iterate on a `getdeps.py` build, there is a helpful `run_cmake.py` script output in the scratch-path build directory. You can find the scratch build directory from logs or with `python3 ./build/fbcode_builder/getdeps.py show-build-dir`
Running tests with ctests also works if you cd to the build dir, e.g. `
Use the `getdeps.py` approach above. We test in CI on Ubuntu LTS, and occasionally on other distros.
If you find the set of system packages is not quite right for your chosen distro, you can specify distro version specific overrides in the dependency manifests (e.g. `build/fbcode_builder/manifests/boost` ). You could probably make it work on most recent Ubuntu/Debian or Fedora/Redhat derived distributions.
At time of writing (Feb 2022) there is a build break on GCC 11.x based systems in folly which in turn will break fbthrift and thus Eden. Using Ubuntu 20.04 in a virtual environment is one possible workaround for this to try out the Eden tools.
## Windows
Eden CLI, EdenFS are used on Windows. `getdeps.py` would be the way to start with EdenFS having the higher chance of success, however we don't run these in github CI
Mononoke is not supported on Windows.
## macOS
`getdeps.py` builds work on macOS and are tested in CI, however if you prefer, you can try one of the macOS package managers