Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Darka on July 14, 2011, 09:07:23 PM



Title: bitcoind not working on SPARC (and PPC)
Post by: Darka on July 14, 2011, 09:07:23 PM
Hello all!

I build bitcoind from last stable source (0.3.24). But it's not work. After i try run bitcoind i get:
Code:
bitcoind: main.cpp:1546: bool LoadBlockIndex(bool): Assertion `block.hashMerkleRoot == uint256("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b")' failed.
Aborted

Does anybody has solution for this bug?

Platform info:
Code:
# cat /proc/cpuinfo | head -7
cpu : UltraSparc T1 (Niagara)
fpu : UltraSparc T1 integrated FPU
pmu : niagara
prom : OBP 4.30.3 2009/06/08 13:27
type : sun4v
ncpus probed : 24
ncpus active : 24
# uname -a
Linux mikuru 2.6.32-5-sparc64-smp #1 SMP Wed Jan 12 05:23:55 UTC 2011 sparc64 GNU/Linux
# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 6.0.2 (squeeze)
Release: 6.0.2
Codename: squeeze
# gcc -v
Using built-in specs.
Target: sparc-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-8' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-targets=all --with-long-double-128 --enable-checking=release --build=sparc-linux-gnu --host=sparc-linux-gnu --target=sparc-linux-gnu
Thread model: posix
gcc version 4.4.5 (Debian 4.4.5-8)


Title: Re: bitcoind not working on SPARC
Post by: JoelKatz on July 14, 2011, 10:24:01 PM
Sounds like an endianness bug.


Title: Re: bitcoind not working on SPARC
Post by: Darka on July 15, 2011, 06:25:55 AM
Any idea how fix it on non x86 platforms?


Title: Re: bitcoind not working on SPARC
Post by: Binford 6100 on July 15, 2011, 10:02:03 AM
had the same problem with powerpc, what worked for me was to accept it and switch to intel.


Title: Re: bitcoind not working on SPARC
Post by: Darka on July 15, 2011, 10:47:59 AM
had the same problem with powerpc, what worked for me was to accept it and switch to intel.
and it's not solution, it's dirty lifehack =)


Title: Re: bitcoind not working on SPARC (and PPC)
Post by: Mike Hearn on July 15, 2011, 11:08:00 AM
Not a bug so much as a design decision. The Satoshi Bitcoin implementation does not work on big endian architectures and likely never will.

If you want to be a BE Bitcoiner, your best bet is to use one of the other implementations like BitCoinJ or BitCoinJS.


Title: Re: bitcoind not working on SPARC (and PPC)
Post by: Darka on July 15, 2011, 11:12:25 AM
Not a bug so much as a design decision. The Satoshi Bitcoin implementation does not work on big endian architectures and likely never will.

If you want to be a BE Bitcoiner, your best bet is to use one of the other implementations like BitCoinJ or BitCoinJS.

Does BitCoinJ ready for production use on pool servers? Or only way is use dedicated x86 server for bitcoind?


Title: Re: bitcoind not working on SPARC (and PPC)
Post by: Pieter Wuille on July 15, 2011, 12:31:54 PM
Not a bug so much as a design decision. The Satoshi Bitcoin implementation does not work on big endian architectures and likely never will.

If you want to be a BE Bitcoiner, your best bet is to use one of the other implementations like BitCoinJ or BitCoinJS.

I'm not that sure the codes relies on LE that often. The serialization routines for integers, uint160, uint256, and the fact that pointers to those structures are passed directly to hashing routines, would need to be adapted. That does seem reasonable (though not high priority) to change, unless there is a ton i'm forgetting now.