mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-18 01:16:46 +00:00
clean up dependencies (#2008)
* clean up dependencies * use non-prce-mode for metrics * clean up obsolete snappy and gflags deps from manuals * conditional pcre
This commit is contained in:
parent
027e272007
commit
ab8f8ccaba
@ -30,7 +30,6 @@ install:
|
|||||||
build_script:
|
build_script:
|
||||||
# the 32-bit build is done on a 64-bit image, so we need to override the architecture
|
# the 32-bit build is done on a 64-bit image, so we need to override the architecture
|
||||||
- mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% CI_CACHE=NimBinaries update
|
- mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% CI_CACHE=NimBinaries update
|
||||||
- mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% fetch-dlls
|
|
||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
- mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% LOG_LEVEL=TRACE
|
- mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% LOG_LEVEL=TRACE
|
||||||
|
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@ -125,8 +125,7 @@ jobs:
|
|||||||
sudo dpkg --add-architecture i386
|
sudo dpkg --add-architecture i386
|
||||||
sudo apt-fast update -qq
|
sudo apt-fast update -qq
|
||||||
sudo DEBIAN_FRONTEND='noninteractive' apt-fast install \
|
sudo DEBIAN_FRONTEND='noninteractive' apt-fast install \
|
||||||
--no-install-recommends -yq gcc-multilib g++-multilib \
|
--no-install-recommends -yq gcc-multilib g++-multilib
|
||||||
libssl-dev:i386 libpcre3-dev:i386
|
|
||||||
mkdir -p external/bin
|
mkdir -p external/bin
|
||||||
cat << EOF > external/bin/gcc
|
cat << EOF > external/bin/gcc
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
@ -235,11 +234,6 @@ jobs:
|
|||||||
|
|
||||||
make -j$ncpu ARCH_OVERRIDE=$PLATFORM CI_CACHE=NimBinaries V=1 update
|
make -j$ncpu ARCH_OVERRIDE=$PLATFORM CI_CACHE=NimBinaries V=1 update
|
||||||
|
|
||||||
# Cached in "windows-dlls-cache" and exported globally
|
|
||||||
# if [[ '${{ runner.os }}' == 'Windows' ]]; then
|
|
||||||
# make -j$ncpu ARCH_OVERRIDE=$PLATFORM fetch-dlls
|
|
||||||
# fi
|
|
||||||
|
|
||||||
- name: Get latest fixtures commit hash
|
- name: Get latest fixtures commit hash
|
||||||
if: matrix.target.TEST_KIND == 'unit-tests'
|
if: matrix.target.TEST_KIND == 'unit-tests'
|
||||||
id: fixtures_version
|
id: fixtures_version
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
Next
|
||||||
|
=================
|
||||||
|
|
||||||
|
* Avoid pcre dependency
|
||||||
|
|
||||||
2020-11-12 v0.6.2
|
2020-11-12 v0.6.2
|
||||||
=================
|
=================
|
||||||
|
|
||||||
|
2
Makefile
2
Makefile
@ -13,6 +13,8 @@ BUILD_SYSTEM_DIR := vendor/nimbus-build-system
|
|||||||
# we set its default value before LOG_LEVEL is used in "variables.mk"
|
# we set its default value before LOG_LEVEL is used in "variables.mk"
|
||||||
LOG_LEVEL := INFO
|
LOG_LEVEL := INFO
|
||||||
|
|
||||||
|
LINK_PCRE := 0
|
||||||
|
|
||||||
# we don't want an error here, so we can handle things later, in the ".DEFAULT" target
|
# we don't want an error here, so we can handle things later, in the ".DEFAULT" target
|
||||||
-include $(BUILD_SYSTEM_DIR)/makefiles/variables.mk
|
-include $(BUILD_SYSTEM_DIR)/makefiles/variables.mk
|
||||||
|
|
||||||
|
21
README.md
21
README.md
@ -65,7 +65,6 @@ At the moment, Nimbus has to be built from source.
|
|||||||
Nimbus has the following external dependencies:
|
Nimbus has the following external dependencies:
|
||||||
|
|
||||||
* Developer tools (C compiler, Make, Bash, Git)
|
* Developer tools (C compiler, Make, Bash, Git)
|
||||||
* PCRE
|
|
||||||
|
|
||||||
Nim is not an external dependency, Nimbus will build its own local copy.
|
Nim is not an external dependency, Nimbus will build its own local copy.
|
||||||
|
|
||||||
@ -74,13 +73,13 @@ Nim is not an external dependency, Nimbus will build its own local copy.
|
|||||||
On common Linux distributions the dependencies can be installed with:
|
On common Linux distributions the dependencies can be installed with:
|
||||||
```sh
|
```sh
|
||||||
# Debian and Ubuntu
|
# Debian and Ubuntu
|
||||||
sudo apt-get install build-essential git libpcre3-dev
|
sudo apt-get install build-essential git
|
||||||
|
|
||||||
# Fedora
|
# Fedora
|
||||||
dnf install @development-tools pcre
|
dnf install @development-tools
|
||||||
|
|
||||||
# Archlinux, using an AUR manager for pcre-static
|
# Archlinux, using an AUR manager
|
||||||
yourAURmanager -S base-devel pcre-static
|
yourAURmanager -S base-devel
|
||||||
```
|
```
|
||||||
|
|
||||||
### MacOS
|
### MacOS
|
||||||
@ -88,7 +87,7 @@ yourAURmanager -S base-devel pcre-static
|
|||||||
Assuming you use [Homebrew](https://brew.sh/) to manage packages:
|
Assuming you use [Homebrew](https://brew.sh/) to manage packages:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
brew install pcre cmake
|
brew install cmake
|
||||||
```
|
```
|
||||||
|
|
||||||
Make sure you have [CMake](https://cmake.org/) installed, to be able to build libunwind (used for [lightweight stack traces](https://github.com/status-im/nim-libbacktrace)).
|
Make sure you have [CMake](https://cmake.org/) installed, to be able to build libunwind (used for [lightweight stack traces](https://github.com/status-im/nim-libbacktrace)).
|
||||||
@ -96,7 +95,6 @@ Make sure you have [CMake](https://cmake.org/) installed, to be able to build li
|
|||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
You can install the developer tools by following the instruction in our [Windows dev environment section](#windows-dev-environment).
|
You can install the developer tools by following the instruction in our [Windows dev environment section](#windows-dev-environment).
|
||||||
It also provides a downloading script for prebuilt PCRE.
|
|
||||||
|
|
||||||
### Android
|
### Android
|
||||||
|
|
||||||
@ -107,7 +105,7 @@ Note, the Ubuntu PRoot is known to contain all Nimbus prerequisites compiled on
|
|||||||
*Assuming Ubuntu PRoot is used*
|
*Assuming Ubuntu PRoot is used*
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
apt install build-essential git libpcre3-dev
|
apt install build-essential git
|
||||||
```
|
```
|
||||||
|
|
||||||
## For users
|
## For users
|
||||||
@ -350,11 +348,6 @@ and run this in a "Git Bash" terminal:
|
|||||||
git config --global core.longpaths true
|
git config --global core.longpaths true
|
||||||
```
|
```
|
||||||
|
|
||||||
If you don't want to compile PCRE separately, you can fetch pre-compiled DLLs with:
|
|
||||||
```bash
|
|
||||||
mingw32-make fetch-dlls # this will place the right DLLs for your architecture in the "build/" directory
|
|
||||||
```
|
|
||||||
|
|
||||||
> If you were following the Windows testnet instructions, you can jump back to [Connecting to testnets](#connecting-to-testnets) now
|
> If you were following the Windows testnet instructions, you can jump back to [Connecting to testnets](#connecting-to-testnets) now
|
||||||
|
|
||||||
You can now follow those instructions in the previous section by replacing `make` with `mingw32-make` (regardless of your 32-bit or 64-bit architecture):
|
You can now follow those instructions in the previous section by replacing `make` with `mingw32-make` (regardless of your 32-bit or 64-bit architecture):
|
||||||
@ -412,7 +405,7 @@ sudo vi /etc/dphys-swapfile
|
|||||||
sudo reboot
|
sudo reboot
|
||||||
|
|
||||||
# Install prerequisites
|
# Install prerequisites
|
||||||
sudo apt-get install git libgflags-dev libsnappy-dev libpcre3-dev
|
sudo apt-get install git
|
||||||
|
|
||||||
# Then you can follow instructions for Linux.
|
# Then you can follow instructions for Linux.
|
||||||
|
|
||||||
|
@ -63,7 +63,6 @@ jobs:
|
|||||||
git config --global core.longpaths true
|
git config --global core.longpaths true
|
||||||
git config --global core.autocrlf false
|
git config --global core.autocrlf false
|
||||||
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} CI_CACHE=NimBinaries update
|
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} CI_CACHE=NimBinaries update
|
||||||
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} fetch-dlls
|
|
||||||
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} LOG_LEVEL=TRACE
|
mingw32-make -j2 ARCH_OVERRIDE=${PLATFORM} LOG_LEVEL=TRACE
|
||||||
if [[ $PLATFORM == "x64" ]]; then
|
if [[ $PLATFORM == "x64" ]]; then
|
||||||
# everything builds more slowly on 32-bit, since there's no libbacktrace support
|
# everything builds more slowly on 32-bit, since there's no libbacktrace support
|
||||||
|
@ -63,6 +63,7 @@ else:
|
|||||||
|
|
||||||
const currentDir = currentSourcePath()[0 .. ^(len("config.nims") + 1)]
|
const currentDir = currentSourcePath()[0 .. ^(len("config.nims") + 1)]
|
||||||
switch("define", "nim_compiler_path=" & currentDir & "env.sh nim")
|
switch("define", "nim_compiler_path=" & currentDir & "env.sh nim")
|
||||||
|
switch("define", "withoutPCRE")
|
||||||
|
|
||||||
switch("import", "testutils/moduletests")
|
switch("import", "testutils/moduletests")
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ FROM debian:bullseye-slim AS build
|
|||||||
SHELL ["/bin/bash", "-c"]
|
SHELL ["/bin/bash", "-c"]
|
||||||
|
|
||||||
RUN apt-get -qq update \
|
RUN apt-get -qq update \
|
||||||
&& apt-get -qq -y install build-essential libpcre3-dev git &>/dev/null \
|
&& apt-get -qq -y install build-essential git &>/dev/null \
|
||||||
&& apt-get -qq clean \
|
&& apt-get -qq clean \
|
||||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ FROM debian:bullseye-slim as deploy
|
|||||||
SHELL ["/bin/bash", "-c"]
|
SHELL ["/bin/bash", "-c"]
|
||||||
|
|
||||||
RUN apt-get -qq update \
|
RUN apt-get -qq update \
|
||||||
&& apt-get -qq -y install libpcre3 psmisc &>/dev/null \
|
&& apt-get -qq -y install psmisc &>/dev/null \
|
||||||
&& apt-get -qq clean \
|
&& apt-get -qq clean \
|
||||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
|
2
docker/dist/base_image/Dockerfile
vendored
2
docker/dist/base_image/Dockerfile
vendored
@ -11,7 +11,7 @@ FROM ubuntu:20.04
|
|||||||
SHELL ["/bin/bash", "-c"]
|
SHELL ["/bin/bash", "-c"]
|
||||||
|
|
||||||
RUN apt-get -qq update \
|
RUN apt-get -qq update \
|
||||||
&& apt-get -qq -y install build-essential libpcre3-dev git &>/dev/null \
|
&& apt-get -qq -y install build-essential git &>/dev/null \
|
||||||
&& apt-get -qq clean \
|
&& apt-get -qq clean \
|
||||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ FROM debian:bullseye-slim
|
|||||||
SHELL ["/bin/bash", "-c"]
|
SHELL ["/bin/bash", "-c"]
|
||||||
|
|
||||||
RUN apt-get -qq update \
|
RUN apt-get -qq update \
|
||||||
&& apt-get -qq -y install build-essential libpcre3-dev git &>/dev/null \
|
&& apt-get -qq -y install build-essential git &>/dev/null \
|
||||||
&& apt-get -qq clean \
|
&& apt-get -qq clean \
|
||||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
|
@ -28,11 +28,8 @@ Variables -> Path -> Edit -> New -> C:\mingw-w64\mingw64\bin (it's "C:\mingw-w64
|
|||||||
|
|
||||||
Install [Git for Windows](https://gitforwindows.org/) and use a "Git Bash" shell to clone and build nimbus-eth2.
|
Install [Git for Windows](https://gitforwindows.org/) and use a "Git Bash" shell to clone and build nimbus-eth2.
|
||||||
|
|
||||||
If you don't want to compile PCRE separately, you can fetch pre-compiled DLLs with:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mingw32-make # this first invocation will update the Git submodules
|
mingw32-make # this first invocation will update the Git submodules
|
||||||
mingw32-make fetch-dlls # this will place the right DLLs for your architecture in the "build/" directory
|
|
||||||
```
|
```
|
||||||
|
|
||||||
You can now follow the instructions in this this book by replacing `make` with `mingw32-make` (you should run `mingw32` regardless of whether you're running 32-bit or 64-bit architecture):
|
You can now follow the instructions in this this book by replacing `make` with `mingw32-make` (you should run `mingw32` regardless of whether you're running 32-bit or 64-bit architecture):
|
||||||
@ -88,7 +85,7 @@ sudo vi /etc/dphys-swapfile
|
|||||||
sudo reboot
|
sudo reboot
|
||||||
|
|
||||||
# Install prerequisites
|
# Install prerequisites
|
||||||
sudo apt-get install git libgflags-dev libsnappy-dev libpcre3-dev
|
sudo apt-get install git
|
||||||
|
|
||||||
# Then you can follow instructions for Linux.
|
# Then you can follow instructions for Linux.
|
||||||
|
|
||||||
|
@ -21,7 +21,6 @@ If the above sounds like latin to you, don't worry. You should be fine as long a
|
|||||||
## External Dependencies
|
## External Dependencies
|
||||||
|
|
||||||
- Developer tools (C compiler, Make, Bash, Git)
|
- Developer tools (C compiler, Make, Bash, Git)
|
||||||
- [PCRE](https://www.pcre.org/)
|
|
||||||
|
|
||||||
Nimbus will build its own local copy of Nim, so Nim is not an external dependency,
|
Nimbus will build its own local copy of Nim, so Nim is not an external dependency,
|
||||||
|
|
||||||
@ -31,13 +30,13 @@ On common Linux distributions the dependencies can be installed with
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Debian and Ubuntu
|
# Debian and Ubuntu
|
||||||
sudo apt-get install build-essential git libpcre3-dev
|
sudo apt-get install build-essential git
|
||||||
|
|
||||||
# Fedora
|
# Fedora
|
||||||
dnf install @development-tools pcre
|
dnf install @development-tools
|
||||||
|
|
||||||
# Archlinux, using an AUR manager for pcre-static
|
# Archlinux, using an AUR manager
|
||||||
yourAURmanager -S base-devel pcre-static
|
yourAURmanager -S base-devel
|
||||||
```
|
```
|
||||||
|
|
||||||
### macOS
|
### macOS
|
||||||
@ -45,13 +44,12 @@ yourAURmanager -S base-devel pcre-static
|
|||||||
Assuming you use [Homebrew](https://brew.sh/) to manage packages
|
Assuming you use [Homebrew](https://brew.sh/) to manage packages
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
brew install pcre cmake
|
brew install cmake
|
||||||
```
|
```
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
You can install the developer tools by following the instruction in our [Windows dev environment section](./advanced.md#windows-dev-environment).
|
You can install the developer tools by following the instruction in our [Windows dev environment section](./advanced.md#windows-dev-environment).
|
||||||
We also provide a downloading script for prebuilt PCRE.
|
|
||||||
|
|
||||||
### Android
|
### Android
|
||||||
|
|
||||||
@ -62,6 +60,6 @@ We also provide a downloading script for prebuilt PCRE.
|
|||||||
Assuming you use Ubuntu PRoot
|
Assuming you use Ubuntu PRoot
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
apt install build-essential git libpcre3-dev
|
apt install build-essential git
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -209,11 +209,11 @@ ssh pi@195.177.101.93
|
|||||||
|
|
||||||
### 11. Install Nimbus dependencies
|
### 11. Install Nimbus dependencies
|
||||||
|
|
||||||
You'll need to install some packages (`git`, `libgflags-dev`, `libsnappy-dev`, and `libpcre3-dev`) in order for Nimbus to run correctly.
|
You'll need to install some packages (`git`) in order for Nimbus to run correctly.
|
||||||
|
|
||||||
To do so, run:
|
To do so, run:
|
||||||
```
|
```
|
||||||
sudo apt-get install git libgflags-dev libsnappy-dev libpcre3-dev
|
sudo apt-get install git
|
||||||
|
|
||||||
```
|
```
|
||||||
### 12. Install Screen
|
### 12. Install Screen
|
||||||
|
2
vendor/nimbus-build-system
vendored
2
vendor/nimbus-build-system
vendored
@ -1 +1 @@
|
|||||||
Subproject commit c278412dbf7fce294ca1fabb8264607c2971ea8f
|
Subproject commit a9a8e59b569dc72b576e3d5b94108181fa46f313
|
Loading…
x
Reference in New Issue
Block a user