Comments (11)
Can you try checking whether explicitly including functional header helps and also that you don't have any other C++11 related compiler issue?
from zilliqa.
Sorry I'm not a developer, I'm not familiar with how to explicitly include functional headers. I ran a C++11 compiler verification script and all the checks came back OK.
I have since tried building on CentOS 7.4.1708, which also failed complaining about c++14, which I determined was due to gcc-c++ 4.8.5 (4.9 is required).
The build got much further on Fedora 25 (uses gcc-c++ 6.4.1 instead of 7.2.1 in F27), but ends up complaining about undefined references to LevelDB::..., which seem to be defined in the LevedDB.h file. I will keep working on this, let me know if you have any quick pointers.
from zilliqa.
Experienced the same issue originally reported on a fresh install of Ubuntu 17.10, which uses gcc 7.2. Installing Ubuntu 17.04 now, which uses gcc 6.3.
from zilliqa.
Built and executed test scripts successfully on Ubuntu 17.04, looks like there's a specific library version/path dependency somewhere.
from zilliqa.
Thanks for sharing your findings. I use gcc 5.4. We could use this thread to discuss compatibility issues for most major versions of gcc and linux. I have edited the title to reflect this.
from zilliqa.
Yes, adding #include to src/libUtils/Scheduler.h fixed this issue.
However lt's not linking correctly with leveldb, while both leveldb and leveldb-devel are installed.
[ 72%] Linking CXX executable Test_Transaction
../../src/depends/libDatabase/libOverlay.so: undefined reference to LevelDB::Lookup[abi:cxx11](dev::FixedHash<32u> const&) const' ../../src/depends/libDatabase/libOverlay.so: undefined reference to
LevelDB::Exists(dev::FixedHash<32u> const&) const'
../../src/depends/libDatabase/libOverlay.so: undefined reference to LevelDB::Lookup[abi:cxx11](vector_ref<unsigned char const> const&) const' ../../src/depends/libDatabase/libOverlay.so: undefined reference to
LevelDB::BatchInsert(std::unordered_map<dev::FixedHash<32u>, std::pair<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, unsigned int>, std::hash<dev::FixedHash<32u> >, std::equal_to<dev::FixedHash<32u> >, std::allocator<std::pair<dev::FixedHash<32u> const, std::pair<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, unsigned int> > > >&, std::unordered_map<dev::FixedHash<32u>, std::pair<std::vector<unsigned char, std::allocator >, bool>, std::hash<dev::FixedHash<32u> >, std::equal_to<dev::FixedHash<32u> >, std::allocator<std::pair<dev::FixedHash<32u> const, std::pair<std::vector<unsigned char, std::allocator >, bool> > > >&)'
collect2: fout: ld gaf exit-status 1 terug
make[2]: *** [tests/Data/CMakeFiles/Test_Transaction.dir/build.make:105: tests/Data/Test_Transaction] Fout 1
make[1]: *** [CMakeFiles/Makefile2:1777: tests/Data/CMakeFiles/Test_Transaction.dir/all] Fout 2
make: *** [Makefile:84: all] Fout 2
from zilliqa.
@MastaG May be try explicitly adding -L to the root CMakeLists.txt.
if(NOT IS_LOOKUP_NODE)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS} -pthread -std=c++14 -Wall -DSTAT_TEST -ggdb" )
SET( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS} -pthread -ljsoncpp -lboost_system -lboost_filesystem -std=c++14 -Wall -DSTAT_TEST -L path_here" )
A proper solution may be something as in https://github.com/Zilliqa/Zilliqa/blob/macosx-support/CMakeLists.txt
from zilliqa.
Doesn't seem to work. I've tried to add -lleveldb and -L/usr/lib64 to all four linker lines in the root CMakeLists.txt.
I can confirm that the libleveldb.so is present in /usr/lib64 and so are the header files in /usr/include.
Still the same error.
from zilliqa.
Should I open new issue for the leveldb problem?
from zilliqa.
Anyways, here the exact error:
[ 71%] Linking CXX executable Test_Transaction
cd /home/mastag/src/Zilliqa/build/tests/Data && /usr/bin/cmake -E cmake_link_script CMakeFiles/Test_Transaction.dir/link.txt --verbose=1
/usr/bin/c++ -pthread -std=c++14 -Wall -DSTAT_TEST -ggdb -g -pthread -ljsoncpp -lboost_system -lboost_filesystem -std=c++14 -Wall -DSTAT_TEST -rdynamic CMakeFiles/Test_Transaction.dir/Test_Transaction.cpp.o -o Test_Transaction -Wl,-rpath,/home/mastag/src/Zilliqa/build/src/depends/libTrie:/home/mastag/src/Zilliqa/build/src/depends/common:/home/mastag/src/Zilliqa/build/src/depends/libDatabase ../../src/libData/AccountData/libAccountData.a ../../src/libUtils/libUtils.a ../../src/libData/BlockData/Block/libBlock.a ../../src/libData/BlockData/BlockHeader/libBlockHeader.a ../../src/libCrypto/libCrypto.a -lcrypto ../../src/depends/libTrie/libTrie.so ../../src/depends/libDatabase/libDatabase.a ../../src/libUtils/libUtils.a ../../src/depends/common/libCommon.so -lboost_filesystem -lboost_system ../../src/depends/libDatabase/libOverlay.so -L/usr/lib64 -lleveldb
../../src/depends/libDatabase/libOverlay.so: undefined reference to LevelDB::Lookup[abi:cxx11](dev::FixedHash<32u> const&) const' ../../src/depends/libDatabase/libOverlay.so: undefined reference to
LevelDB::Exists(dev::FixedHash<32u> const&) const'
../../src/depends/libDatabase/libOverlay.so: undefined reference to LevelDB::Lookup[abi:cxx11](vector_ref<unsigned char const> const&) const' ../../src/depends/libDatabase/libOverlay.so: undefined reference to
LevelDB::BatchInsert(std::unordered_map<dev::FixedHash<32u>, std::pair<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, unsigned int>, std::hash<dev::FixedHash<32u> >, std::equal_to<dev::FixedHash<32u> >, std::allocator<std::pair<dev::FixedHash<32u> const, std::pair<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, unsigned int> > > >&, std::unordered_map<dev::FixedHash<32u>, std::pair<std::vector<unsigned char, std::allocator >, bool>, std::hash<dev::FixedHash<32u> >, std::equal_to<dev::FixedHash<32u> >, std::allocator<std::pair<dev::FixedHash<32u> const, std::pair<std::vector<unsigned char, std::allocator >, bool> > > >&)'
collect2: fout: ld gaf exit-status 1 terug
from zilliqa.
The fix #47 resolved the original issue when building from a fresh git clone on Fedora 27, Ubuntu 17.10, and CentOS 7.
I was able to successfully bypass the LevelDB build errors in the 4 failing tests (Test_Account, Test_Transaction, Test_LookupNodeForDSBlock, and Test_LookupNodeForTxBlock) by commenting out their directories in test/CMakeLists.txt:
#add_subdirectory (Data)
#add_subdirectory (Lookup)
I was able to build and run locally on CentOS by installing gcc 5 and building in a development terminal:
sudo yum install centos-release-scl epel-release
sudo yum install boost-devel devtoolset-4-gcc* git jsoncpp-devel cmake leveldb-devel openssl-devel psmisc
scl enable devtoolset-4 bash
./build.sh
Now I'm just working on some freezes that appear to be related to user max process limits/nproc.
from zilliqa.
Related Issues (20)
- [BUG] zilliqa9.2.0: Why can't download persistent data
- [BUG] zilliqa9.2.0: Why can't download persistent data HOT 2
- [BUG] can't transfer() fungible token through ERC20-bridge using Metamask HOT 6
- [BUG] incorrect encoding of Scilla event to EVM, logs.data should be hex, 0x missed HOT 2
- [question]Why can't I finish mining ds diff?
- Zilliqa node didn't start successfully HOT 1
- Twitter logo HOT 1
- [BUG] Links in README incorrect
- The node cannot be synchronized after being upgraded to v9.3.0 HOT 8
- [BUG] Can't deploy contracts, compiled by solc 0.8.20 and upper
- [FEATURE REQUEST] Allow eth_call to accept either the "input" field or the legacy "data" field
- [BUG] &BLOCKNUMBER is zero in scilla contract, when call is performed from the EVM-side
- [FEATURE REQUEST] add Scilla transitions to the EVM transaction receipt
- [FEATURE REQUEST] API for retrieving token amount (e.g. stZil) HOT 1
- [BUG] Gas estimation seems to return a low result, causing transactions to revert when they shouldn't (we think they run out of gas)
- [BUG] EVM logs are sometimes duplicated
- [BUG] eth_getTransactionCount() doesn't support pending block number. HOT 2
- [BUG] eth_getLogs() will eventually stop giving logs for a transaction
- [BUG] eth_call() can't execute contract transfer calls
- [BUG] Incorrect gas estimation of evm -> scilla interop calls
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zilliqa.