Skip to content

Commit

Permalink
Merge pull request EOSIO#6784 from EOSIO/merge-1.6.2
Browse files Browse the repository at this point in the history
Merge 1.6.2
  • Loading branch information
heifner authored Feb 20, 2019
2 parents 1a14e9c + 88a2d6a commit c8f2607
Show file tree
Hide file tree
Showing 12 changed files with 195 additions and 26 deletions.
17 changes: 17 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ steps:
- "os=high-sierra"
artifact_paths:
- "build/packages/*.tar.gz"
- "build/packages/*.rb"
timeout: 60
- command: |
Expand All @@ -412,6 +413,7 @@ steps:
- "os=mojave"
artifact_paths:
- "build/packages/*.tar.gz"
- "build/packages/*.rb"
timeout: 60
- command: |
Expand Down Expand Up @@ -507,3 +509,18 @@ steps:
OS: "el7"
PKGTYPE: "rpm"
timeout: 60
- wait

- command: |
echo "--- :arrow_down: Downloading brew files" && \
buildkite-agent artifact download "build/packages/eosio.rb" . --step ":darwin: High Sierra Package Builder" && \
mv build/packages/eosio.rb build/packages/eosio_highsierra.rb && \
buildkite-agent artifact download "build/packages/eosio.rb" . --step ":darwin: Mojave Package Builder"
label: ":darwin: Brew Updater"
agents:
queue: "automation-large-builder-fleet"
artifact_paths:
- "build/packages/eosio_highsierra.rb"
- "build/packages/eosio.rb"
timeout: 60
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
if (UNIX)
if (APPLE)
if (LLVM_DIR STREQUAL "" OR NOT LLVM_DIR)
set(LLVM_DIR "/usr/local/Cellar/llvm@4/4.0.1/lib/cmake/llvm")
set(LLVM_DIR "/usr/local/opt/llvm@4/lib/cmake/llvm/")
endif()
endif()
endif()
Expand All @@ -35,7 +35,7 @@ set( CXX_STANDARD_REQUIRED ON)

set(VERSION_MAJOR 1)
set(VERSION_MINOR 6)
set(VERSION_PATCH 1)
set(VERSION_PATCH 2)

