gethでのSolidityセットアップ
全ての場合についてのチュートリアル:
http://solidity.readthedocs.io/en/develop/installing-solidity.html
[解決]ソースからbuildする場合:
http://block-chain.jp/tech/install-solidity-solc-on-mac/
インストールされていることを確認する方法:
$ which solc
パスが出てきたらインストールされている。
gethターミナルでのeth.getCompiler()メソッドはもう使われていないのでこちらを用いる。
homebrewでインストールする場合:
公式チュートリアル: Contract Tutorial · ethereum/go-ethereum Wiki · GitHub
[未解決] こちらのコマンドでの一連のエラーを紹介: brew install solidity
1: 2つのエラー
エラー:
・Z3 SMT solver NOT found. CMake Error: The following variables are used in this project, but they are set to NOTFOUND
・GitHub (GitHub::AuthenticationFailedError)
The GitHub credentials in the macOS keychain may be invalid.
エラー詳細:
==> cmake . -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG==> cmake . -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUGLast 15 lines from /Users/name/Library/Logs/Homebrew/solidity/01.cmake:-- TARGET_PLATFORM Target platform Darwin
---------------------------------------------------------------
(省略)
Z3 SMT solver NOT found.
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:/tmp/solidity-20171012-2023-5alie/solidity_0.4.17/libdevcore/Boost_INCLUDE_DIR
used as include directory in directory /tmp/solidity-20171012-2023-5alie/solidity_0.4.17/libdevcore
-- Configuring incomplete, errors occurred!
See also "/tmp/solidity-20171012-2023-5alie/solidity_0.4.17/CMakeFiles/CMakeOutput.log".
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/ethereum/homebrew-ethereum/issues
/usr/local/Homebrew/Library/Homebrew/utils/github.rb:210:in `raise_api_error': GitHub (GitHub::AuthenticationFailedError)
The GitHub credentials in the macOS keychain may be invalid.
Clear them with:
printf "protocol=https\nhost=github.com\n" | git credential-osxkeychain erase
Or create a personal access token:
https://github.com/settings/tokens/new?scopes=gist,public_repo&description=Homebrew
and then set the token as: export HOMEBREW_GITHUB_API_TOKEN="your_new_token"
解決: Github keychainを作成してexport pathを設定
brew search して GitHub API rate limit で怒られたときの対処方法 - Qiita
ー
2: 2つのエラー
Z3 SMT solver NOT found.
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/tmp/solidity-20171012-7826-1o690xi/solidity_0.4.17/libdevcore/Boost_INCLUDE_DIR
used as include directory in directory /tmp/solidity-20171012-7826-1o690xi/solidity_0.4.17/libdevcore
-- Configuring incomplete, errors occurred!
See also "/tmp/solidity-20171012-7826-1o690xi/solidity_0.4.17/CMakeFiles/CMakeOutput.log".
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/ethereum/homebrew-ethereum/issues
These open issues may also help:
Add a dependency on jsoncpp for solidity? https://github.com/ethereum/homebrew-ethereum/issues/123
Error when installing Solidity compiler https://github.com/ethereum/homebrew-ethereum/issues/96
XcodeDefault.xctoolchain/usr/bin/ranlib: file: libsolidity.a(AsmAnalysisInfo.cpp.o) has no symbols https://github.com/ethereum/homebrew-ethereum/issues/128
Add ccache dependency and adds a bottle https://github.com/ethereum/homebrew-ethereum/pull/119
解決策が見つからなかったのでソースからビルドしました。