GithubHelp home page GithubHelp logo

eosio / eosio.cdt Goto Github PK

View Code? Open in Web Editor NEW
513.0 64.0 291.0 53.27 MB

EOSIO.CDT (Contract Development Toolkit) is a suite of tools used to build EOSIO contracts

Home Page: http://eosio.github.io/eosio.cdt

License: MIT License

CMake 0.20% C 0.39% C++ 99.08% Shell 0.08% Python 0.12% HTML 0.04% Dockerfile 0.02% CSS 0.01% Batchfile 0.01% Assembly 0.01% JavaScript 0.06%
wasm eosio

eosio.cdt's Introduction

EOSIO.CDT (Contract Development Toolkit)

Version : 1.8.1

EOSIO.CDT is a toolchain for WebAssembly (WASM) and a set of tools to facilitate smart contract development for the EOSIO platform. In addition to being a general purpose WebAssembly toolchain, EOSIO specific optimizations are available to support building EOSIO smart contracts. This new toolchain is built around Clang 9, which means that EOSIO.CDT has the most currently available optimizations and analyses from LLVM, but as the WASM target is still considered experimental, some optimizations are incomplete or not available.

New Introductions

As of this release two new repositories are under the suite of tools provided by EOSIO.CDT. These are the Ricardian Template Toolkit and the Ricardian Specification. The Ricardian Template Toolkit is a set of libraries to facilitate smart contract writers in crafting their Ricardian contracts. The Ricardian specification is the working specification for the above mentioned toolkit. Please note that both projects are alpha releases and are subject to change.

Attention

Binary Releases

EOSIO.CDT currently supports Mac OS X brew, Linux x86_64 Debian packages, and Linux x86_64 RPM packages.

If you have previously installed EOSIO.CDT, run the uninstall script (it is in the directory where you cloned EOSIO.CDT) before downloading and using the binary releases.

Mac OS X Brew Install

brew tap eosio/eosio.cdt
brew install eosio.cdt

Mac OS X Brew Uninstall

brew remove eosio.cdt

Debian Package Install

wget https://github.com/eosio/eosio.cdt/releases/download/v1.8.1/eosio.cdt_1.8.1-1-ubuntu-18.04_amd64.deb
sudo apt install ./eosio.cdt_1.8.1-1-ubuntu-18.04_amd64.deb

Debian Package Uninstall

sudo apt remove eosio.cdt

RPM Package Install

wget https://github.com/eosio/eosio.cdt/releases/download/v1.8.1/eosio.cdt-1.8.1-1.el7.x86_64.rpm
sudo yum install ./eosio.cdt-1.8.1-1.el7.x86_64.rpm

RPM Package Uninstall

sudo yum remove eosio.cdt

Guided Installation or Building from Scratch

git clone --recursive https://github.com/eosio/eosio.cdt
cd eosio.cdt
mkdir build
cd build
cmake ..
make -j8

From here onward you can build your contracts code by simply exporting the build directory to your path, so you don't have to install globally (makes things cleaner). Or you can install globally by running this command:

sudo make install

Uninstall after manual installation

sudo rm -fr /usr/local/eosio.cdt
sudo rm -fr /usr/local/lib/cmake/eosio.cdt
sudo rm /usr/local/bin/eosio-*

Installed Tools


  • eosio-cpp
  • eosio-cc
  • eosio-ld
  • eosio-init
  • eosio-abidiff
  • eosio-wasm2wast
  • eosio-wast2wasm
  • eosio-ranlib
  • eosio-ar
  • eosio-objdump
  • eosio-readelf

Contributing

Contributing Guide

Code of Conduct

License

MIT

Important

See LICENSE for copyright and license terms.

All repositories and other materials are provided subject to the terms of this IMPORTANT notice and you must familiarize yourself with its terms. The notice contains important information, limitations and restrictions relating to our software, publications, trademarks, third-party resources, and forward-looking statements. By accessing any of our repositories and other materials, you accept and agree to the terms of the notice.

eosio.cdt's People

Contributors

allenhan2 avatar arhag avatar b1bart avatar bogniq avatar cocho-gore avatar conr2d avatar dskvr avatar iamveritas avatar jeffreyssmith2nd avatar jgiszczak avatar kimjh2005 avatar kj4ezj avatar larryk85 avatar linhuang-blockone avatar lparisc avatar nickjjzhao avatar nksanthosh avatar norsegaud avatar praphael avatar revl avatar scottarnette avatar softprofe avatar spoonincode avatar swatanabe-b1 avatar tbfleming avatar venu-block1 avatar victorj8 avatar vzqzhang avatar williamblevins avatar zreyn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eosio.cdt's Issues

eosio.cdt/libraries/eosiolib/types.h:72:8: error: redefinition of 'public_key'

/Users/Sanxiao/eosiocdt/eosio.cdt/libraries/libc/musl/include/stdlib.h:11:9: warning:
'NULL' macro redefined [-Wmacro-redefined]
#define NULL 0L

/Users/Sanxiao/eosiocdt/eosio.cdt/build/EosioClang-prefix/src/EosioClang-build/lib/clang/7.0.0/include/stddef.h: 100:13: note:
previous definition is here
#define NULL __null

