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

Fix errors during building on Linux 6.1.0-18, g++ 12.2.0-14 #545

Open
wants to merge 80 commits into
base: master
Choose a base branch
from

Conversation

younicoin
Copy link

While compiled on Linux, fixed some mistakes in code: included libraries, commented out a QT dpi settings. I built without compiling depends, because I have installed those few dependencies.
My system:

~$ g++ --version
g++ (Debian 12.2.0-14) 12.2.0
Copyright (C) 2022 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.

~$ gcc --version
gcc (Debian 12.2.0-14) 12.2.0
Copyright (C) 2022 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.

~$ uname -a
Linux devuan 6.1.0-18-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64 GNU/Linux
~$ apt list --installed 2>&1 | grep boost
libboost-all-dev/stable,now 1.74.0.3 amd64 [installed]

Here it is full process log of first compilation and compilation of my own repository with fixes

wget https://github.com/freecashorg/freecash/archive/refs/tags/v1.0.5.tar.gz
tar -xf v1.0.5.tar.gz 
cd freecash-1.0.5/
#https://github.com/freecashorg/freecash/blob/master/doc/build-unix.md
head -1 depends/packages/packages.mk 
  packages:=boost openssl libevent zeromq
./autogen.sh
mkdir build
cd build
../configure --with-incompatible-bdb
make
  ../../src/amount.h:28:15: note: because ‘Amount’ has user-provided ‘constexpr Amount::Amount(const Amount&)’
     28 |     constexpr Amount(const Amount &_camount) : amount(_camount.amount) {}
        |               ^~~~~~
    CXX      libfreecash_server_a-httpserver.o
  ../../src/httpserver.cpp:77:10: error: ‘deque’ in namespace ‘std’ does not name a template type
     77 |     std::deque<std::unique_ptr<WorkItem>> queue;
vim ../src/httpserver.cpp
  42:#include <deque>
make
  ../../src/validation.cpp: In constructor ‘ConnectTrace::ConnectTrace(CTxMemPool&)’:
  ../../src/validation.cpp:2260:66: error: ‘_1’ was not declared in this scope
   2260 |             boost::bind(&ConnectTrace::NotifyEntryRemoved, this, _1, _2));
vim ../src/validation.cpp
  57:#include <boost/bind/bind.hpp>
  #include <boost/signals2/signal.hpp>
  using namespace boost::placeholders;
make
  ../../src/validationinterface.cpp:85:67: error: ‘_2’ was not declared in this scope
     85 |         boost::bind(&CMainSignals::MempoolEntryRemoved, this, _1, _2));
vim ../src/validationinterface.cpp
  22:#include <boost/bind/bind.hpp>
  #include <boost/signals2/signal.hpp>
  using namespace boost::placeholders;
  make
  ../../src/qt/bitcoingui.cpp: In member function ‘void BitcoinGUI::subscribeToCoreSignals()’:
  ../../src/qt/bitcoingui.cpp:1255:49: error: ‘_1’ was not declared in this scope
   1255 |         boost::bind(ThreadSafeMessageBox, this, _1, _2, _3));
vim ../src/qt/bitcoingui.cpp
  62:#include <boost/bind/bind.hpp>
  #include <boost/signals2/signal.hpp>
  using namespace boost::placeholders;
make
  ../../src/qt/clientmodel.cpp: In member function ‘void ClientModel::subscribeToCoreSignals()’:
  ../../src/qt/clientmodel.cpp:240:67: error: ‘_1’ was not declared in this scope
    240 |         m_node.handleShowProgress(boost::bind(ShowProgress, this, _1, _2));
vim ../src/qt/clientmodel.cpp
  30:#include <boost/bind/bind.hpp>
  #include <boost/signals2/signal.hpp>
  using namespace boost::placeholders;
make
  ../../src/qt/splashscreen.cpp:178:45: error: ‘_2’ was not declared in this scope
    178 |         boost::bind(ShowProgress, this, _1, _2, false)));
vim ../src/qt/splashscreen.cpp
  28:#include <boost/bind/bind.hpp>
  #include <boost/signals2/signal.hpp>
  using namespace boost::placeholders;
make
  ../../src/qt/trafficgraphwidget.cpp: In member function ‘void TrafficGraphWidget::paintPath(QPainterPath&, QQueue<float>&)’:
  ../../src/qt/trafficgraphwidget.cpp:45:9: error: invalid use of incomplete type ‘class QPainterPath’
     45 |         path.moveTo(x, YMARGIN + h);
