libbitcoin / libbitcoin-explorer

Bitcoin Command Line Tool
Other
600 stars 176 forks source link

Build error #689

Closed kynnjo closed 3 years ago

kynnjo commented 3 years ago

When I attempt to build libbitcoin-explorer on a Debian (buster) system (following the instructions given in https://github.com/libbitcoin/libbitcoin-explorer#debianubuntu), the running of install.sh fails with various errors, all related to the parsing of electrum.hpp. Here's an example of the error messages I get (each of these occurs multiple times, since electrum.hpp is included in several source files):

In file included from ./include/bitcoin/explorer/command.hpp:35,
                 from ./include/bitcoin/explorer/display.hpp:25,
                 from src/display.cpp:20:
./include/bitcoin/explorer/config/electrum.hpp:53:36: error: expected ‘)’ before ‘&’ token
     electrum(wallet::electrum::seed& electrum);
             ~                      ^
                                    )
./include/bitcoin/explorer/config/electrum.hpp:65:14: error: expected type-specifier
     operator wallet::electrum::seed() const;
              ^~~~~~
./include/bitcoin/explorer/config/electrum.hpp:90:23: error: ‘seed’ in namespace ‘libbitcoin::wallet::electrum’ does not name a type
     wallet::electrum::seed value_;
                       ^~~~

The command line I used to run install.sh is this:

./install.sh --prefix=/opt --build-boost --build-zmq --disable-shared

Here is some additional information:

% lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:    10
Codename:   buster

% uname -ar
Linux xxxxxx 4.19.0-12-amd64 #1 SMP Debian 4.19.152-1 (2020-10-18) x86_64 GNU/Linux

% g++ --version
g++ (Debian 8.3.0-6) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Any advice on getting past this error would be appreciated.

Thank you in advance!

kj

evoskuil commented 3 years ago

Which branch?

evoskuil commented 3 years ago

It looks like you may have attempted a build between recent updates of various dependent repositories. In this case wallet::electrum::seed was renamed in libbitcoin-system but the depending change was not yet merged in libbitcoin-explorer. Please try again and let us know.

kynnjo commented 3 years ago

@evoskuil : I did not specify a branch explicitly; I just followed the instructions in the Debian/Ubuntu section of the README.md file, pretty much verbatim. (NB: I did not follow the instructions in the section titled Autotools (advanced users). Should I?)

How should I specify a branch for this repo when I run install.sh?

evoskuil commented 3 years ago

The readme specifies a path to version3 (current release)...

$ wget https://raw.githubusercontent.com/libbitcoin/libbitcoin-explorer/version3/install.sh
$ chmod +x install.sh

This is generally preferred to Autotools, which requires some expertise. In any case I recommend reattempting.

kynnjo commented 3 years ago

FWIW, here's what I ran to get install.sh:

% wget https://raw.githubusercontent.com/libbitcoin/libbitcoin-explorer/version3/install.sh
kynnjo commented 3 years ago

OK, I re-ran the whole thing from scratch, from a clean directory. I get the same errors as before.

FWIW, the following command produces no output (i.e. grep does not find wallet::electrum::seed in the libbitcoin-system subdirectory):

% grep -rl 'wallet::electrum::seed' build-libbitcoin-explorer/libbitcoin-system
evoskuil commented 3 years ago

Ok, thx. I’ll give it a look. It’s curious because the install.sh is run in our CI builds, which are all passing. You might try installing into and building g from a clean non-system directory.

evoskuil commented 3 years ago

Disregard that, I see the issue. We are between updates of system and explorer. The next merge to explorer will resolve it. Should be today.

kynnjo commented 3 years ago

Thanks! I'll look out for the updates you mentioned.

kynnjo commented 3 years ago

I don't see any recent (< 1d) updates to either https://github.com/libbitcoin/libbitcoin-explorer/tree/version3 or https://github.com/libbitcoin/libbitcoin-system/tree/version3, so I guess this is still being worked on.

A possible alternative workaround would be some way to modify the instructions given in https://github.com/libbitcoin/libbitcoin-explorer#debianubuntu so that they build an earlier version of the tool (without the build errors reported here). Is there a convenient way to do this?

evoskuil commented 3 years ago

No

evoskuil commented 3 years ago

https://github.com/libbitcoin/libbitcoin-explorer/pull/690

evoskuil commented 3 years ago

Closing as resolved, ping us if you have any other issues!

kynnjo commented 3 years ago

Thank you, that update did the trick.