Compilation error on WSL

Open
#1,502 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp, ubuntu

Research direction

Start by reproducing the reported make failure in the Elements Project under WSL on Ubuntu 24.04.3, from the repository root. Inspect the build output around src/qt/elements-qt.exe and the reported TransactionView and TransactionTableModel linker symbols; done means the latest release compiles successfully with make.

Written by the indexing model from the issue text.

Description

I'm currently trying to compile the latest release of the Elements Project for Windows using WSL (Ubuntu 24.04.3).

When compiling (make), however, the following error occurs:

$ make
Making all in src
make[1]: Entering directory '/home/joaot/elements/src'
make[2]: Entering directory '/home/joaot/elements/src'
make[3]: Entering directory '/home/joaot/elements'
make[3]: Leaving directory '/home/joaot/elements'
  CXXLD    qt/elements-qt.exe
/usr/bin/x86_64-w64-mingw32-ld: qt/libbitcoinqt.a(libbitcoinqt_a-walletview.o):walletview.cpp:(.rdata$.refptr._ZN15TransactionView16staticMetaObjectE[.refptr._ZN15TransactionView16staticMetaObjectE]+0x0): undefined reference to `TransactionView::staticMetaObject'
/usr/bin/x86_64-w64-mingw32-ld: qt/libbitcoinqt.a(libbitcoinqt_a-walletview.o):walletview.cpp:(.rdata$.refptr._ZN15TransactionView7messageERK7QStringS2_j[.refptr._ZN15TransactionView7messageERK7QStringS2_j]+0x0): undefined reference to `TransactionView::message(QString const&, QString const&, unsigned int)'
/usr/bin/x86_64-w64-mingw32-ld: qt/libbitcoinqt.a(libbitcoinqt_a-overviewpage.o):overviewpage.c:(.rdata$.refptr._ZTV25TransactionOverviewWidget[.refptr._ZTV25TransactionOverviewWidget]+0x0): undefined reference to `vtable for TransactionOverviewWidget'
/usr/bin/x86_64-w64-mingw32-ld: qt/libbitcoinqt.a(libbitcoinqt_a-transactiontablemodel.o):transactiontablemodel.cpp:(.rdata$.refptr._ZTV21TransactionTableModel[.refptr._ZTV21TransactionTableModel]+0x0): undefined reference to `vtable for TransactionTableModel'
/usr/bin/x86_64-w64-mingw32-ld: qt/libbitcoinqt.a(libbitcoinqt_a-transactiontablemodel.o):transactiontablemodel.cpp:(.rdata$.refptr._ZN21TransactionTableModel16staticMetaObjectE[.refptr._ZN21TransactionTableModel16staticMetaObjectE]+0x0): undefined reference to `TransactionTableModel::staticMetaObject'
/usr/bin/x86_64-w64-mingw32-ld: qt/libbitcoinqt.a(libbitcoinqt_a-transactionview.o):transactionview.cpp:(.text+0x1532): undefined reference to `TransactionView::message(QString const&, QString const&, unsigned int)'
/usr/bin/x86_64-w64-mingw32-ld: qt/libbitcoinqt.a(libbitcoinqt_a-transactionview.o):transactionview.cpp:(.text+0x170d): undefined reference to `TransactionView::message(QString const&, QString const&, unsigned int)'
/usr/bin/x86_64-w64-mingw32-ld: qt/libbitcoinqt.a(libbitcoinqt_a-transactionview.o):transactionview.cpp:(.text+0x3034): undefined reference to `TransactionView::bumpedFee(uint256 const&)'
/usr/bin/x86_64-w64-mingw32-ld: qt/libbitcoinqt.a(libbitcoinqt_a-transactionview.o):transactionview.cpp:(.rdata$.refptr._ZN15TransactionView9bumpedFeeERK7uint256[.refptr._ZN15TransactionView9bumpedFeeERK7uint256]+0x0): undefined reference to `TransactionView::bumpedFee(uint256 const&)'
/usr/bin/x86_64-w64-mingw32-ld: qt/libbitcoinqt.a(libbitcoinqt_a-transactionview.o):transactionview.cpp:(.rdata$.refptr._ZN15TransactionView13doubleClickedERK11QModelIndex[.refptr._ZN15TransactionView13doubleClickedERK11QModelIndex]+0x0): undefined reference to `TransactionView::doubleClicked(QModelIndex const&)'
/usr/bin/x86_64-w64-mingw32-ld: qt/libbitcoinqt.a(libbitcoinqt_a-transactionview.o):transactionview.cpp:(.rdata$.refptr._ZTV15TransactionView[.refptr._ZTV15TransactionView]+0x0): undefined reference to `vtable for TransactionView'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:7567: qt/elements-qt.exe] Error 1
make[2]: Leaving directory '/home/joaot/elements/src'
make[1]: *** [Makefile:22421: all-recursive] Error 1
make[1]: Leaving directory '/home/joaot/elements/src'
make: *** [Makefile:827: all-recursive] Error 1
Dominant language
C++
Stars
1.2k
Forks
418
Avg merge
1d 12h
Merged PRs (30d)
13

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ElementsProject/elements

All issues in ElementsProject/elements

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.