Skip to content

Latest commit

 

History

History
125 lines (90 loc) · 3.02 KB

build-environment.md

File metadata and controls

125 lines (90 loc) · 3.02 KB

Setup your build environment

The instructions below show the necessary steps to configure the environment to build all modes of libursa. There are convenience docker images in the docker folder that can be used.

Fedora, RedHat, CentOS

  1. Install build tools
yum -y install make autoconf libtool curl python3 pkg-config openssl-devel
  1. Install rust
curl -sSf https://sh.rustup.rs | sh -s -- -y
  1. Initialize rust environment
source ~/.cargo/env

OpenSUSE

  1. Install build tools
zypper --non-interactive install make gcc autoconf libtool curl python3 pkg-config openssl-devel
  1. Install rust
curl -sSf https://sh.rustup.rs | sh -s -- -y
  1. Initialize rust environment
source ~/.cargo/env

Debian, Ubuntu

  1. Install build tools
apt-get install -y cmake autoconf libtool curl python3 pkg-config libssl-dev
  1. Install rust
curl -sSf https://sh.rustup.rs | sh -s -- -y
  1. Initialize rust environment
source ~/.cargo/env

Mac OS X

  1. Install xcode command line tools
xcode-select --install
  1. Install rust
curl -sSf https://sh.rustup.rs | sh -s -- -y
  1. Install brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  1. Install build tools
brew install pkg-config
brew install automake
brew install autoconf
brew install cmake
brew install libtool
  1. Initialize rust environment
source ~/.cargo/env

Windows 10

  1. Download the most recent Visual Studio Community Edition here. This is currently the 2019 version.
    • Check the box for Desktop development with C++
    • In the small menu on the right hand side also check the box for C++/CLI support
  2. Download git-scm for windows here
    • Install git for windows using:
    • Use Git from Git Bash Only so it doesn't change any path settings of the command prompt
    • Checkout as is, commit Unix-style line endings
    • Use MinTTY
    • Check all the boxes for:
      1. Enable file system caching
      2. Enable Git Credential Manager
      3. Enable symbolic links
  3. Download rust for windows here
    • Choose option 1: proceed with installation (default)
    • Note: if you have antivirus software on your computer, you will likely have to disable it for Rust to correctly install. In addition, it is advisable to install in a terminal that is "run as an administrator."
  4. Download the most recent OpenSSL for windows here
    • Choose for "Copy OpenSSL DLLs to:" The OpenSSL binaries (/bin) directory
  5. Set the environment variables
    • Note that these may vary. If your Ursa build fails because it cannot find OpenSSL, check your environment variables!
    • Windows command prompt: set OPENSSL_DIR "C:\Program Files\OpenSSL-Win64"
    • Git Bash export OPENSSL_DIR=/c/Program Files/OpenSSL-Win64