Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install on Ubuntu (missing libstdc++6) #45

Closed
karelbilek opened this issue Aug 29, 2018 · 8 comments
Closed

Cannot install on Ubuntu (missing libstdc++6) #45

karelbilek opened this issue Aug 29, 2018 · 8 comments

Comments

@karelbilek
Copy link

karelbilek commented Aug 29, 2018

I have tried to install blockbook according to this manual

https://wiki.trezor.io/User_manual:Running_a_local_instance_of_Trezor_Wallet_backend_(Blockbook)

after installing bitcoind and waiting about a week to sychronize blockchain, I try to install blockbook. gdebi writes me

This package is uninstallable
Dependency is not satisfiable: libstdc++6 (>= 6)

....I think blockbook (or the backend installer) could have told me this first, before I synched the blockchain.

@karelbilek karelbilek changed the title Cannot install on Ubuntu Cannot install on Ubuntu (missing libstdc++6) Aug 29, 2018
@karelbilek
Copy link
Author

What actually helped for me

I went into this file, and on the first line

https://github.com/trezor/blockbook/blob/master/build/docker/bin/Dockerfile

I replaced

https://github.com/trezor/blockbook/blob/master/build/docker/bin/Dockerfile#L3

with

FROM ubuntu:16.04 (which is my distro)

That made the resulting deb installable

@petrkr
Copy link
Contributor

petrkr commented Sep 5, 2018

According to manual there is

  1. To install blockbook you will need to use Linux Debian version 9 (Stretch) or later.

seems like ubuntu 16.04 is not compatible with Debian 9 packages (even on libstdcc++)

@martinboehm
Copy link
Contributor

Just a note that at the time of the creation of this issue the documentation was not so specific about the required platform as it is now.
With very low priority, in the future we may support the ubuntu distro. However, for now the easiest way is to stick with the specs.

@karelbilek
Copy link
Author

karelbilek commented Sep 7, 2018

seems like ubuntu 16.04 is not compatible with Debian 9 packages (even on libstdcc++)

It is - https://karelchain.com is running on ubuntu. I just needed to change the Dockerfile for the blockbook deb

@eblackstone
Copy link

I had a similar problem with installing Blockbook on 18.04, a similar change to the Dockerfile made it install w/o any issues by changing the first line of:
~/blockbook/build/docker/bin/Dockerfile

with

FROM ubuntu:18.04

Thanks @karel-3d!

@aussiehash
Copy link

aussiehash commented May 24, 2020

On Debian 10, there is a similar error with
$ sudo apt install ./blockbook-bitcoin_0.3.3_amd64.deb

The following packages have unmet dependencies:
 blockbook-bitcoin : Depends: libgflag2v5 but it is not installable

I have edited /blockbook/build/docker/bin/Dockerfile
with
FROM debian:10

And have repeated sudo make all-bitcoin
It appears to be working, with docker installing libgflags2.2

@ph4r05
Copy link
Contributor

ph4r05 commented Jul 30, 2020

Build on Ubuntu 20.04.01 LTS:

cd /opt
git clone --recursive https://github.com/trezor/blockbook
cd blockbook

#  1. Change source to Ubuntu 20.04
#  2. Set non-interactive installation for TZData as it freezes after Geo area selection
#      https://serverfault.com/questions/949991/how-to-install-tzdata-on-a-ubuntu-docker-image
sed -i 's/FROM debian:9/FROM ubuntu:20.04\n#FROM debian:9\nARG DEBIAN_FRONTEND=noninteractive/g' build/docker/bin/Dockerfile

# Workaround to fix RocksDB build on Ubuntu, GCC 9+ is too restrictive, build fails with errors
#    RUN cd /opt/rocksdb && CFLAGS=-fPIC CXXFLAGS='-fPIC -Wno-error=deprecated-copy -Wno-error=pessimizing-move' make -j 4 release
sed -i 's# CFLAGS=-fPIC.*$# CFLAGS=-fPIC CXXFLAGS="-fPIC -Wno-error=deprecated-copy -Wno-error=pessimizing-move" make -j 4 release#g' build/docker/bin/Dockerfile

# Build
make all-bitcoin

# Disable Docker & free storage space
systemctl disable docker
systemctl stop docker
/bin/rm -rf /var/lib/docker
  • Build requires more than 4 GB (if I remember correctly) of free space for /var/lib/docker FS.
  • Build with FROM debian:10 did not work for Ubuntu 20.04.01 due to some broken dependency.

@j1warren
Copy link

j1warren commented Sep 15, 2024

rocksdb doesn't compile on 24.04, first error is fixed by -Wno-error=redundant-move in CXXFLAGS.
Then it stops here

./table/block_based/data_block_hash_index.h:65:7: error: 'uint8_t' does not name a type
   65 | const uint8_t kNoEntry = 255;
      |       ^~~~~~~
