gitlab.com/aquachain/aquachain@v1.17.16-rc3.0.20221018032414-e3ddf1e1c055/Documentation/user-guide/Compiling.md (about)

     1  # Building from the source
     2  
     3  You will need the latest version of the Go programming language.
     4  
     5  Here we are using go1.19.2, there is likely a [newer version of go](https://golang.org/dl/), use that instead.
     6  
     7  ### Installing Go on Linux
     8  
     9  ```
    10  wget https://go.dev/dl/go1.19.2.linux-amd64.tar.gz
    11  sudo tar xvaf go1.19.2.linux-amd64.tar.gz -C /usr/local/
    12  sudo ln /usr/local/go/bin/go* /usr/local/bin/
    13  ```
    14  
    15  ### Installing Go on Apple macOS
    16  
    17  ```
    18  wget https://go.dev/dl/go1.19.2.darwin-amd64.tar.gz
    19  sudo tar xvaf go1.19.2.darwin-amd64.tar.gz -C /usr/local/
    20  sudo ln /usr/local/go/bin/go* /usr/local/bin/
    21  ```
    22  
    23  ### Checking Go version
    24  
    25  ```
    26  which go
    27  go version
    28  ```
    29  
    30  ## Downloading The Source
    31  
    32  ```
    33  git clone https://gitlab.com/aquachain/aquachain
    34  cd aquachain
    35  ```
    36  
    37  ## Compiling
    38  
    39  In the base directory of the repository, you can run a variety of 'make' targets.
    40  
    41  When finished compiling, they are in the `./bin` directory.
    42  
    43  build the Aquachain command (p2p node, rpc server)
    44  
    45  ```
    46  make
    47  ```
    48  
    49  it should pop out as ./bin/aquachain or ./bin/aquachain.exe if on windows.
    50  
    51  ### Customized Build
    52  
    53  or build any of the available targets
    54  
    55  ```
    56  all           crossold      goget         race
    57  bin/          default       hash          release
    58  bootnode      devtools      help          release/
    59  checkrelease  docs          install       test
    60  clean         echoflags     linter
    61  cross         generate      package
    62  
    63  ```
    64  
    65  ## Cross Compilation
    66  
    67  This is how releases can be made, using pure Go toolchain and no C dependencies.
    68  
    69  ```
    70  make clean release release=1
    71  
    72  ```
    73  
    74  ## Contributing
    75  
    76  If you are contributing, you will want to 'fork' the main repo on github, and add your fork like so, changing `your-name` and `patch-1` to whatever you need:
    77  
    78  ```
    79  git remote add fork git@github.com:yourname/aquachain.git
    80  git checkout -b patch-1
    81  ```
    82  
    83  When done making commits, use `git push fork patch-1` and either open a pull request or ask to merge.
    84  
    85  During development on your branch there may be many commits on the `master` branch. You can re-synchronize by using `git pull -r origin master` or `git rebase -i` to avoid needing _Merge commits_.
    86