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:
Jacek Sieka 2020-11-13 16:00:45 +01:00 committed by GitHub
parent 027e272007
commit ab8f8ccaba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 31 additions and 43 deletions

View File

@ -30,7 +30,6 @@ install:
build_script:
# 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% fetch-dlls
test_script:
- mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% LOG_LEVEL=TRACE

View File

@ -125,8 +125,7 @@ jobs:
sudo dpkg --add-architecture i386
sudo apt-fast update -qq
sudo DEBIAN_FRONTEND='noninteractive' apt-fast install \
--no-install-recommends -yq gcc-multilib g++-multilib \
libssl-dev:i386 libpcre3-dev:i386
--no-install-recommends -yq gcc-multilib g++-multilib
mkdir -p external/bin
cat << EOF > external/bin/gcc
#!/bin/bash
@ -235,11 +234,6 @@ jobs:
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
if: matrix.target.TEST_KIND == 'unit-tests'
id: fixtures_version

View File

@ -1,3 +1,8 @@
Next
=================
* Avoid pcre dependency
2020-11-12 v0.6.2
=================

View File

@ -13,6 +13,8 @@ BUILD_SYSTEM_DIR := vendor/nimbus-build-system
# we set its default value before LOG_LEVEL is used in "variables.mk"
LOG_LEVEL := INFO
LINK_PCRE := 0
# we don't want an error here, so we can handle things later, in the ".DEFAULT" target
-include $(BUILD_SYSTEM_DIR)/makefiles/variables.mk

View File

@ -65,7 +65,6 @@ At the moment, Nimbus has to be built from source.
Nimbus has the following external dependencies:
* Developer tools (C compiler, Make, Bash, Git)
* PCRE
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:
```sh
# Debian and Ubuntu
sudo apt-get install build-essential git libpcre3-dev
sudo apt-get install build-essential git
# Fedora
dnf install @development-tools pcre
dnf install @development-tools
# Archlinux, using an AUR manager for pcre-static
yourAURmanager -S base-devel pcre-static
# Archlinux, using an AUR manager
yourAURmanager -S base-devel
```
### MacOS
@ -88,7 +87,7 @@ yourAURmanager -S base-devel pcre-static
Assuming you use [Homebrew](https://brew.sh/) to manage packages:
```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)).
@ -96,7 +95,6 @@ Make sure you have [CMake](https://cmake.org/) installed, to be able to build li
### Windows
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
@ -107,7 +105,7 @@ Note, the Ubuntu PRoot is known to contain all Nimbus prerequisites compiled on
*Assuming Ubuntu PRoot is used*
```sh
apt install build-essential git libpcre3-dev
apt install build-essential git
```
## For users
@ -350,11 +348,6 @@ and run this in a "Git Bash" terminal:
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
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
# 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.

View File

@ -63,7 +63,6 @@ jobs:
git config --global core.longpaths true
git config --global core.autocrlf false
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
if [[ $PLATFORM == "x64" ]]; then
# everything builds more slowly on 32-bit, since there's no libbacktrace support

View File

@ -63,6 +63,7 @@ else:
const currentDir = currentSourcePath()[0 .. ^(len("config.nims") + 1)]
switch("define", "nim_compiler_path=" & currentDir & "env.sh nim")
switch("define", "withoutPCRE")
switch("import", "testutils/moduletests")

View File

@ -3,7 +3,7 @@ FROM debian:bullseye-slim AS build
SHELL ["/bin/bash", "-c"]
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 \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
@ -36,7 +36,7 @@ FROM debian:bullseye-slim as deploy
SHELL ["/bin/bash", "-c"]
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 \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

View File

@ -11,7 +11,7 @@ FROM ubuntu:20.04
SHELL ["/bin/bash", "-c"]
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 \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

View File

@ -3,7 +3,7 @@ FROM debian:bullseye-slim
SHELL ["/bin/bash", "-c"]
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 \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

View File

@ -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.
If you don't want to compile PCRE separately, you can fetch pre-compiled DLLs with:
```bash
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):
@ -88,7 +85,7 @@ sudo vi /etc/dphys-swapfile
sudo reboot
# 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.

View File

@ -21,7 +21,6 @@ If the above sounds like latin to you, don't worry. You should be fine as long a
## External Dependencies
- 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,
@ -31,13 +30,13 @@ On common Linux distributions the dependencies can be installed with
```sh
# Debian and Ubuntu
sudo apt-get install build-essential git libpcre3-dev
sudo apt-get install build-essential git
# Fedora
dnf install @development-tools pcre
dnf install @development-tools
# Archlinux, using an AUR manager for pcre-static
yourAURmanager -S base-devel pcre-static
# Archlinux, using an AUR manager
yourAURmanager -S base-devel
```
### macOS
@ -45,13 +44,12 @@ yourAURmanager -S base-devel pcre-static
Assuming you use [Homebrew](https://brew.sh/) to manage packages
```sh
brew install pcre cmake
brew install cmake
```
### Windows
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
@ -62,6 +60,6 @@ We also provide a downloading script for prebuilt PCRE.
Assuming you use Ubuntu PRoot
```sh
apt install build-essential git libpcre3-dev
apt install build-essential git
```

View File

@ -209,11 +209,11 @@ ssh pi@195.177.101.93
### 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:
```
sudo apt-get install git libgflags-dev libsnappy-dev libpcre3-dev
sudo apt-get install git
```
### 12. Install Screen

@ -1 +1 @@
Subproject commit c278412dbf7fce294ca1fabb8264607c2971ea8f
Subproject commit a9a8e59b569dc72b576e3d5b94108181fa46f313