./table/block_based/data_block_hash_index.h:1:1: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
  +++ |+#include <cstdint>
    1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
./table/block_based/data_block_hash_index.h:66:7: error: 'uint8_t' does not name a type
   66 | const uint8_t kCollision = 254;
      |       ^~~~~~~
./table/block_based/data_block_hash_index.h:66:7: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
./table/block_based/data_block_hash_index.h:67:7: error: 'uint8_t' does not name a type
   67 | const uint8_t kMaxRestartSupportedByHashIndex = 253;
      |       ^~~~~~~
./table/block_based/data_block_hash_index.h:67:7: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
./table/block_based/data_block_hash_index.h:112:25: error: 'uint32_t' was not declared in this scope
  112 |   std::vector<std::pair<uint32_t, uint8_t>> hash_and_restart_pairs_;
      |                         ^~~~~~~~
./table/block_based/data_block_hash_index.h:112:25: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
./table/block_based/data_block_hash_index.h:112:35: error: 'uint8_t' was not declared in this scope
  112 |   std::vector<std::pair<uint32_t, uint8_t>> hash_and_restart_pairs_;
      |                                   ^~~~~~~
./table/block_based/data_block_hash_index.h:112:35: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
./table/block_based/data_block_hash_index.h:112:35: error: template argument 1 is invalid
./table/block_based/data_block_hash_index.h:112:35: error: template argument 2 is invalid
./table/block_based/data_block_hash_index.h:112:42: error: template argument 1 is invalid
  112 |   std::vector<std::pair<uint32_t, uint8_t>> hash_and_restart_pairs_;
      |                                          ^~
./table/block_based/data_block_hash_index.h:112:42: error: template argument 2 is invalid
./table/block_based/data_block_hash_index.h: In member function 'size_t rocksdb::DataBlockHashIndexBuilder::EstimateSize() const':
./table/block_based/data_block_hash_index.h:93:5: error: 'uint16_t' was not declared in this scope
   93 |     uint16_t estimated_num_buckets =
      |     ^~~~~~~~
./table/block_based/data_block_hash_index.h:93:5: note: 'uint16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
./table/block_based/data_block_hash_index.h:97:5: error: 'estimated_num_buckets' was not declared in this scope; did you mean 'estimated_num_buckets_'?
   97 |     estimated_num_buckets |= 1;
      |     ^~~~~~~~~~~~~~~~~~~~~
      |     estimated_num_buckets_
./table/block_based/data_block_hash_index.h:100:63: error: 'uint8_t' was not declared in this scope
  100 |            static_cast<size_t>(estimated_num_buckets * sizeof(uint8_t));
      |                                                               ^~~~~~~
./table/block_based/data_block_hash_index.h:100:63: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
./table/block_based/data_block_hash_index.h: At global scope:
./table/block_based/data_block_hash_index.h:120:37: error: 'uint16_t' has not been declared
  120 |   void Initialize(const char* data, uint16_t size, uint16_t* map_offset);
      |                                     ^~~~~~~~
./table/block_based/data_block_hash_index.h:120:52: error: 'uint16_t' has not been declared
  120 |   void Initialize(const char* data, uint16_t size, uint16_t* map_offset);
      |                                                    ^~~~~~~~
./table/block_based/data_block_hash_index.h:122:3: error: 'uint8_t' does not name a type
  122 |   uint8_t Lookup(const char* data, uint32_t map_offset, const Slice& key) const;
      |   ^~~~~~~
./table/block_based/data_block_hash_index.h:122:3: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
./table/block_based/data_block_hash_index.h:133:3: error: 'uint16_t' does not name a type
  133 |   uint16_t num_buckets_;
      |   ^~~~~~~~
./table/block_based/data_block_hash_index.h:133:3: note: 'uint16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
./table/block_based/data_block_hash_index.h: In constructor 'rocksdb::DataBlockHashIndex::DataBlockHashIndex()':
./table/block_based/data_block_hash_index.h:118:26: error: class 'rocksdb::DataBlockHashIndex' does not have any field named 'num_buckets_'
  118 |   DataBlockHashIndex() : num_buckets_(0) {}
      |                          ^~~~~~~~~~~~
./table/block_based/data_block_hash_index.h: In member function 'bool rocksdb::DataBlockHashIndex::Valid()':
./table/block_based/data_block_hash_index.h:124:32: error: 'num_buckets_' was not declared in this scope
  124 |   inline bool Valid() { return num_buckets_ != 0; }
      |                                ^~~~~~~~~~~~
