troubleshooting.md
May 19, 2020 ยท View on GitHub
If this file does not resolve your install, please open an issue.
If cargo build fails due to the crate gmp-mpfr-sys
This often manifests as a compilation failure from cargo build ending with
thread 'main' panicked at 'Program failed with code 2: "make" "-j" "12" "check"'
-
The
gmp-mpfr-syscrate buildsgmpandmpfrC libraries. This process uses libtools, which requires no spaces in the path to your clone. Move/rename the path to your clone and try again. -
Bypass the
gmp-mpfr-syscrate builds ofgmpandmpfrby installinggmpandmpfrexternally.-
install system libraries (GMP version 6.2, MPFR version 4.0.2-p1)
Mac:brew install gmp mpfrLinux:
Build gmp and mpfr from source. Then set the environment variable:export DEP_GMP_OUT_DIR=/path/to/folder/containing/lib/and/includesWindows:
This is not fully tested. Build gmp and mpfr from source. Then set the environment variable and also switch the rust toolchain:setx DEP_GMP_OUT_DIR=/path/to/folder/containing/lib/and/includes rustup toolchain install stable-%WN_SYS_ARCH%-pc-windows-gnu rustup default stable-%WN_SYS_ARCH%-pc-windows-gnu -
You will no longer be able to run
cargo buildon the virtual root crate because they have different feature flags. Just build each crate separately.To build the runtime, set the feature flag
cd runtime-rust; cargo build --features use-system-libsWhen building any of the language bindings, just set the variable
export WN_USE_SYSTEM_LIBS=true
-
-
Bypass the
gmp-mpfr-syscrate completely. WARNING: do not publish releases using a library build without secure noise
This feature is currently only available in thems-exponential-4branch.To build the runtime, set the feature flag
cd runtime-rust; cargo build --no-default-featuresWhen building any of the language bindings, just set the variable
export WN_USE_VULNERABLE_NOISE=true
If cargo build fails due to the package openssl
Provide an alternative openssl installation, either via directions in the automatic or manual section:
Windows installation without WSL
choco install rust msys2 protoc python
For non-Chocolatey users: download and install the latest build of rust, msys2, protobuf and python
- https://forge.rust-lang.org/infra/other-installation-methods.html
- https://github.com/protocolbuffers/protobuf/releases/latest
- https://www.msys2.org/
- https://www.python.org/downloads/windows/
Then install gcc under MSYS2
refreshenv
reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && setx WN_SYS_ARCH=i686 || setx WN_SYS_ARCH=x86_64
bash -xlc "pacman --noconfirm -S --needed pacman-mirrors"
bash -xlc "pacman --noconfirm -S --needed diffutils make mingw-w64-%WN_SYS_ARCH%-gcc"
You can test with bash -xc cargo build. The bash prefix ensures that gmp and mpfr build with the GNU/gcc/mingw toolchain.