if(VERSION_SUFFIX)
set(VERSION_FULL "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-${VERSION_SUFFIX}")
Expand Down
4 changes: 2 additions & 2 deletions Docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ cd eos/Docker
docker build . -t eosio/eos
```

The above will build off the most recent commit to the master branch by default. If you would like to target a specific branch/tag, you may use a build argument. For example, if you wished to generate a docker image based off of the 1.6.1 tag, you could do the following:
The above will build off the most recent commit to the master branch by default. If you would like to target a specific branch/tag, you may use a build argument. For example, if you wished to generate a docker image based off of the 1.6.2 tag, you could do the following:

```bash
docker build -t eosio/eos:v1.6.1 --build-arg branch=1.6.1 .
docker build -t eosio/eos:v1.6.2 --build-arg branch=1.6.2 .
```

By default, the symbol in eosio.system is set to SYS. You can override this using the symbol argument while building the docker image.
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,31 @@ $ brew remove eosio
```
#### Ubuntu 18.04 Debian Package Install
```sh
$ wget https://github.com/eosio/eos/releases/download/v1.6.1/eosio_1.6.1-1-ubuntu-18.04_amd64.deb
$ sudo apt install ./eosio_1.6.1-1-ubuntu-18.04_amd64.deb
$ wget https://github.com/eosio/eos/releases/download/v1.6.2/eosio_1.6.2-1-ubuntu-18.04_amd64.deb
$ sudo apt install ./eosio_1.6.2-1-ubuntu-18.04_amd64.deb
```
#### Ubuntu 16.04 Debian Package Install
```sh
$ wget https://github.com/eosio/eos/releases/download/v1.6.1/eosio_1.6.1-1-ubuntu-16.04_amd64.deb
$ sudo apt install ./eosio_1.6.1-1-ubuntu-16.04_amd64.deb
$ wget https://github.com/eosio/eos/releases/download/v1.6.2/eosio_1.6.2-1-ubuntu-16.04_amd64.deb
$ sudo apt install ./eosio_1.6.2-1-ubuntu-16.04_amd64.deb
```
#### Debian Package Uninstall
```sh
$ sudo apt remove eosio
```
#### Centos RPM Package Install
```sh
$ wget https://github.com/eosio/eos/releases/download/v1.6.1/eosio-1.6.1-1.el7.x86_64.rpm
$ sudo yum install ./eosio-1.6.1-1.el7.x86_64.rpm
$ wget https://github.com/eosio/eos/releases/download/v1.6.2/eosio-1.6.2-1.el7.x86_64.rpm
$ sudo yum install ./eosio-1.6.2-1.el7.x86_64.rpm
```
#### Centos RPM Package Uninstall
```sh
$ sudo yum remove eosio.cdt
```
#### Fedora RPM Package Install
```sh
$ wget https://github.com/eosio/eos/releases/download/v1.6.1/eosio-1.6.1-1.fc27.x86_64.rpm
$ sudo yum install ./eosio-1.6.1-1.fc27.x86_64.rpm
$ wget https://github.com/eosio/eos/releases/download/v1.6.2/eosio-1.6.2-1.fc27.x86_64.rpm
$ sudo yum install ./eosio-1.6.2-1.fc27.x86_64.rpm
```
#### Fedora RPM Package Uninstall
```sh
Expand Down
11 changes: 9 additions & 2 deletions eosio_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@

function usage()
{
printf "\\tUsage: %s \\n\\t[Build Option -o <Debug|Release|RelWithDebInfo|MinSizeRel>] \\n\\t[CodeCoverage -c] \\n\\t[Doxygen -d] \\n\\t[CoreSymbolName -s <1-7 characters>] \\n\\t[Avoid Compiling -a]\\n\\n" "$0" 1>&2
printf "\\tUsage: %s \\n\\t[Build Option -o <Debug|Release|RelWithDebInfo|MinSizeRel>] \\n\\t[CodeCoverage -c] \\n\\t[Doxygen -d] \\n\\t[CoreSymbolName -s <1-7 characters>] \\n\\t[Avoid Compiling -a]\\n\\t[Noninteractive -y]\\n\\n" "$0" 1>&2
exit 1
}

is_noninteractive() {
[[ -n "${EOSIO_BUILD_NONINTERACTIVE+1}" ]]
}

ARCH=$( uname )
if [ "${SOURCE_DIR}" == "${PWD}" ]; then
BUILD_DIR="${PWD}/build"
Expand Down Expand Up @@ -66,7 +70,7 @@
txtrst=$(tput sgr0)

if [ $# -ne 0 ]; then
while getopts ":cdo:s:ah" opt; do
while getopts ":cdo:s:ahy" opt; do
case "${opt}" in
o )
options=( "Debug" "Release" "RelWithDebInfo" "MinSizeRel" )
Expand Down Expand Up @@ -100,6 +104,9 @@
usage
exit 1
;;
y)
EOSIO_BUILD_NONINTERACTIVE=1
;;
\? )
printf "\\n\\tInvalid Option: %s\\n" "-${OPTARG}" 1>&2
usage
Expand Down
9 changes: 7 additions & 2 deletions libraries/chain/wasm_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <boost/asio.hpp>
#include <boost/bind.hpp>
#include <fstream>
#include <string.h>

namespace eosio { namespace chain {
using namespace webassembly;
Expand Down Expand Up @@ -901,6 +902,8 @@ class system_api : public context_aware_api {

};

constexpr size_t max_assert_message = 1024;

class context_free_system_api : public context_aware_api {
public:
explicit context_free_system_api( apply_context& ctx )
Expand All @@ -913,14 +916,16 @@ class context_free_system_api : public context_aware_api {
// Kept as intrinsic rather than implementing on WASM side (using eosio_assert_message and strlen) because strlen is faster on native side.
void eosio_assert( bool condition, null_terminated_ptr msg ) {
if( BOOST_UNLIKELY( !condition ) ) {
std::string message( msg );
const size_t sz = strnlen( msg, max_assert_message );
std::string message( msg, sz );
EOS_THROW( eosio_assert_message_exception, "assertion failure with message: ${s}", ("s",message) );
}
}

void eosio_assert_message( bool condition, array_ptr<const char> msg, size_t msg_len ) {
if( BOOST_UNLIKELY( !condition ) ) {
std::string message( msg, msg_len );
const size_t sz = msg_len > max_assert_message ? max_assert_message : msg_len;
std::string message( msg, sz );
EOS_THROW( eosio_assert_message_exception, "assertion failure with message: ${s}", ("s",message) );
}
}
Expand Down
131 changes: 131 additions & 0 deletions scripts/boost.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
class Boost < Formula
desc "Collection of portable C++ source libraries"
homepage "https://www.boost.org/"
revision 1
head "https://github.com/boostorg/boost.git"

stable do
url "https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.tar.bz2"
sha256 "2684c972994ee57fc5632e03bf044746f6eb45d4920c343937a465fd67a5adba"

# Remove for > 1.67.0
# Fix "error: no member named 'next' in namespace 'boost'"
# Upstream commit from 1 Dec 2017 "Add #include <boost/next_prior.hpp>; no
# longer in utility.hpp"
patch :p2 do
url "https://github.com/boostorg/lockfree/commit/12726cd.patch?full_index=1"
sha256 "f165823d961a588b622b20520668b08819eb5fdc08be7894c06edce78026ce0a"
end
end

bottle do
cellar :any
sha256 "265ab8beaa6fa26a7c305ef2e6aec8bd26ca1db105aca0aaca028f32c5245a90" => :high_sierra
sha256 "567f3e9a294413c1701b698d666a521cfdeec846e256c6e66576d5b70eb26f08" => :sierra
sha256 "3f3f687a620f656fe2ac54f01306e00e6bbc0e9797db284a8d272648d427e640" => :el_capitan
end

option "with-icu4c", "Build regexp engine with icu support"
option "without-single", "Disable building single-threading variant"
option "without-static", "Disable building static library variant"

deprecated_option "with-icu" => "with-icu4c"

depends_on "icu4c" => :optional

def install
# Force boost to compile with the desired compiler
open("user-config.jam", "a") do |file|
file.write "using darwin : : #{ENV.cxx} ;\n"
end

# libdir should be set by --prefix but isn't
bootstrap_args = ["--prefix=#{prefix}", "--libdir=#{lib}"]

if build.with? "icu4c"
icu4c_prefix = Formula["icu4c"].opt_prefix
bootstrap_args << "--with-icu=#{icu4c_prefix}"
else
bootstrap_args << "--without-icu"
end

# Handle libraries that will not be built.
without_libraries = ["python", "mpi"]

# Boost.Log cannot be built using Apple GCC at the moment. Disabled
# on such systems.
without_libraries << "log" if ENV.compiler == :gcc

bootstrap_args << "--without-libraries=#{without_libraries.join(",")}"

# layout should be synchronized with boost-python and boost-mpi
args = ["--prefix=#{prefix}",
"--libdir=#{lib}",
"-d2",
"-j#{ENV.make_jobs}",
"--layout=tagged",
"--user-config=user-config.jam",
"-sNO_LZMA=1",
"install"]

if build.with? "single"
args << "threading=multi,single"
else
args << "threading=multi"
end

if build.with? "static"
args << "link=shared,static"
else
args << "link=shared"
end

# Trunk starts using "clang++ -x c" to select C compiler which breaks C++11
# handling using ENV.cxx11. Using "cxxflags" and "linkflags" still works.
args << "cxxflags=-std=c++11"
if ENV.compiler == :clang
args << "cxxflags=-stdlib=libc++" << "linkflags=-stdlib=libc++"
end

system "./bootstrap.sh", *bootstrap_args
system "./b2", "headers"
system "./b2", *args
end

def caveats
s = ""
# ENV.compiler doesn't exist in caveats. Check library availability
# instead.
if Dir["#{lib}/libboost_log*"].empty?
s += <<~EOS
Building of Boost.Log is disabled because it requires newer GCC or Clang.
EOS
end

s
end

test do
(testpath/"test.cpp").write <<~EOS
#include <boost/algorithm/string.hpp>
#include <string>
#include <vector>
#include <assert.h>
using namespace boost::algorithm;
using namespace std;
int main()
{
string str("a,b");
vector<string> strVec;
split(strVec, str, is_any_of(","));
assert(strVec.size()==2);
assert(strVec[0]=="a");
assert(strVec[1]=="b");
return 0;
}
EOS
system ENV.cxx, "test.cpp", "-std=c++1y", "-L#{lib}", "-lboost_system", "-o", "test"
system "./test"
end
end
5 changes: 3 additions & 2 deletions scripts/eosio_build_amazon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@
if [[ "${OS_NAME}" == "Amazon Linux AMI" ]]; then
DEP_ARRAY=( git gcc72.x86_64 gcc72-c++.x86_64 autoconf automake libtool make bzip2 \
bzip2-devel.x86_64 openssl-devel.x86_64 gmp-devel.x86_64 libstdc++72.x86_64 \
python27.x86_64 python36-devel.x86_64 libedit-devel.x86_64 doxygen.x86_64 graphviz.x86_64)
python27.x86_64 python27-devel.x86_64 python36-devel.x86_64 libedit-devel.x86_64 doxygen.x86_64 graphviz.x86_64)
else
DEP_ARRAY=( git gcc gcc-c++ autoconf automake libtool make bzip2 \
bzip2-devel openssl-devel gmp-devel libstdc++ \
python3 python3-devel libedit-devel doxygen graphviz)
python3 python3-devel python-devel libedit-devel doxygen graphviz)
fi
COUNT=1
DISPLAY=""
Expand All @@ -87,6 +87,7 @@
printf "\\n\\tThe following dependencies are required to install EOSIO.\\n"
printf "\\n\\t${DISPLAY}\\n\\n"
printf "\\tDo you wish to install these dependencies?\\n"
if is_noninteractive; then exec <<< "1"; fi
select yn in "Yes" "No"; do
case $yn in
[Yy]* )
Expand Down
4 changes: 4 additions & 0 deletions scripts/eosio_build_centos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
SCL=$( rpm -qa | grep -E 'centos-release-scl-[0-9].*' )
if [ -z "${SCL}" ]; then
printf "\\t - Do you wish to install and enable this repository?\\n"
if is_noninteractive; then exec <<< "1"; fi
select yn in "Yes" "No"; do
case $yn in
[Yy]* )
Expand All @@ -87,6 +88,7 @@
DEVTOOLSET=$( rpm -qa | grep -E 'devtoolset-7-[0-9].*' )
if [ -z "${DEVTOOLSET}" ]; then
printf "\\tDo you wish to install devtoolset-7?\\n"
if is_noninteractive; then exec <<< "1"; fi
select yn in "Yes" "No"; do
case $yn in
[Yy]* )
Expand Down Expand Up @@ -118,6 +120,7 @@
PYTHON33=$( rpm -qa | grep -E 'python33-[0-9].*' )
if [ -z "${PYTHON33}" ]; then
printf "\\tDo you wish to install python33?\\n"
if is_noninteractive; then exec <<< "1"; fi
select yn in "Yes" "No"; do
case $yn in
[Yy]* )
Expand Down Expand Up @@ -170,6 +173,7 @@
printf "\\tThe following dependencies are required to install EOSIO.\\n"
printf "\\t${DISPLAY}\\n\\n"
printf "\\tDo you wish to install these dependencies?\\n"
if is_noninteractive; then exec <<< "1"; fi
select yn in "Yes" "No"; do
case $yn in
[Yy]* )
Expand Down
Loading

0 comments on commit c8f2607

Please sign in to comment.