In file included from /Users/Sanxiao/eosiocdt/eosio.cdt/libraries/eosiolib/eosiolib.cpp:3:
In file included from /Users/Sanxiao/eosiocdt/eosio.cdt/libraries/eosiolib/privileged.hpp:4:
/Users/Sanxiao/eosiocdt/eosio.cdt/libraries/eosiolib/types.h:72:8: error:
redefinition of 'public_key'
struct public_key {

/usr/local/include/eosiolib/types.h:34:8: note: previous definition is here
struct public_key {

In file included from /Users/Sanxiao/eosiocdt/eosio.cdt/libraries/eosiolib/eosiolib.cpp:3:
In file included from /Users/Sanxiao/eosiocdt/eosio.cdt/libraries/eosiolib/privileged.hpp:4:
/Users/Sanxiao/eosiocdt/eosio.cdt/libraries/eosiolib/types.h:80:8: error:
redefinition of 'signature'
struct signature {

/usr/local/include/eosiolib/types.h:38:8: note: previous definition is here
struct signature {

In file included from /Users/Sanxiao/eosiocdt/eosio.cdt/libraries/eosiolib/eosiolib.cpp:3:
In file included from /Users/Sanxiao/eosiocdt/eosio.cdt/libraries/eosiolib/privileged.hpp:4:
/Users/Sanxiao/eosiocdt/eosio.cdt/libraries/eosiolib/types.h:88:16: error:
redefinition of 'checksum256'
struct ALIGNED(checksum256) {

/usr/local/include/eosiolib/types.h:42:16: note: previous definition is here
struct ALIGNED(checksum256) {

In file included from /Users/Sanxiao/eosiocdt/eosio.cdt/libraries/eosiolib/eosiolib.cpp:3:
In file included from /Users/Sanxiao/eosiocdt/eosio.cdt/libraries/eosiolib/privileged.hpp:4:
/Users/Sanxiao/eosiocdt/eosio.cdt/libraries/eosiolib/types.h:96:16: error:
redefinition of 'checksum160'
struct ALIGNED(checksum160) {

/usr/local/include/eosiolib/types.h:46:16: note: previous definition is here
struct ALIGNED(checksum160) {

In file included from /Users/Sanxiao/eosiocdt/eosio.cdt/libraries/eosiolib/eosiolib.cpp:3:
In file included from /Users/Sanxiao/eosiocdt/eosio.cdt/libraries/eosiolib/privileged.hpp:4:
/Users/Sanxiao/eosiocdt/eosio.cdt/libraries/eosiolib/types.h:104:16: error:
redefinition of 'checksum512'
struct ALIGNED(checksum512) {

/usr/local/include/eosiolib/types.h:50:16: note: previous definition is here
struct ALIGNED(checksum512) {

In file included from /Users/Sanxiao/eosiocdt/eosio.cdt/libraries/eosiolib/eosiolib.cpp:3:
In file included from /Users/Sanxiao/eosiocdt/eosio.cdt/libraries/eosiolib/privileged.hpp:4:
/Users/Sanxiao/eosiocdt/eosio.cdt/libraries/eosiolib/types.h:115:8: error:
redefinition of 'account_permission'
struct account_permission {

/usr/local/include/eosiolib/types.h:57:8: note: previous definition is here
struct account_permission {

1 warning and 6 errors generated.
make[2]: *** [libraries/eosiolib/CMakeFiles/eosio.dir/eosiolib.cpp.o] Error 255
make[1]: *** [libraries/eosiolib/CMakeFiles/eosio.dir/all] Error 2
make: *** [all] Error 2

Wrong datastream operator being called

Given certain programming patterns, using the C++ eosio::public_key will use the wrong datastream operator (the one for C public_key). This causes the contract to give the ambiguous "read" error.

empty ABI file

Hello,
I am new to eosio-cpp and I would like to try to compile a smart contract.

I try to compile the contract shown here: https://developers.eos.io/eosio-cpp/docs/hello-world

I run the command eosio-cpp hello.cpp -o hello.wasm --abigen

but then I get the following abi file:

{ "____comment": "This file was generated with eosio-abigen. DO NOT EDIT Sat Sep 15 20:38:08 2018", "version": "eosio::abi/1.0", "structs": [], "types": [], "actions": [], "tables": [], "ricardian_clauses": [],
an empty abi file. So of course when I deploy the contract then after I cannot push any action.

Thank you in advance for your help

osx build failed. Python 2.7 or newer is required

./build.sh

	=========== Building eosio.cdt ===========


	OS name: Darwin
	OS Version: 10.13.6
	CPU speed: 2.50Ghz
	CPU cores: 4
	Physical Memory: 16 Gbytes
	Disk install: /dev/disk1s1
	Disk space total: 465G
	Disk space available: 94G

	Checking xcode-select installation
	xcode-select installation found @
	/usr/bin/xcode-select

	Checking Ruby installation.
	Ruby installation found @
	/Users/chenzhen/.rvm/rubies/ruby-2.2.1/bin/ruby

	Checking Home Brew installation
	Home Brew installation found @
	/usr/local/bin/brew

	Checking dependencies.
	Checking automake ... 		 automake found
	Checking Libtool ... 		 Libtool found
	Checking wget ... 		 wget found
	Checking CMake ... 		 CMake found
	Checking GMP ... 		 GMP found
	Checking gettext ... 		 gettext found
	Checking Doxygen ... 		 Doxygen found
	Checking Graphviz ... 		 Graphviz found
	Checking LCOV ... 		 LCOV found
	Checking Python3 ... 		 Python3 found

	No required Home Brew dependencies to install.

	Checking boost library installation.
	Boost 1.67.0 found at /usr/local.

	Checking secp256k1-zkp installation.
	secp256k1 found at /usr/local/lib/.
-- Using prebuilt re2c lexer
-- Setting up Eosio Wasm Toolchain
-- Using 'SYS' as CORE symbol name
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/chenzhen/coin/eosio.cdt/build
[ 11%] Performing configure step for 'EosioClang'
[ 11%] Built target libwabt
CMake Deprecation Warning at CMakeLists.txt:14 (cmake_policy):
  The OLD behavior for policy CMP0051 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


[ 11%] Built target wat2wasm
[ 11%] Built target wat-desugar
[ 11%] Built target spectest-interp
[ 11%] Built target wast2json
[ 11%] Built target wasm-validate
[ 11%] Built target wasm-interp
-- Found libtool - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool
[ 11%] Built target wasm2c
[ 11%] Built target eosio-pp
[ 11%] Built target wasm-opcodecnt
[ 11%] Built target wasm2wat
[ 11%] Built target wasm-objdump
[ 11%] Built target wat2wasm-copy-to-bin
[ 11%] Built target wasm-validate-copy-to-bin
[ 11%] Built target spectest-interp-copy-to-bin
[ 11%] Built target wast2json-copy-to-bin
[ 11%] Built target wat-desugar-copy-to-bin
[ 11%] Built target wasm-interp-copy-to-bin
[ 11%] Built target wasm2c-copy-to-bin
[ 11%] Built target wasm-opcodecnt-copy-to-bin
[ 11%] Built target wasm2wat-copy-to-bin
[ 11%] Built target eosio-pp-copy-to-bin
[ 11%] Built target wasm-objdump-copy-to-bin
-- Native target X86 is not selected; lli will not JIT code
-- Threads enabled.
-- Doxygen disabled.
-- Go bindings disabled, need at least Go 1.2.
-- Found ld64 - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- OCaml bindings disabled.
-- Could NOT find Python module pygments
-- Could NOT find Python module pygments.lexers.c_cpp
-- Could NOT find Python module yaml
-- LLVM host triple: x86_64-apple-darwin17.7.0
-- LLVM default target triple: x86_64-apple-darwin17.7.0
-- Building with -fPIC
CMake Error at CMakeLists.txt:619 (message):
  Python 2.7 or newer is required

DESTDIR support is broken

When using make DESTDIR=..... install on ubuntu 18.04 most of the installation proceeds as expected, symlinks will fail inside the LLVM section as they are attempting to symlink to the path without DESTDIR and fail gracefully.

However, something about the installation of eosio-pp in external/wabt creates a hard failure when using DESTDIR

CMake Error at external/wabt/cmake_install.cmake:65 (file):
  file INSTALL cannot find "/usr/local/eosio.wasmsdk/bin/eosio-pp".
Call Stack (most recent call first):
  external/cmake_install.cmake:42 (include)
  cmake_install.cmake:363 (include)


Makefile:117: recipe for target 'install' failed
make: *** [install] Error 1

Document how to properly use `multi_index::get` and deprecate related methods that take a reference

We need clear documentation on how to use multi_index::get so that contract developers avoid the common pitfall of copy assigning the reference returned from multi_index::get to a stack-allocated local variable and then passing that into multi_index::modify.

The most common mistake is that users use auto as the typename for the local variable when they should be using auto& or decltype(auto).

Also, because this is a common mistake contract developers make which could lead to undefined behavior, we should deprecate the overloads of modify and erase methods in multi_index that take a reference, and encourage them to use the versions that take const_iterator instead which are much safer.

We should also provide warnings in the documentation about using iterator_to which can have similar undefined behavior if the developer passes in a reference to a stack-allocated object rather than the reference returned by get or by dereferencing a const_iterator. Perhaps we can also provide a safer overload of iterator_to that takes a const_iterator.

Along with deprecating multi_index::get, we should also make sure we do not actually use it in any of the contracts in our repository. Instead we could use multi_index::require_find from EOSIO/eos#4227.

eosio-cpp error: fatal error: 'boost/hana.hpp' file not found

/usr/local/eosio.wasmsdk/bin/../include/eosiolib/multi_index.hpp:9:10: fatal error: 'boost/hana.hpp' file not found.

besides, i use cmake . on "examples/hello/" which no error, but no wasm file generated.
what's the proper way to generate wasm file ?

make attempts to "install"

When I run "make" I get the error

Install the project...
-- Install configuration: "Debug"
-- Installing: /usr/local/eosiosdk/eosiollvm/include/llvm
CMake Error at cmake_install.cmake:36 (file):
  file INSTALL cannot make directory
  "/usr/local/eosiosdk/eosiollvm/include/llvm": No such file or directory


make[3]: *** [install] Error 1
make[2]: *** [EosioClang-prefix/src/EosioClang-stamp/EosioClang-install] Error 2
make[1]: *** [CMakeFiles/EosioClang.dir/all] Error 2

This should only be possible on "make install" so that I don't have to run "make" as root.

wasm-ld compilation error on simple token

OS: Cenots7
Branch: develop

/usr/local/eosio.wasmsdk/bin/eosio-cpp -isystem=/home/valery/opt/boost/include -o eosio.token/eosio.token.wast eosio.token.cpp
/usr/local/eosio.wasmsdk/bin/wasm-ld: error: unable to find library -lc++
/usr/local/eosio.wasmsdk/bin/wasm-ld: error: unable to find library -lc
/usr/local/eosio.wasmsdk/bin/wasm-ld: error: unable to find library -leosio

Possible, I have to specify path for shared libraries, but I'm not sure how can I do it.

CORE_SYMBOL in ./build.sh

Didn't find it in readme.md.

What should I use as <CORE_SYMBOL> parameter for "build.sh" ?

Should be "EOS" or "SYS" ?
Or according to "core_symbol.hpp" "S(4,SYS)"?
Or it uint64_t equivalent 1398362884 ?
Or nothing / doesn't matter?

Thank you.

Document that update intrinsics of C DB API cannot change primary key

The current (as of v1.0.5) update intrinsics of the C DB API do not allow changing the primary key of a table row. The serialized data that is stored in the table row of a primary table may include a primary key and that primary key value could be changed by the contract calling the db_update_i64 intrinsic. But that does not change the actual primary key recognized by the native side.

This behavior should be well documented for contract developers that use the C DB API. Those using the C++ multi_index shouldn't have to worry about this (although it should still be documented) because the modify method will check that the primary key was not changed by the updater lambda and cause an assertion failure otherwise.

eosio.wasmsdk/build/EosioClang-prefix/src/EosioClang-build/bin/eosio-cc: No such file or directory

While I was building it on a Mac OSX with 8 core and 16G RAM, I run:

./build.sh EOS

The following errors occured:

Scanning dependencies of target llvm-exegesis
[100%] Building CXX object tools/llvm-exegesis/CMakeFiles/llvm-exegesis.dir/llvm-exegesis.cpp.o
[100%] Linking CXX shared module ../../lib/BugpointPasses.dylib
[100%] Built target BugpointPasses
[100%] Linking CXX executable ../../bin/llvm-objdump
[100%] Built target llvm-objdump
[100%] Linking CXX executable ../../bin/llvm-xray
[100%] Linking CXX executable ../../bin/llvm-exegesis
[100%] Built target llvm-xray
[100%] Built target llvm-exegesis
[100%] Linking CXX executable ../../bin/opt
[100%] Built target opt
[ 12%] No install step for 'EosioClang'
[ 12%] No test step for 'EosioClang'
[ 12%] Completed 'EosioClang'
[ 12%] Built target EosioClang
Scanning dependencies of target c
[ 13%] Building C object libraries/libc/CMakeFiles/c.dir/musl/src/crypt/crypt_r.c.o
[ 13%] Building C object libraries/libc/CMakeFiles/c.dir/musl/src/crypt/crypt_md5.c.o
[ 13%] Building C object libraries/libc/CMakeFiles/c.dir/musl/src/crypt/crypt_sha256.c.o
[ 13%] Building C object libraries/libc/CMakeFiles/c.dir/musl/src/crypt/crypt_des.c.o
[ 13%] Building C object libraries/libc/CMakeFiles/c.dir/musl/src/crypt/crypt.c.o
[ 13%] Building C object libraries/libc/CMakeFiles/c.dir/musl/src/crypt/crypt_sha512.c.o
[ 13%] Building C object libraries/libc/CMakeFiles/c.dir/musl/src/crypt/crypt_blowfish.c.o
[ 13%] Building C object libraries/libc/CMakeFiles/c.dir/musl/src/crypt/encrypt.c.o
/bin/sh: /Users/noprom/Documents/Dev/BlockChain/OS/eosio.wasmsdk/build/EosioClang-prefix/src/EosioClang-build/bin/eosio-cc: No such file or directory
/bin/sh: /Users/noprom/Documents/Dev/BlockChain/OS/eosio.wasmsdk/build/EosioClang-prefix/src/EosioClang-build/bin/eosio-cc: No such file or directory
/bin/sh: /Users/noprom/Documents/Dev/BlockChain/OS/eosio.wasmsdk/build/EosioClang-prefix/src/EosioClang-build/bin/eosio-cc: No such file or directory
/bin/sh: /Users/noprom/Documents/Dev/BlockChain/OS/eosio.wasmsdk/build/EosioClang-prefix/src/EosioClang-build/bin/eosio-cc: No such file or directory
make[2]: *** [libraries/libc/CMakeFiles/c.dir/musl/src/crypt/crypt_des.c.o] Error 127
/bin/sh: /Users/noprom/Documents/Dev/BlockChain/OS/eosio.wasmsdk/build/EosioClang-prefix/src/EosioClang-build/bin/eosio-cc: No such file or directory
/bin/sh: /Users/noprom/Documents/Dev/BlockChain/OS/eosio.wasmsdk/build/EosioClang-prefix/src/EosioClang-build/bin/eosio-cc: No such file or directory
/bin/sh: /Users/noprom/Documents/Dev/BlockChain/OS/eosio.wasmsdk/build/EosioClang-prefix/src/EosioClang-build/bin/eosio-cc: No such file or directory
make[2]: *** Waiting for unfinished jobs....
/bin/sh: /Users/noprom/Documents/Dev/BlockChain/OS/eosio.wasmsdk/build/EosioClang-prefix/src/EosioClang-build/bin/eosio-cc: No such file or directory
make[2]: *** [libraries/libc/CMakeFiles/c.dir/musl/src/crypt/crypt_blowfish.c.o] Error 127
make[2]: *** [libraries/libc/CMakeFiles/c.dir/musl/src/crypt/crypt_md5.c.o] Error 127
make[2]: *** [libraries/libc/CMakeFiles/c.dir/musl/src/crypt/crypt_sha256.c.o] Error 127
make[2]: *** [libraries/libc/CMakeFiles/c.dir/musl/src/crypt/crypt_sha512.c.o] Error 127
make[2]: *** [libraries/libc/CMakeFiles/c.dir/musl/src/crypt/crypt_r.c.o] Error 127
make[2]: *** [libraries/libc/CMakeFiles/c.dir/musl/src/crypt/encrypt.c.o] Error 127
make[2]: *** [libraries/libc/CMakeFiles/c.dir/musl/src/crypt/crypt.c.o] Error 127
make[1]: *** [libraries/libc/CMakeFiles/c.dir/all] Error 2
make: *** [all] Error 2

Anyone know why this happened?
Any help would be appreciated.

Add EosioTesterBuild.cmake

How about add EosioTesterBuild.cmake.in in "eosio.wasmsdk/modules". Then we can add unit test for contract developing.Otherwise we need install eos first.

Build failed (link error) on Centos7

Master branch,
OS: Contos7

[ 81%] Linking CXX executable ../../../../../bin/eosio-cpp
/home/valery/opt/boost/lib/libboost_filesystem.a(operations.o): In function `boost::detail::sp_counted_impl_p<boost::filesystem::filesystem_error::m_imp>::~sp_counted_impl_p()':
operations.cpp:(.text._ZN5boost6detail17sp_counted_impl_pINS_10filesystem16filesystem_error5m_impEED0Ev[_ZN5boost6detail17sp_counted_impl_pINS_10filesystem16filesystem_error5m_impEED5Ev]+0x6): undefined r
eference to `operator delete(void*, unsigned long)'
/home/valery/opt/boost/lib/libboost_filesystem.a(operations.o): In function `boost::detail::sp_counted_impl_p<boost::filesystem::detail::dir_itr_imp>::~sp_counted_impl_p()':
operations.cpp:(.text._ZN5boost6detail17sp_counted_impl_pINS_10filesystem6detail11dir_itr_impEED0Ev[_ZN5boost6detail17sp_counted_impl_pINS_10filesystem6detail11dir_itr_impEED5Ev]+0x6): undefined reference
 to `operator delete(void*, unsigned long)'
/home/valery/opt/boost/lib/libboost_filesystem.a(operations.o): In function `boost::filesystem::filesystem_error::~filesystem_error()':
operations.cpp:(.text._ZN5boost10filesystem16filesystem_errorD0Ev[_ZN5boost10filesystem16filesystem_errorD5Ev]+0x49): undefined reference to `operator delete(void*, unsigned long)'
/home/valery/opt/boost/lib/libboost_filesystem.a(operations.o): In function `boost::detail::sp_counted_impl_p<boost::filesystem::filesystem_error::m_imp>::dispose()':
operations.cpp:(.text._ZN5boost6detail17sp_counted_impl_pINS_10filesystem16filesystem_error5m_impEE7disposeEv[_ZN5boost6detail17sp_counted_impl_pINS_10filesystem16filesystem_error5m_impEE7disposeEv]+0x49)
: undefined reference to `operator delete(void*, unsigned long)'
/home/valery/opt/boost/lib/libboost_filesystem.a(operations.o): In function `boost::detail::sp_counted_impl_p<boost::filesystem::detail::dir_itr_imp>::dispose()':
operations.cpp:(.text._ZN5boost6detail17sp_counted_impl_pINS_10filesystem6detail11dir_itr_impEE7disposeEv[_ZN5boost6detail17sp_counted_impl_pINS_10filesystem6detail11dir_itr_impEE7disposeEv]+0x57): undefi
ned reference to `operator delete(void*, unsigned long)'
/home/valery/opt/boost/lib/libboost_filesystem.a(operations.o):operations.cpp:(.text._ZN5boost14checked_deleteINS_10filesystem6detail11dir_itr_impEEEvPT_[_ZN5boost14checked_deleteINS_10filesystem6detail11
dir_itr_impEEEvPT_]+0x56): more undefined references to `operator delete(void*, unsigned long)' follow
/home/valery/opt/boost/lib/libboost_filesystem.a(path.o): In function `boost::filesystem::path::m_erase_redundant_separator(unsigned long)':
path.cpp:(.text+0x54b): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
/home/valery/opt/boost/lib/libboost_filesystem.a(path.o): In function `boost::filesystem::path::remove_filename()':
path.cpp:(.text+0x77d): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
/home/valery/opt/boost/lib/libboost_filesystem.a(path.o): In function `boost::filesystem::path::remove_trailing_separator()':
path.cpp:(.text+0x819): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
/home/valery/opt/boost/lib/libboost_filesystem.a(path.o): In function `boost::filesystem::path::root_name() const':
path.cpp:(.text+0xac7): undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'

failing to find required libraries

eosio-cpp -o hello.wast hello.cpp
In file included from hello.cpp:1:
In file included from /usr/local/eosio.wasmsdk/bin/../include/eosiolib/eosio.hpp:7:
In file included from /usr/local/eosio.wasmsdk/bin/../include/eosiolib/action.hpp:7:
/usr/local/eosio.wasmsdk/bin/../include/eosiolib/datastream.hpp:9:10: fatal error:
'boost/container/flat_set.hpp' file not found
#include <boost/container/flat_set.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Followed the guided installation instructions.

Commands I used to install:
$ git clone --recursive https://github.com/eosio/eosio.wasmsdk
$ cd eosio.wasmsdk
$ ./build.sh EOS
$ sudo ./install.sh

eosio-cpp --abigen adds "basic_string" to resulting ABI

When using a string in a struct or as an argument in an action, resulting ABI contains "invalid" entries. ABI will generate, and no errors on thrown on set contract. Error is thrown once an action is executed on chain.

Resulting ABI for strings:

    "structs": [
        {
            "name": "basic_string",
            "base": "__basic_string_common<true>",
            "fields": [
                {
                    "name": "__r_",
                    "type": "allocator_type>"
                }
            ]
        },
    "types": [
        {
            "new_type_name": "string",
            "type": "basic_string<char>"
        }
    ],

Also see #81

debian build.sh: Could not find the following static Boost libraries: boost_system

Could not find the following static Boost libraries:
          boost_system
$ ./build.sh 
	=========== Building eosio.cdt ===========


	OS name: 
	OS Version: 9
	CPU speed: 899.963Mhz
	CPU cores: 4
	Physical Memory: 15966 Mgb
	Disk install: /dev/mapper/librem--vg-root
	Disk space total: 441G
	Disk space available: 382G

	Checking for installed dependencies.

	Package clang-4.0 found.
	Package lldb-4.0 found.
	Package libclang-4.0-dev found.
	Package cmake found.
	Package make found.
	Package automake found.
	Package libbz2-dev found.
	Package libssl-dev found.
	Package libgmp3-dev found.
	Package autotools-dev found.
	Package build-essential found.
	Package libicu-dev found.
	Package python2.7-dev found.
	Package python3-dev found.
	Package autoconf found.
	Package libtool found.
	Package curl found.
	Package zlib1g-dev found.
	Package doxygen found.
	Package graphviz found.

	No required dpkg dependencies to install.

	Checking boost library installation.
	Boost found at /home/james/opt/boost.

	Checking secp256k1-zkp installation.
	secp256k1 found @ /usr/local/lib.
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.11.0") 
-- Looking for alloca.h
-- Looking for alloca.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for snprintf
-- Looking for snprintf - found
-- Looking for sysconf
-- Looking for sysconf - found
-- Looking for strcasecmp
-- Looking for strcasecmp - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of ssize_t
-- Check size of ssize_t - done
-- Check size of size_t
-- Check size of size_t - done
-- Using prebuilt re2c lexer
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Setting up Eosio Wasm Toolchain
-- Using 'SYS' as CORE symbol name
-- Configuring done
-- Generating done
-- Build files have been written to: /home/james/eosjs/eosio.wasmsdk/build
Scanning dependencies of target EosioClang
[  0%] Creating directories for 'EosioClang'
[  0%] No download step for 'EosioClang'
[  0%] No patch step for 'EosioClang'
[  0%] No update step for 'EosioClang'
[  1%] Performing configure step for 'EosioClang'
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for errno.h
-- Looking for errno.h - found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for link.h
-- Looking for link.h - found
-- Looking for malloc.h
-- Looking for malloc.h - found
-- Looking for malloc/malloc.h
-- Looking for malloc/malloc.h - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for signal.h
-- Looking for signal.h - found
-- Looking for sys/ioctl.h
-- Looking for sys/ioctl.h - found
-- Looking for sys/mman.h
-- Looking for sys/mman.h - found
-- Looking for sys/param.h
-- Looking for sys/param.h - found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for termios.h
-- Looking for termios.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for valgrind/valgrind.h
-- Looking for valgrind/valgrind.h - not found
-- Looking for zlib.h
-- Looking for zlib.h - found
-- Looking for fenv.h
-- Looking for fenv.h - found
-- Looking for FE_ALL_EXCEPT
-- Looking for FE_ALL_EXCEPT - found
-- Looking for FE_INEXACT
-- Looking for FE_INEXACT - found
-- Looking for mach/mach.h
-- Looking for mach/mach.h - not found
-- Looking for histedit.h
-- Looking for histedit.h - not found
-- Looking for CrashReporterClient.h
-- Looking for CrashReporterClient.h - not found
-- Looking for linux/magic.h
-- Looking for linux/magic.h - found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Looking for pthread_getspecific in pthread
-- Looking for pthread_getspecific in pthread - found
-- Looking for pthread_rwlock_init in pthread
-- Looking for pthread_rwlock_init in pthread - found
-- Looking for pthread_mutex_lock in pthread
-- Looking for pthread_mutex_lock in pthread - found
-- Looking for dlopen in dl
-- Looking for dlopen in dl - found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
-- Looking for pfm_initialize in pfm
-- Looking for pfm_initialize in pfm - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Looking for compress2 in z
-- Looking for compress2 in z - found
-- Looking for setupterm in tinfo
-- Looking for setupterm in tinfo - found
-- Could NOT find LibXml2 (missing:  LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR) 
-- Looking for xar_open in xar
-- Looking for xar_open in xar - not found
-- Looking for arc4random
-- Looking for arc4random - not found
-- Looking for backtrace
-- Looking for backtrace - found
-- backtrace facility detected in default set of libraries
-- Found Backtrace: /usr/include  
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Failed
-- Looking for _Unwind_Backtrace
-- Looking for _Unwind_Backtrace - found
-- Looking for getpagesize
-- Looking for getpagesize - found
-- Looking for sysconf
-- Looking for sysconf - found
-- Looking for getrusage
-- Looking for getrusage - found
-- Looking for setrlimit
-- Looking for setrlimit - found
-- Looking for isatty
-- Looking for isatty - found
-- Looking for futimens
-- Looking for futimens - found
-- Looking for futimes
-- Looking for futimes - found
-- Looking for posix_fallocate
-- Looking for posix_fallocate - found
-- Looking for sigaltstack
-- Looking for sigaltstack - found
-- Looking for lseek64
-- Looking for lseek64 - found
-- Looking for mallctl
-- Looking for mallctl - not found
-- Looking for mallinfo
-- Looking for mallinfo - found
-- Looking for malloc_zone_statistics
-- Looking for malloc_zone_statistics - not found
-- Looking for getrlimit
-- Looking for getrlimit - found
-- Looking for posix_spawn
-- Looking for posix_spawn - found
-- Looking for pread
-- Looking for pread - found
-- Looking for realpath
-- Looking for realpath - found
-- Looking for sbrk
-- Looking for sbrk - found
-- Looking for strerror
-- Looking for strerror - found
-- Looking for strerror_r
-- Looking for strerror_r - found
-- Looking for strerror_s
-- Looking for strerror_s - not found
-- Looking for setenv
-- Looking for setenv - found
-- Looking for dlopen
-- Looking for dlopen - found
-- Looking for dladdr
-- Looking for dladdr - not found
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - found
-- Looking for sched_getaffinity
-- Looking for sched_getaffinity - found
-- Looking for CPU_COUNT
-- Looking for CPU_COUNT - found
-- Looking for pthread_getname_np
-- Looking for pthread_getname_np - found
-- Looking for pthread_setname_np
-- Looking for pthread_setname_np - found
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB - Success
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB - Success
-- Performing Test LLVM_HAS_ATOMICS
-- Performing Test LLVM_HAS_ATOMICS - Success
-- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG
-- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG - Success
-- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG
-- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG - Failed
-- Performing Test HAS_MAYBE_UNINITIALIZED
-- Performing Test HAS_MAYBE_UNINITIALIZED - Success
-- Native target X86 is not selected; lli will not JIT code
-- Threads enabled.
-- Doxygen disabled.
-- Go bindings enabled.
-- Could NOT find OCaml (missing:  OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) 
-- Could NOT find OCaml (missing:  OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) 
-- OCaml bindings disabled.
-- Could NOT find Python module pygments
-- Could NOT find Python module pygments.lexers.c_cpp
-- Could NOT find Python module yaml
-- LLVM host triple: x86_64-unknown-linux-gnu
-- LLVM default target triple: x86_64-unknown-linux-gnu
-- Performing Test C_SUPPORTS_FPIC
-- Performing Test C_SUPPORTS_FPIC - Success
-- Performing Test CXX_SUPPORTS_FPIC
-- Performing Test CXX_SUPPORTS_FPIC - Success
-- Building with -fPIC
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG - Success
-- Performing Test C_SUPPORTS_WERROR_DATE_TIME
-- Performing Test C_SUPPORTS_WERROR_DATE_TIME - Success
-- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME
-- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME - Success
-- Performing Test CXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
-- Performing Test CXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Failed
-- Performing Test CXX_SUPPORTS_CXX11
-- Performing Test CXX_SUPPORTS_CXX11 - Success
-- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG
-- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG - Success
-- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
-- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Failed
-- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
-- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Failed
-- Performing Test C_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG
-- Performing Test C_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG - Failed
-- Performing Test CXX_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG
-- Performing Test CXX_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG - Success
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP - Failed
-- Performing Test C_SUPPORTS_STRING_CONVERSION_FLAG
-- Performing Test C_SUPPORTS_STRING_CONVERSION_FLAG - Failed
-- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG
-- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG - Failed
-- Performing Test C_SUPPORTS_FNO_FUNCTION_SECTIONS
-- Performing Test C_SUPPORTS_FNO_FUNCTION_SECTIONS - Success
-- Performing Test C_SUPPORTS_FFUNCTION_SECTIONS
-- Performing Test C_SUPPORTS_FFUNCTION_SECTIONS - Success
-- Performing Test CXX_SUPPORTS_FFUNCTION_SECTIONS
-- Performing Test CXX_SUPPORTS_FFUNCTION_SECTIONS - Success
-- Performing Test C_SUPPORTS_FDATA_SECTIONS
-- Performing Test C_SUPPORTS_FDATA_SECTIONS - Success
-- Performing Test CXX_SUPPORTS_FDATA_SECTIONS
-- Performing Test CXX_SUPPORTS_FDATA_SECTIONS - Success
-- Found PythonInterp: /usr/bin/python2.7 (found version "2.7.13") 
-- Constructing LLVMBuild project information
-- Linker detection: GNU ld
-- Targeting WebAssembly
-- Looking for sys/resource.h
-- Looking for sys/resource.h - found
-- Clang version: 7.0.0
-- Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG
-- Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG - Failed
CMake Warning at /usr/share/cmake-3.7/Modules/FindBoost.cmake:761 (message):
  Imported targets not available for Boost version 106700
Call Stack (most recent call first):
  /usr/share/cmake-3.7/Modules/FindBoost.cmake:865 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.7/Modules/FindBoost.cmake:1470 (_Boost_MISSING_DEPENDENCIES)
  tools/clang/tools/extra/eosio_c_tool/CMakeLists.txt:4 (find_package)


CMake Warning at /usr/share/cmake-3.7/Modules/FindBoost.cmake:761 (message):
  Imported targets not available for Boost version 106700
Call Stack (most recent call first):
  /usr/share/cmake-3.7/Modules/FindBoost.cmake:865 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.7/Modules/FindBoost.cmake:1470 (_Boost_MISSING_DEPENDENCIES)
  tools/clang/tools/extra/eosio_c_tool/CMakeLists.txt:4 (find_package)


CMake Error at /usr/share/cmake-3.7/Modules/FindBoost.cmake:1831 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.67.0

  Boost include path: /home/james/opt/boost/include

  Could not find the following static Boost libraries:

          boost_system

  Some (but not all) of the required Boost libraries were found.  You may
  need to install these additional Boost libraries.  Alternatively, set
  BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
  to the location of Boost.
Call Stack (most recent call first):
  tools/clang/tools/extra/eosio_c_tool/CMakeLists.txt:4 (find_package)


CMake Warning at /usr/share/cmake-3.7/Modules/FindBoost.cmake:761 (message):
  Imported targets not available for Boost version 106700
Call Stack (most recent call first):
  /usr/share/cmake-3.7/Modules/FindBoost.cmake:865 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.7/Modules/FindBoost.cmake:1470 (_Boost_MISSING_DEPENDENCIES)
  tools/clang/tools/extra/eosio_ld_tool/CMakeLists.txt:4 (find_package)


CMake Warning at /usr/share/cmake-3.7/Modules/FindBoost.cmake:761 (message):
  Imported targets not available for Boost version 106700
Call Stack (most recent call first):
  /usr/share/cmake-3.7/Modules/FindBoost.cmake:865 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.7/Modules/FindBoost.cmake:1470 (_Boost_MISSING_DEPENDENCIES)
  tools/clang/tools/extra/eosio_ld_tool/CMakeLists.txt:4 (find_package)


CMake Error at /usr/share/cmake-3.7/Modules/FindBoost.cmake:1831 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.67.0

  Boost include path: /home/james/opt/boost/include

  Could not find the following static Boost libraries:

          boost_system

  Some (but not all) of the required Boost libraries were found.  You may
  need to install these additional Boost libraries.  Alternatively, set
  BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
  to the location of Boost.
Call Stack (most recent call first):
  tools/clang/tools/extra/eosio_ld_tool/CMakeLists.txt:4 (find_package)


CMake Warning at /usr/share/cmake-3.7/Modules/FindBoost.cmake:761 (message):
  Imported targets not available for Boost version 106700
Call Stack (most recent call first):
  /usr/share/cmake-3.7/Modules/FindBoost.cmake:865 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.7/Modules/FindBoost.cmake:1470 (_Boost_MISSING_DEPENDENCIES)
  tools/clang/tools/extra/eosio_abigen_tool/CMakeLists.txt:4 (find_package)


CMake Warning at /usr/share/cmake-3.7/Modules/FindBoost.cmake:761 (message):
  Imported targets not available for Boost version 106700
Call Stack (most recent call first):
  /usr/share/cmake-3.7/Modules/FindBoost.cmake:865 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.7/Modules/FindBoost.cmake:1470 (_Boost_MISSING_DEPENDENCIES)
  tools/clang/tools/extra/eosio_abigen_tool/CMakeLists.txt:4 (find_package)


CMake Error at /usr/share/cmake-3.7/Modules/FindBoost.cmake:1831 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.67.0

  Boost include path: /home/james/opt/boost/include

  Could not find the following static Boost libraries:

          boost_system

  Some (but not all) of the required Boost libraries were found.  You may
  need to install these additional Boost libraries.  Alternatively, set
  BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
  to the location of Boost.
Call Stack (most recent call first):
  tools/clang/tools/extra/eosio_abigen_tool/CMakeLists.txt:4 (find_package)


-- LLD version: 7.0.0
-- Configuring incomplete, errors occurred!
See also "/home/james/eosjs/eosio.wasmsdk/build/EosioClang-prefix/src/EosioClang-build/CMakeFiles/CMakeOutput.log".
See also "/home/james/eosjs/eosio.wasmsdk/build/EosioClang-prefix/src/EosioClang-build/CMakeFiles/CMakeError.log".
CMakeFiles/EosioClang.dir/build.make:106: recipe for target 'EosioClang-prefix/src/EosioClang-stamp/EosioClang-configure' failed
make[2]: *** [EosioClang-prefix/src/EosioClang-stamp/EosioClang-configure] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/EosioClang.dir/all' failed
make[1]: *** [CMakeFiles/EosioClang.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
$ cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"

Could not able to use std lib

Hi all,
I'm trying to use random library from std lib. However, I could not able to make it works with this tool.
Example code:

//sample.cpp
#include <eosiolib/eosio.hpp>
#include <random>
#include <algorithm>
#include <iterator>
#include <iostream>

using namespace eosio;
class Random : public eosio::contract {
  public:
      using contract::contract;

      [[eosio::action]]
      void random() {
        std::vector<int> v = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
        std::random_device rd;
        std::mt19937 g(rd());
        std::shuffle(v.begin(), v.end(), g);
        print("Random", v[0])
    }
};
EOSIO_ABI( hello, (hi) )

When I build contract with command

$ eosio-cpp -I ~/opt/boost/include -std=c++17   -o random.wasm -c random.cpp

I get this error:

hello.cpp:2:10: fatal error: 'random' file not found
#include <random>
         ^~~~~~~~
1 error generated.

I can use random lib as normal cpp code. I think it's a bug in eosio.cdt tool. Any suggestion to fix this?
Thanks.

std::to_string is not working

If I add something like this in hello contract:

#include <eosiolib/eosio.hpp>
#include <string>

using namespace eosio;
using namespace std;
class hello : public eosio::contract {
  public:
      using contract::contract;

      [[eosio::action]]
      void hi( account_name user ) {
         string test = to_string(1);
         print( "Hello, ", name{user} );
      }
};
EOSIO_ABI( hello, (hi) )

It compiles and deploys successfully, but sending 'hi' action returns:
Error 3070002: Runtime Error Processing WASM

The same contract compiled with eosiocpp works fine.

eosio-cpp: Unknown command line argument '-g'. Try: '/usr/local/eosio.wasmsdk//bin/eosio-cpp -help'

/Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake --build /Volumes/mac/eos-api/work/hello/cmake-build-debug --target hello -- -j 2
Scanning dependencies of target hello
[ 50%] Building CXX object CMakeFiles/hello.dir/hello.cpp.o
eosio-cpp: Unknown command line argument '-g'.  Try: '/usr/local/eosio.wasmsdk//bin/eosio-cpp -help'
eosio-cpp: Did you mean '-C'?
make[3]: *** [CMakeFiles/hello.dir/hello.cpp.o] Error 1
make[2]: *** [CMakeFiles/hello.dir/all] Error 2
make[1]: *** [CMakeFiles/hello.dir/rule] Error 2
make: *** [hello] Error 2

Makefile:151: recipe for target 'all' failed [EosioClang-stamp/EosioClang-build]

On Ubuntu 18.04 with new build and latest version of EOS which was running fine

which clang-4.0 | xargs ls -lah
lrwxrwxrwx 1 root root 25 Feb 13 08:26 /usr/bin/clang-4.0 -> ../lib/llvm-4.0/bin/clang

which clang++-4.0 | xargs ls -lah
lrwxrwxrwx 1 root root 27 Feb 13 08:26 /usr/bin/clang++-4.0 -> ../lib/llvm-4.0/bin/clang++

llvm-config-4.0 --version --has-rtti
4.0.1
YES

Steps executed before the error

git clone --recursive https://github.com/eosio/eosio.wasmsdk
cd eosio.wasmsdk
./build.sh EOS

When starting build it says

=========== Building eosio.wasmsdk ===========

OS name:
OS Version: 18.04
CPU speed: 3402.079Mhz
CPU cores: 4
Physical Memory: 7625 Mgb
Disk install: /dev/nvme0n1p1
Disk space total: 77G
Disk space available: 50G

Checking for installed dependencies.

Package clang-4.0 found.
Package lldb-4.0 found.
Package libclang-4.0-dev found.
Package cmake found.
Package make found.
Package automake found.
Package libbz2-dev found.
Package libssl-dev found.
Package libgmp3-dev found.
Package autotools-dev found.
Package build-essential found.
Package libicu-dev found.
Package python2.7-dev found.
Package python3-dev found.
Package autoconf found.
Package libtool found.
Package curl found.
Package zlib1g-dev found.
Package doxygen found.
Package graphviz found.

No required dpkg dependencies to install.

Checking boost library installation.
Boost found at /home/ubuntu/opt/boost.

Checking secp256k1-zkp installation.
secp256k1 found @ /usr/local/lib.

Please see last few lines before the error

[ 93%] Built target eosio-cpp
Scanning dependencies of target eosio-cc
/usr/bin/x86_64-linux-gnu-ld: bfd_new_link_order failed
collect2: error: ld returned 1 exit status
tools/clang/tools/clang-rename/CMakeFiles/clang-rename.dir/build.make:129: recipe for target 'bin/clang-rename' failed
make[5]: *** [bin/clang-rename] Error 1
CMakeFiles/Makefile2:14846: recipe for target 'tools/clang/tools/clang-rename/CMakeFiles/clang-rename.dir/all' failed
make[4]: *** [tools/clang/tools/clang-rename/CMakeFiles/clang-rename.dir/all] Error 2
make[4]: *** Waiting for unfinished jobs....
/usr/bin/x86_64-linux-gnu-ld: BFD (GNU Binutils for Ubuntu) 2.30 internal error, aborting at ../../bfd/merge.c:908 in _bfd_merged_section_offset

/usr/bin/x86_64-linux-gnu-ld: Please report this bug.

collect2: error: ld returned 1 exit status
tools/clang/tools/clang-func-mapping/CMakeFiles/clang-func-mapping.dir/build.make:148: recipe for target 'bin/clang-func-mapping' failed
make[5]: *** [bin/clang-func-mapping] Error 1
make[5]: *** Deleting file 'bin/clang-func-mapping'
CMakeFiles/Makefile2:15379: recipe for target 'tools/clang/tools/clang-func-mapping/CMakeFiles/clang-func-mapping.dir/all' failed
make[4]: *** [tools/clang/tools/clang-func-mapping/CMakeFiles/clang-func-mapping.dir/all] Error 2
/usr/bin/x86_64-linux-gnu-ld: BFD (GNU Binutils for Ubuntu) 2.30 internal error, aborting at ../../bfd/merge.c:908 in _bfd_merged_section_offset

/usr/bin/x86_64-linux-gnu-ld: Please report this bug.

collect2: error: ld returned 1 exit status
tools/clang/tools/clang-import-test/CMakeFiles/clang-import-test.dir/build.make:142: recipe for target 'bin/clang-import-test' failed
make[5]: *** [bin/clang-import-test] Error 1
make[5]: *** Deleting file 'bin/clang-import-test'
CMakeFiles/Makefile2:14457: recipe for target 'tools/clang/tools/clang-import-test/CMakeFiles/clang-import-test.dir/all' failed
make[4]: *** [tools/clang/tools/clang-import-test/CMakeFiles/clang-import-test.dir/all] Error 2
[ 93%] Building CXX object tools/clang/tools/extra/eosio_c_tool/CMakeFiles/eosio-cc.dir//whereami.cpp.o
[ 93%] Building CXX object tools/clang/tools/extra/eosio_c_tool/CMakeFiles/eosio-cc.dir/
/////eosio-cc.cpp.o
[ 93%] Linking CXX executable ../../../../../bin/eosio-cc
[ 93%] Built target eosio-cc
Makefile:151: recipe for target 'all' failed
make[3]: *** [all] Error 2
CMakeFiles/EosioClang.dir/build.make:111: recipe for target 'EosioClang-prefix/src/EosioClang-stamp/EosioClang-build' failed
make[2]: *** [EosioClang-prefix/src/EosioClang-stamp/EosioClang-build] Error 2
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/EosioClang.dir/all' failed
make[1]: *** [CMakeFiles/EosioClang.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Works fine on Ubuntu 16.04 and just an issue with 18.04 on my test above.

Please consider adding Debian stretch to build.sh

$ ./build.sh 
	=========== Building eosio.wasmsdk ===========


	Unsupported Linux Distribution. Exiting now.

$ cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

eosio-abi - bool defined as _Bool

When generating abi via eosio-abi boolean type is defined as _Bool and not as bool.

example:

[[eosio::action]]
void testaction(bool b1, bool b2)
{}

outputed abi:

....
{
    "name": "testaction",
        "base": "",
        "fields": [
            {
                "name": "b1",
                "type": "_Bool"
            },
            {
                "name": "b2",
                "type": "_Bool"
            }
        ]
}

eosio-cpp not compiling contract

I am trying to compile the "eosio.token" contract with the following "eosio-cpp -o eosio.token.wasm eosio.token.cpp --abigen" but nothing is being generated within the terminal and the process won't complete.

A "eosio.token.wasm" and "eosio.token.wasm.tmpefe1114" are generated within the token folder. What could be causing this? If there are errors in the token contract the command shows the errors but otherwise it just shows the cursor blinking and will not complete.

I am using the latest version of CDT.

"Runtime error processing wasm" when using std::to_string

I'm not sure if I should post this in eosio repo or here, but since I don't see this issue when compiling with the old eosiocpp, I decided to post here.

This modified hello example program reproduces the issue for me:

#include <eosiolib/eosio.hpp>
#include <string>

using namespace eosio;
class hello : public eosio::contract {
  public:
      using contract::contract;

      /// @abi action 
      void hi( account_name user, uint64_t i ) {
         std::string str = std::to_string(i);
         print( "Hello, ", name{user});
      }
};

EOSIO_ABI( hello, (hi) )

It compiles fine with this command:

eosio-cpp -o hello.wasm hello.cpp

Sending this action fails and produces this error in the nodeos log:

2018-08-28T15:00:23.226 thread-0   http_plugin.cpp:476           handle_exception     ] Exception Details: 3070002 wasm_execution_error: Runtime Error Processing WASM
final > memory: 18446744073709551520 > 65536
    {}
    thread-0  binaryen.hpp:76 trap
pending console output: 
    {"console":""}
    thread-0  apply_context.cpp:61 exec_one

Like I already said, compiling the old way, with eosiocpp does not produce this error. And if I don't call std::to_string it works fine as well. So something happens in std::to_string.

Would be good, if someone tried to reproduce. I didn't run the standard build.sh script, to build, because my OS is not supported (Arch linux).

I'm running eosio.wasmsdk v1.1.1 and eosio v1.1.6.

eosio-abigen can not compatible with target_include_directories of cmake

my work directory is:
tree .
.
|---- main.cpp
|----main.hpp
├── game
│   ├── common.hpp
│   ├── game.cpp
│   ├── game.hpp
└── table
| ├── gameinfo.hpp

and CMakeList:
set(CMAKE_CXX_FLAGS " -abigen ${CMAKE_CXX_FLAGS} ")

add_executable( minoritygame.wasm
${CMAKE_SOURCE_DIR}/game/game.cpp
${CMAKE_SOURCE_DIR}/main.cpp )
target_include_directories( game.wasm PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/ )

cause my "target_include_directories" is "PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/ " .so in game.cpp ,I use :

#include "table/gameinfo.hpp"

when "make" the wasm will be generated successfully . but the abi file will cuase :

game.cpp:4:10: fatal error: 'game/game.hpp' file not found
#include "game/game.hpp"

if I use "#include gameinfo.hpp" and add table to target_include_directories .it cause the same error.

so . I guess eosio-abigen dose not support multi directory or nested directory

New ABI generator

Create a new abi generator tool to work in the ecosystem of eosio.wasmsdk.

Unable to use eosiolib with only C / without C++?

Is it possible to use eosiolib without C++? I would expect that the items listed under the C API reference would be usable with only C, but I'm running into compiler errors when I target c11. I have been finding these errors while generating bindings for Rust.

It seems like C compilers are unable to parse [[noreturn]] on this line:

[[noreturn]] void eosio_exit( int32_t code );

The memory functions here are listed under the "C API" section but are only accessible with C++:

ubuntu 18.04 build.sh: fails to build

When I run build.sh I get the following error:

[ 82%] Linking CXX executable ../../../../../bin/eosio-cpp
/usr/bin/x86_64-linux-gnu-ld: /[...myhomepath..]/opt/boost/lib/libboost_system.a(error_code.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC

Is it my setup or a problem with cdt?

Full stack trace from log:

[ 82%] Linking CXX executable ../../../../../bin/eosio-cpp
/usr/bin/x86_64-linux-gnu-ld: /[...myhomepath..]/opt/boost/lib/libboost_system.a(error_code.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: /[...myhomepath..]/opt/boost/lib/libboost_filesystem.a(operations.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: /[...myhomepath..]/opt/boost/lib/libboost_filesystem.a(path.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: final link failed: Nicht darstellbarer Abschnitt bei Ausgabe
collect2: error: ld returned 1 exit status
tools/clang/tools/extra/eosio_c_tool/CMakeFiles/eosio-cpp.dir/build.make:151: recipe for target 'bin/eosio-cpp' failed
make[5]: *** [bin/eosio-cpp] Error 1
CMakeFiles/Makefile2:15597: recipe for target 'tools/clang/tools/extra/eosio_c_tool/CMakeFiles/eosio-cpp.dir/all' failed
make[4]: *** [tools/clang/tools/extra/eosio_c_tool/CMakeFiles/eosio-cpp.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make[3]: *** [all] Error 2
CMakeFiles/EosioClang.dir/build.make:111: recipe for target 'EosioClang-prefix/src/EosioClang-stamp/EosioClang-build' failed
make[2]: *** [EosioClang-prefix/src/EosioClang-stamp/EosioClang-build] Error 2
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/EosioClang.dir/all' failed
make[1]: *** [CMakeFiles/EosioClang.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

stringstream makes linker fail

theanswer@eos-test1:~/git/eosio.cdt/examples/hello$ cat hello.cpp
#include <eosiolib/eosio.hpp>
#include <eosiolib/print.hpp>
#include <memory>
#include <sstream>
#include <iostream>
#include <string>

using namespace eosio;
class hello : public eosio::contract {
  public:
      using contract::contract;

      [[eosio::action]]
      void hi( account_name user ) {
	 std::stringstream asd;
	 asd << "aaa";

	 auto astr = asd.str();
         print( "Hello, ", astr, name{user} );
      }
};

theanswer@eos-test1:~/git/eosio.cdt/examples/hello$ eosio-cpp hello.cpp -o hello.wasm
/usr/local/eosio.cdt/bin/wasm-ld: error: locale.cpp.o: undefined symbol: strftime_l
/usr/local/eosio.cdt/bin/wasm-ld: error: memory.cpp.o: undefined symbol: __cxa_pure_virtual
/usr/local/eosio.cdt/bin/wasm-ld: error: system_error.cpp.o: undefined symbol: __cxa_pure_virtual

Installed binaries are quite large

$ ls -alh /usr/local/eosio.wasmsdk/bin/
total 3.8G
drwxr-xr-x 2 root root 4.0K Jul 14 16:14 .
drwxr-xr-x 6 root root 4.0K Jul 14 16:14 ..
-rw-r--r-- 1 root root 1.3M Jul 14 13:34 LLVMEosioApply.so
lrwxrwxrwx 1 root root   36 Jul 14 16:14 clang -> /usr/local/eosio.wasmsdk/bin/clang-7
lrwxrwxrwx 1 root root   36 Jul 14 16:14 clang++ -> /usr/local/eosio.wasmsdk/bin/clang-7
-r-xr-xr-x 1 root root 1.5G Jul 14 14:31 clang-7
-r-xr-xr-x 1 root root  15M Jul 14 13:53 eosio-cc
-r-xr-xr-x 1 root root  15M Jul 14 13:53 eosio-cpp
-r-xr-xr-x 1 root root  15M Jul 14 13:53 eosio-ld
-rwxr-xr-x 1 root root 5.9M Jul 14 13:21 eosio-pp
-r-xr-xr-x 1 root root 506M Jul 14 14:53 llc
-r-xr-xr-x 1 root root 676M Jul 14 14:50 lld
-r-xr-xr-x 1 root root  93M Jul 14 14:01 llvm-ar
-r-xr-xr-x 1 root root  92M Jul 14 14:00 llvm-nm
-r-xr-xr-x 1 root root  92M Jul 14 13:58 llvm-objcopy
-r-xr-xr-x 1 root root 118M Jul 14 14:01 llvm-objdump
lrwxrwxrwx 1 root root    7 Jul 14 16:13 llvm-ranlib -> llvm-ar
lrwxrwxrwx 1 root root   12 Jul 14 16:13 llvm-readelf -> llvm-readobj
-r-xr-xr-x 1 root root 102M Jul 14 13:58 llvm-readobj
lrwxrwxrwx 1 root root   12 Jul 14 16:14 llvm-strip -> llvm-objcopy
-r-xr-xr-x 1 root root 625M Jul 14 14:57 opt
lrwxrwxrwx 1 root root    3 Jul 14 16:14 wasm-ld -> lld

For comparison the ubuntu 18.04 binary distribution of the clang (version 6) executable weighs in at 35MiB instead of 1.5GiB

Better build error message when not enough memory free

When building with the ./build.sh script if you don't have enough free memory then CORES will be set to 0 on this line:

https://github.com/EOSIO/eosio.wasmsdk/blob/master/build.sh#L71

This is later passed on to make as make -j 0, which throws an error because -j must be greater than zero. It would be nice if the build failed early with a nice error message instead.

FYI I ran into this issue while building in a Docker container and fixed it by allocating more memory to the container (with the --memory flag).

Build script error on Centos7

Master branch.
Linux myserv 3.10.0-514.26.1.el7.x86_64 #1 SMP Thu Jun 29 16:05:25 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Error:

CMake Warning at external/wabt/CMakeLists.txt:158 (message):
  Error running file on dummy executable


-- Using prebuilt re2c lexer
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Setting up Eosio Wasm Toolchain
-- Using 'SYS' as CORE symbol name
-- Configuring done
-- Generating done
-- Build files have been written to: /home/valery/eosio.wasmsdk/build
make: the `-j' option requires a positive integral argument
...

./build.sh SYS

While running ./build.sh SYS the following errors arose.

/Users/joneric.cook/eosio.cdt/libraries/eosiolib/types.h:72:8: error: 
      redefinition of 'public_key'
struct public_key {
       ^
/usr/local/include/eosiolib/types.h:34:8: note: previous definition is here
struct public_key {
       ^

/Users/joneric.cook/eosio.cdt/libraries/eosiolib/types.h:80:8: error: 
      redefinition of 'signature'
struct signature {
       ^
/usr/local/include/eosiolib/types.h:38:8: note: previous definition is here
struct signature {

/Users/joneric.cook/eosio.cdt/libraries/eosiolib/types.h:88:16: error: 
      redefinition of 'checksum256'
struct ALIGNED(checksum256) {
               ^
/usr/local/include/eosiolib/types.h:42:16: note: previous definition is here
struct ALIGNED(checksum256) {

/Users/joneric.cook/eosio.cdt/libraries/eosiolib/types.h:96:16: error: 
      redefinition of 'checksum160'
struct ALIGNED(checksum160) {
               ^
/usr/local/include/eosiolib/types.h:46:16: note: previous definition is here
struct ALIGNED(checksum160) {

/Users/joneric.cook/eosio.cdt/libraries/eosiolib/types.h:104:16: error: 
      redefinition of 'checksum512'
struct ALIGNED(checksum512) {
               ^
/usr/local/include/eosiolib/types.h:50:16: note: previous definition is here
struct ALIGNED(checksum512) {

/Users/joneric.cook/eosio.cdt/libraries/eosiolib/types.h:115:8: error: 
      redefinition of 'account_permission'
struct account_permission {
       ^
/usr/local/include/eosiolib/types.h:57:8: note: previous definition is here
struct account_permission {

1 warning and 6 errors generated.
make[2]: *** [libraries/eosiolib/CMakeFiles/eosio.dir/eosiolib.cpp.o] Error 255
make[1]: *** [libraries/eosiolib/CMakeFiles/eosio.dir/all] Error 2
make: *** [all] Error 2

Due to the above, the build did not complete.

How Ricardian statements should be loaded into ABI file

Hello,

When running eosio-cpp hello.cpp -o hello.wasm -abigen or eosio-abigen hello.cpp --output=hello.abi the Ricardian contract statements are not being imported into the ABI file. I checked your last release, and it mentions the ricardeos.py script but it accepts a separate clause-*-rc.md for each statement, which looks a little inefficient. How do we have to define the rc.md files now ? It also looks that the rc.md file names that belong to the hello smart contract in the examples folder should be updated to be recognized by the python script

Regards

wasm linker error: undefined symbol apply

I am trying to compile the following code from the hello world example:

// hello.cpp
#include <eosiolib/eosio.hpp>
#include <eosiolib/print.hpp>

using namespace eosio;

class hello : public eosio::contract {
  public:
    using contract::contract;

    [[eosio::action]]
    void hi( account_name user ) {
      print( "Hello, ", name{user} );
    }
};

and getting this error:

➜  hello  eosio-cpp -o hello.wast hello.cpp --abigen -v
clang version 7.0.0 (https://github.com/eosio/clang.git 0f0efd6a05ee928dfa1b505c55c0d90ae188488e) (https://github.com/eosio/llvm 31e1613
c474cab51a80ac898ec31716273df3729)
Target: wasm32
Thread model: single
InstalledDir: /usr/local/eosio.cdt/bin
 "/usr/local/eosio.cdt/bin/clang-7" -cc1 -triple wasm32 -emit-obj -disable-free -disable-llvm-verifier -discard-value-names -main-file-n
ame hello.cpp -mrelocation-model static -mthread-model single -masm-verbose -mconstructor-aliases -ffreestanding -fuse-init-array -targe
t-cpu generic -fvisibility hidden -dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer -v -coverage-notes-file /home/ubuntu/EO
S/contracts/hello/hello.gcno -resource-dir /usr/local/eosio.cdt/lib/clang/7.0.0 -D BOOST_DISABLE_ASSERTS -D BOOST_EXCEPTION_DISABLE -I /
usr/local/eosio.cdt/bin/../include/libcxx -I /usr/local/eosio.cdt/bin/../include/libc -I /usr/local/eosio.cdt/bin/../include -I /home/ma
x/mnt/storage/opt/boost/include -isysroot /usr/local/eosio.cdt/bin/../ -internal-isystem /usr/local/eosio.cdt/bin/..//include/c++/v1 -in
ternal-isystem /usr/local/eosio.cdt/bin/..//include -O3 -fdeprecated-macro -fdebug-compilation-dir /home/ubuntu/EOS/contracts/hello -ferror
-limit 19 -fmessage-length 136 -fno-builtin -fno-rtti -fno-threadsafe-statics -fobjc-runtime=gnustep -fno-common -fdiagnostics-show-opti
on -fcolor-diagnostics -vectorize-loops -vectorize-slp -load /usr/local/eosio.cdt/bin/LLVMEosioApply.so -mllvm -use-cfl-aa-in-codegen=bo
th -o hello.wast -x c++ hello.cpp
clang -cc1 version 7.0.0 based upon LLVM 7.0.0svn default target x86_64-unknown-linux-gnu
ignoring nonexistent directory "/usr/local/eosio.cdt/bin/..//include/c++/v1"
ignoring nonexistent directory "/usr/local/eosio.cdt/bin/..//usr/local/include"
ignoring nonexistent directory "/usr/local/eosio.cdt/lib/clang/7.0.0/include"
ignoring nonexistent directory "/usr/local/eosio.cdt/bin/..//usr/include"
ignoring duplicate directory "/usr/local/eosio.cdt/bin/../include"
  as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/eosio.cdt/bin/../include/libcxx
 /usr/local/eosio.cdt/bin/../include/libc
 /usr/opt/boost/include
 /usr/local/eosio.cdt/bin/../include
End of search list.
/usr/local/eosio.cdt/bin/wasm-ld: error: undefined symbol: apply

inline action sender transfer failed with const char * type of memo

It's a duplication of EOSIO/eos#4394.

When memo is const char *, it fails.

action(
	permission_level{_self,N(active)},
	N(eosio.token),N(transfer),
	std::make_tuple(_self,which->player,price,"payment from buyer")
).send();

while memo is string, it succeed.

action(
	permission_level{_self,N(active)},
	N(eosio.token),N(transfer),
	std::make_tuple(_self,which->player,price,std::string("payment from buyer"))
).send();

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.