trezor / blockbook

:blue_book: Trezor address/account balance backend
https://trezor.io
GNU Affero General Public License v3.0
667 stars 653 forks source link

Doesn't compile on Ubuntu 24.04 #1131

Open j1warren opened 2 months ago

j1warren commented 2 months ago

see here https://github.com/trezor/blockbook/issues/45#issuecomment-2351618401

j1warren commented 2 months ago

https://github.com/facebook/rocksdb/commit/88edfbfb5e1cac228f7cc31fbec24bb637fe54b1 https://github.com/facebook/rocksdb/pull/12171/files

Fixed it with this in build/docker/bin/Dockerfile

# install rocksdb
RUN cd /opt && git clone -b $ROCKSDB_VERSION --depth 1 https://github.com/facebook/rocksdb.git
+RUN cd /opt/rocksdb && sed -i '8i #include <cstdint>' table/block_based/data_block_hash_index.h && sed -i '9i #include <cstdint>' util/string_util.h && sed -i '11i #include <cstdint>' include/rocksdb/utilities/checkpoint.h
+RUN cd /opt/rocksdb && CFLAGS=-fPIC CXXFLAGS="-fPIC -Wno-error=redundant-move" PORTABLE=$PORTABLE_ROCKSDB make -j 4 release
-RUN cd /opt/rocksdb && CFLAGS=-fPIC CXXFLAGS=-fPIC PORTABLE=$PORTABLE_ROCKSDB make -j 4 release
RUN strip /opt/rocksdb/ldb /opt/rocksdb/sst_dump && \
    cp /opt/rocksdb/ldb /opt/rocksdb/sst_dump /build