vim ../src/qt/trafficgraphwidget.h
  11:#include <QPainterPath>
make
  ../../src/qt/transactiontablemodel.cpp: In member function ‘void TransactionTableModel::subscribeToCoreSignals()’:
  ../../src/qt/transactiontablemodel.cpp:771:57: error: ‘_1’ was not declared in this scope
    771 |             boost::bind(NotifyTransactionChanged, this, _1, _2));
vim ../src/qt/transactiontablemodel.cpp
  29:#include <boost/bind/bind.hpp>
  #include <boost/signals2/signal.hpp>
  using namespace boost::placeholders;
make
  ../../src/qt/walletmodel.cpp: In member function ‘void WalletModel::subscribeToCoreSignals()’:
  ../../src/qt/walletmodel.cpp:395:53: error: ‘_1’ was not declared in this scope
    395 |         boost::bind(NotifyAddressBookChanged, this, _1, _2, _3, _4, _5));
vim ../src/qt/walletmodel.cpp
  27:#include <boost/bind/bind.hpp>
  #include <boost/signals2/signal.hpp>
  using namespace boost::placeholders;
make
    CXX      script/libbitcoinconsensus_la-script.lo
    CXX      script/libbitcoinconsensus_la-script_error.lo
    CXX      script/libbitcoinconsensus_la-sigencoding.lo
    CXX      libbitcoinconsensus_la-uint256.lo
    CXX      libbitcoinconsensus_la-utilstrencodings.lo
    CXXLD    libbitcoinconsensus.la
  make[2]: Leaving directory '/mnt/disk-evo-500/crypto/testing/fch/freecash-1.0.5/build/src'
  make[1]: Leaving directory '/mnt/disk-evo-500/crypto/testing/fch/freecash-1.0.5/build/src'
  Making all in doc/man
  make[1]: Entering directory '/mnt/disk-evo-500/crypto/testing/fch/freecash-1.0.5/build/doc/man'
  make[1]: Nothing to be done for 'all'.
  make[1]: Leaving directory '/mnt/disk-evo-500/crypto/testing/fch/freecash-1.0.5/build/doc/man'
  make[1]: Entering directory '/mnt/disk-evo-500/crypto/testing/fch/freecash-1.0.5/build'
  make[1]: Nothing to be done for 'all-am'.
  make[1]: Leaving directory '/mnt/disk-evo-500/crypto/testing/fch/freecash-1.0.5/build'
./src/qt/freecash-qt
  ##2024-02-22 15:19 works, but with warning in terminal:
  Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created.
  ##same issue as in litecoincash
vim src/qt/bitcoin.cpp
  648://QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
cd build
../configure --with-incompatible-bdb
make
./src/qt/freecash-qt
  #works without warnings

Here it is compilation of my repository with fixes (and without any error):

  ##2024-02-22 15:59 now push fix
mkdir my-fix
cd my-fix/
git clone [email protected]:younicoin/freecash.git
cd freecash/
vim src/httpserver.cpp
  42:#include <deque>

vim src/validation.cpp
  57:#include <boost/bind/bind.hpp>
  #include <boost/signals2/signal.hpp>
  using namespace boost::placeholders;

vim src/validationinterface.cpp
  22:#include <boost/bind/bind.hpp>
  #include <boost/signals2/signal.hpp>
  using namespace boost::placeholders;
vim src/qt/bitcoingui.cpp
  62:#include <boost/bind/bind.hpp>
  #include <boost/signals2/signal.hpp>
  using namespace boost::placeholders;

vim src/qt/clientmodel.cpp
  30:#include <boost/bind/bind.hpp>
  #include <boost/signals2/signal.hpp>
  using namespace boost::placeholders;
vim src/qt/splashscreen.cpp
  28:#include <boost/bind/bind.hpp>
  #include <boost/signals2/signal.hpp>
  using namespace boost::placeholders;
vim src/qt/trafficgraphwidget.h
  11:#include <QPainterPath>
vim src/qt/transactiontablemodel.cpp
  29:#include <boost/bind/bind.hpp>
  #include <boost/signals2/signal.hpp>
  using namespace boost::placeholders;
vim src/qt/walletmodel.cpp
  27:#include <boost/bind/bind.hpp>
  #include <boost/signals2/signal.hpp>
  using namespace boost::placeholders;
vim src/qt/bitcoin.cpp
  648://QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
cd ..
cp -r freecash/ compile-freecash
cd compile-freecash
./autogen.sh
mkdir build && cd build
../configure --with-incompatible-bdb
make
  ##16:06:39 started to make. finished at Thu Feb 22 04:37:24 PM MSK 2024
./src/qt/freecash-qt
  ##works fine

can and others added 30 commits July 15, 2019 12:11
Summary: See title.

Test Plan:
  make check
Summary: See title.

Test Plan:
  make check
…time to 1 min;subsidy rate to 0.8

Summary:
1. set PowTargetSpacing time to 1 minute
2. set subsidy ratio to 0.8
3. set subsidy block to 576000 (approximately every 400 days)
4. set mining reward to 25 COIN

Test Plan:
  make check
Summary: see title

Test Plan:
  make check
Summary: see title

Test Plan:
  make check
Summary:
1. add developer reward vout in coinbase: init 25 COIN, cut in half approximately every 400 days
2. add developer reward in GenesisBlock. 50 COIN
3. developer reward CheckTxInputs
4. Deactivates CashAddr by default

Test Plan:
  make check
Summary:
ReplayProtection is the HardFork protection of bch, since freecash will use a brand new HardFork mechanism, we remove the ReplayProtection and Nov 15th 2019 upgrade check

Test Plan:
  make check
Summary: see title.

Test Plan:
  make check
Summary: see title.

Test Plan:
  make check
Summary: see title.

Test Plan:
  make check
Summary: see title.

Test Plan:
  make check
Summary: see title.

Test Plan:
  NOT pass
…rity to 144000

Summary: see title.

Test Plan:
  make check 
Summary: see title.

Test Plan:
  make check
Summary: see title.

Test Plan:
  make check
Summary: see title.

Test Plan:
  make check
Summary: see title.
mining reward and dev reward will all be fixed.

Test Plan:
  make check
Summary: see title.

Test Plan:
  make check
Summary: Freecash has no "history block", we decide to use Schnorr to sign ALL transactions.

Test Plan:
  make check
Summary: see title

Test Plan:
  make check
Summary: see title

Test Plan:
  make check
Summary: see title

Test Plan:
  make check
Summary: see title

Test Plan:
  make check
Summary: see title

Test Plan:
  make check
Summary: see title

Test Plan:
  make check
Summary: see title

Test Plan:
  make check
caisirius and others added 29 commits January 4, 2020 10:40
Summary: See title.

Test Plan:
```
make check
```
Summary: See title.

Reviewer: Deisler-JJ

Test Plan:
```

```
Summary: See title.

Test Plan:
```
make check
freecashd --version
freecash-qt --version
freecash-cli --version
```
Summary: See title.

Test Plan:
```
make check
```
Summary: See title.

Test Plan:
```
make check
```
Summary: change to 'freecash'

Test Plan:
```
make check
```
fix total issuance error
fix seeder testnet netmagic

Summary: See title.

Test Plan:
```
make check
```
Summary: See title.

Reviewer: Deisler-JJ

Test Plan:
```

```
Summary: See title

Test Plan:
```
make check
```
Summary: See title.

Test Plan:
```
make check
freecashd --version
freecash-qt --version
freecash-cli --version
```
Summary:  See title

Test Plan:
```
make check
```
Summary:  See title

Test Plan:
```
make check
```
solve the problem : 1.remove the miner page 2.solve the bitcoin notices
Summary:  See title

Test Plan:
```
make check
```
fix sendtoaddress getwalletinfo getbalance rpc to support dev reward
do not check coinbase on genesis block
chang regtest rewardAddress to another address

Summary: See title.

Test Plan:
```
make check
```
Summary: See title.

Test Plan:
```
make check
```
make tests pass

Summary: See title.

Test Plan:
```
make check
```
Summary:
check op_return size and count in consensus layer: see validation.cpp
The default value is changed when a flag is passed to `IsStandardTx`

Test Plan:
```
make check
```
Summary:

Test Plan:
```
make check
```
Summary:

Test Plan:
```
make check
```
Summary:

Test Plan:
```
make check
```
@PiRK
Copy link
Contributor

PiRK commented Mar 11, 2024

I can have a look at that last commit, but please note that this Github repository is just a mirror of reviews.bitcoinabc.org. See CONTRIBUTING.md

It is likely that the boost includes you added are no longer needed in the current codebase (a lot of boost dependencies were removed in the last 3 years since your fork).

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

Successfully merging this pull request may close these issues.

6 participants