openvcash / vcash

A decentralized currency for the internet.
https://vcash.info
GNU Affero General Public License v3.0
36 stars 35 forks source link

gcc6 release type issue #14

Closed sum01 closed 7 years ago

sum01 commented 7 years ago

./slack in /home/usrname/vcash/src/coin/test/bin/gcc-6.3.1/release/link-static/ returns

[ERROR] - load_block_index_guts: DB TX failed to load block index guts, not found
[ERROR] - check_proof_of_work: Block check proof of work failed, hash doesn't match bits.ec58a7013a4c6979221bd9086f786d0e280eef17b2c389314153e081481d8c3b:00000000ffff0000000000000000000000000000000000000000000000000000
[INFO] - invalid_chain_found: Block, invalid chain found, invalid block = ec58a7013a4c6979221b, height = 0, trust = 1, date = 1419310800.

[1:58]  
Segmentation fault (core dumped)

Trying again returns

[INFO] - create_directories: Stack creating path = /home/usrname/.Vcash/data/.
[INFO] - create_directories: Stack creating path = /home/usrname/.Vcash/data/blockchain/.
[INFO] - create_directories: Stack creating path = /home/usrname/.Vcash/data/blockchain/peer/.
[INFO] - load: Configuration is loading from disk.
[INFO] - start: Stack loaded configuration from disk.
[INFO] - open: Database environment log path = /home/usrname/.Vcash/data/database.
[INFO] - open: Database environment cache size = 25.
[INFO] - start: Stack is loading block index...
[ERROR] - operator(): Load block index failed to reset sync-checkpoint.
[INFO] - operator(): Stack failed to load block index.
[ERROR] - on_error: Stack got error, pairs = 2.
Segmentation fault (core dumped)

PC info: 4.10.6-1-ARCH with gcc version 6.3.1 20170306 (GCC)

xCoreDev commented 7 years ago

I checked quickly, there's an assertion error with the daemon built as 'release'. I got it working as it does when built as 'debug'. No issue with gcc4.8 -> gcc5.*

sum01 commented 7 years ago

GCC is now up to v7.1.1 (on Arch-Linux at least), so I hope that the way to resolve this is at least compatible with newer versions.

I tried building with GCC v5.3 via a PKGBUILD I made, but on the Arch repo's GCC seems to have broken links (to the GNU servers), which result in a failed installation. I can't really find a resolution to this, short of creating my own GCC v5.3 pkgbuild from scratch, and require that PKGBUILD in a custom PKGBUILD to build Vcash, but that's a ton of work that I honestly don't fully understand how to do.

whphhg commented 7 years ago

To avoid this issue you can sudo pacman -S gcc5 which will install gcc-5 5.4.0-1 alongside the latest gcc 7.1.1-2. The only change you have to make is in nearly the last line of the build script ../../deps/boost/bjam -j$job toolset=gcc cxxflags=-std=gnu++0x release | tee -a $VCASH_ROOT/build.log by changing the toolset=gcc to toolset=gcc-5.