table/block_based/data_block_hash_index.cc: In member function 'void rocksdb::DataBlockHashIndexBuilder::Add(const rocksdb::Slice&, size_t)':
table/block_based/data_block_hash_index.cc:18:23: error: 'kMaxRestartSupportedByHashIndex' was not declared in this scope; did you mean 'kMaxBlockSizeSupportedByHashIndex'?
   18 |   if (restart_index > kMaxRestartSupportedByHashIndex) {
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                       kMaxBlockSizeSupportedByHashIndex
table/block_based/data_block_hash_index.cc:24:27: error: request for member 'emplace_back' in '((rocksdb::DataBlockHashIndexBuilder*)this)->rocksdb::DataBlockHashIndexBuilder::hash_and_restart_pairs_', which is of non-class type 'int'
   24 |   hash_and_restart_pairs_.emplace_back(hash_value,
      |                           ^~~~~~~~~~~~
table/block_based/data_block_hash_index.cc: In member function 'void rocksdb::DataBlockHashIndexBuilder::Finish(std::string&)':
table/block_based/data_block_hash_index.cc:43:45: error: 'kNoEntry' was not declared in this scope
   43 |   std::vector<uint8_t> buckets(num_buckets, kNoEntry);
      |                                             ^~~~~~~~
table/block_based/data_block_hash_index.cc:45:22: error: 'begin' was not declared in this scope; did you mean 'std::begin'?
   45 |   for (auto& entry : hash_and_restart_pairs_) {
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
      |                      std::begin
In file included from /usr/include/c++/13/string:53,
                 from table/block_based/data_block_hash_index.cc:5:
/usr/include/c++/13/bits/range_access.h:114:37: note: 'std::begin' declared here
  114 |   template<typename _Tp> const _Tp* begin(const valarray<_Tp>&) noexcept;
      |                                     ^~~~~
table/block_based/data_block_hash_index.cc:45:22: error: 'end' was not declared in this scope; did you mean 'std::end'?
   45 |   for (auto& entry : hash_and_restart_pairs_) {
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
      |                      std::end
/usr/include/c++/13/bits/range_access.h:116:37: note: 'std::end' declared here
  116 |   template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
      |                                     ^~~
table/block_based/data_block_hash_index.cc:53:27: error: 'kCollision' was not declared in this scope
   53 |       buckets[buck_idx] = kCollision;
      |                           ^~~~~~~~~~
table/block_based/data_block_hash_index.cc: In member function 'void rocksdb::DataBlockHashIndexBuilder::Reset()':
table/block_based/data_block_hash_index.cc:72:27: error: request for member 'clear' in '((rocksdb::DataBlockHashIndexBuilder*)this)->rocksdb::DataBlockHashIndexBuilder::hash_and_restart_pairs_', which is of non-class type 'int'
   72 |   hash_and_restart_pairs_.clear();
      |                           ^~~~~
table/block_based/data_block_hash_index.cc: At global scope:
table/block_based/data_block_hash_index.cc:75:6: error: no declaration matches 'void rocksdb::DataBlockHashIndex::Initialize(const char*, uint16_t, uint16_t*)'
   75 | void DataBlockHashIndex::Initialize(const char* data, uint16_t size,
      |      ^~~~~~~~~~~~~~~~~~
./table/block_based/data_block_hash_index.h:120:8: note: candidate is: 'void rocksdb::DataBlockHashIndex::Initialize(const char*, int, int*)'
  120 |   void Initialize(const char* data, uint16_t size, uint16_t* map_offset);
      |        ^~~~~~~~~~
./table/block_based/data_block_hash_index.h:116:7: note: 'class rocksdb::DataBlockHashIndex' defined here
  116 | class DataBlockHashIndex {
      |       ^~~~~~~~~~~~~~~~~~
table/block_based/data_block_hash_index.cc:85:9: error: no declaration matches 'uint8_t rocksdb::DataBlockHashIndex::Lookup(const char*, uint32_t, const rocksdb::Slice&) const'
   85 | uint8_t DataBlockHashIndex::Lookup(const char* data, uint32_t map_offset,
      |         ^~~~~~~~~~~~~~~~~~
table/block_based/data_block_hash_index.cc:85:9: note: no functions named 'uint8_t rocksdb::DataBlockHashIndex::Lookup(const char*, uint32_t, const rocksdb::Slice&) const'
./table/block_based/data_block_hash_index.h:116:7: note: 'class rocksdb::DataBlockHashIndex' defined here
  116 | class DataBlockHashIndex {
      |       ^~~~~~~~~~~~~~~~~~
  CC       table/block_based/data_block_footer.o
cc1plus: warning: command-line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
make[1]: *** [Makefile:2529: table/block_based/data_block_hash_index.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/opt/rocksdb'
make: *** [Makefile:906: release] Error 2
Error: error building at STEP "RUN cd /opt/rocksdb && CFLAGS=-fPIC CXXFLAGS="-Wno-error=deprecated-copy -Wno-error=pessimizing-move -Wno-error=redundant-move -fPIC" PORTABLE=$PORTABLE_ROCKSDB make -j 4 release": error while running runtime: exit status 2
make[1]: *** [Makefile:48: .bin-image] Error 125

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants