-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from Doy-lee/msys2-build
Support MSYS2 build, fix Linux build and document build steps
- Loading branch information
Showing
11 changed files
with
126 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,49 @@ | ||
# Ethyl | ||
C++ library for communicating with Ethereum | ||
|
||
C++ library for communicating with Ethereum. | ||
|
||
## Building | ||
|
||
### Prerequisites | ||
Clone the repository `git clone --recursive` or if already cloned, `git | ||
submodule update --init --recursive` at the root to ensure all source code is | ||
retrieved. | ||
|
||
Then run the following commands from the root of this repository: | ||
|
||
**Linux** | ||
|
||
``` | ||
apt install cmake build-essential libboost-all-dev libssl-dev libcurl4-openssl-dev libsodium-dev | ||
# Install dependencies | ||
apt install cmake build-essential libssl-dev libcurl4-openssl-dev | ||
# Build | ||
cmake -B build -S . | ||
cmake --build build --parallel --verbose | ||
``` | ||
|
||
### Building from Source | ||
**Windows via MSYS2 (MinGW, UCRT64, e.t.c)** | ||
|
||
Clone the repository as usual, including submodules (either by passing `--recurse-submodules` to | ||
`git clone`, or else running `git submodule update --init --recursive` the top-level project | ||
directory). | ||
``` | ||
# Update pacman and install dependencies | ||
pacman -Syuu # Terminal may prompt to restart before proceeding | ||
pacman -S git base-devel libargp-devel cmake gcc libcurl-devel gmp-devel autoconf automake libtool | ||
To compile the library run the following commands from the project source directory: | ||
# MSYS packages libargp with a .dll suffix which breaks rlpvalue's autotool | ||
# script so we patch it up | ||
ln -s /usr/lib/libargp.dll.a /usr/lib/libargp.a | ||
``` | ||
mkdir -p build | ||
cd build | ||
cmake .. | ||
make -j8 # Tweak as needed for the desired build parallelism | ||
# Build | ||
cmake -B build -S . | ||
cmake --build build --parallel --verbose | ||
``` | ||
|
||
Various options can be added to the `cmake ..` line; some common options are: | ||
- `-DCMAKE_BUILD_TYPE=Release` to make a release build | ||
|
||
## Testing | ||
|
||
Unit tests use [Catch2](https://github.com/catchorg/Catch2) as a formal unit-test framework. Unit | ||
tests are built by default as part of the standard CMake build logic (unless being built as a | ||
subdirectory of another CMake project) and can be invoked through the `make test` or running the test binaries build in `build/tests`. | ||
Unit tests use [Catch2](https://github.com/catchorg/Catch2) as a formal | ||
unit-test framework. Unit tests are built by default as part of the standard | ||
CMake build logic (unless being built as a subdirectory of another CMake | ||
project) and can be invoked through the `make test` or running the test binaries | ||
build in `build/tests`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/src/InfInt.h b/src/InfInt.h | ||
index 14ff215..60bac4f 100644 | ||
--- a/src/InfInt.h | ||
+++ b/src/InfInt.h | ||
@@ -40,6 +40,7 @@ | ||
#include <sstream> | ||
#include <iomanip> | ||
#include <climits> | ||
+#include <limits> | ||
|
||
//#include <limits.h> | ||
//#include <stdlib.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.