How-To: Bitcoin-Qt with an addrindex patch (Windows & Ubuntu 14.04)


#1
Addrindex patches attempt to make it possible to look up unspent outputs of any bitcoin address.
A how-to for installing one such patch has been posted here:
https://wiki.counterparty.io/index.php?title=Bitcoind_v0.92_with_addrindex_patch_(Windows_2012_R2_and_Ubuntu_14.04)



(The entire line above is a URL, so copy the line or find the link at the bottom of https://wiki.counterparty.io/)

Counterparty Federated Node now installs this version automatically*, but counterpartyd users on Windows and Linux need to install it manually.
I hope I got all my notes for Windows right because it took me hours of trial and error... 

*https://github.com/CounterpartyXCP/counterpartyd_build/blob/master/setup_federated_node.py

#2

I’m trying to build the Ubuntu version but when I come to ‘make’ Bitcoin-Qt I get the following error:

/usr/bin/ld: /home/user/db-4.8.30.NC/build_unix/build/lib//libdb_cxx-4.8.a(cxx_db.o): relocation R_X86_64_32 against _db_associate_intercept_c' can not be used when making a shared object; recompile with -fPIC<br>/home/user/db-4.8.30.NC/build_unix/build/lib//libdb_cxx-4.8.a: error adding symbols: Bad value<br>collect2: error: ld returned 1 exit status<br><br>It sort of sounds like a 32/64 bit issue but as far as I can tell there is only a 64 bit version of Ubuntu Server anyway.&nbsp; I'm running x86 hardware although it is a virtual machine but I create Ubuntu VM's all the time so I can't see that being the cause. <br><br>I have tried starting from Ubuntu Server 14.04 (not 14.04.1) but then executing:<br><br>apt-get update; sudo apt-get -y upgrade<br><br>I also had an error at the ./configure... stage which I resolved with:<br><br>sudo apt-get install pkg-config

`The above may be missing from the instructions unless I made the error.


#3

1. Long answer

Go to https://github.com/CounterpartyXCP/counterpartyd_build and find bitcoind-related build steps in setup_federated_node.py, then work by those steps or hack the script (delete other parts, or just setup a Fed Node).
This procedure builds a “bigger” version of Bitcon-Qt (with QR-encode and other usually unnecessary gizmos)

2. Short answer
You can try a binary I built here:
https://github.com/rippler/btc-jmcorgan-addrindex-v0.9.2.0-fca268c-beta
In case you have any trouble with dependencies, you can install packages that the Fed Node setup script installs.
If you don’t trust other people’s binaries you can still use this one to start reindexing the blockchain while you’re figuring out how to roll your own.

#4

I even had trouble with the short version, I must be having a bad week.  The problem seems to be Berkeley DB.  In the end I added the ppa:bitcoin and installed with apt-get just to get something working.  I then installed the above bitcoind version.  I’m currently reindexing a previous downloaded blockchain to speed things up, so hopefully I can get it working tomorrow.

Thanks for you help, Jason



#5

@lostdroind I know you managed to install but for others to visit this page - I finally found time to rebuild the Ubuntu binary and QA-ed the final binary package to put an end to this annoyance. :slight_smile:


For those who haven’t installed yet, I think now the Ubuntu 14.04 instructions on my repo are correct as well, and all the dependencies are mentioned on the same page. Also the package contains information about dependencies required by it.


#6
@something

Hi, I'm now trying to install jmcorgan addrindex patch but I got the same problem as @lostdroind mentioned above.

The error is this. I got this when I executed "make".

  CXXLD    bitcoind
/usr/bin/ld: /home/xcp/db-4.8.30.NC/build_unix/build/lib//libdb_cxx-4.8.a(cxx_db.o): relocation R_X86_64_32 against `_db_associate_intercept_c' can not be used when making a shared object; recompile with -fPIC
/home/xcp/db-4.8.30.NC/build_unix/build/lib//libdb_cxx-4.8.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

I found two install directions about the patch and I followed by this wiki below. (I am using Ubuntu)

https://wiki.counterparty.io/w/Bitcoind_v0.92_with_addrindex_patch_(Windows_2012_R2_and_Ubuntu_14.04)

Your repo is below, right? I will try it now.

https://github.com/rippler/btc-jmcorgan-addrindex-v0.9.2.0-fca268c-beta

Thanks,

#7

@zono, that’s right.


The error is probably because you don’t have or didn’t your make to correct libdb (libdb4.8 and libdb4.8++ and two development packages associated with these) libraries. I’d repeat the whole procedure to figure out where’s the mistake, but it takes 2 hours on my PC so …

You can get the binary file to avoid building from source. That procedure I tested and it now works fine.

#8
1. I've been using v0.10.0 on Windows and Linux for a week now.
https://github.com/rippler/bitcoin-core-0.10.0-addrindex
v0.10.0 isn't officially supported, but it's been working fine for me.

2. There's another, "more official" source of Windows and Linux binaries for v0.10.0 built by Btcdrak from Viacoin.
https://github.com/btcdrak/bitcoin/releases/tag/addrindex-0.10.0