bitcoinknots / bitcoin

Bitcoin Knots enhanced Bitcoin node/wallet software
MIT License
200 stars 60 forks source link

Unable to complete the compilation on macOS. #52

Closed Retropex closed 5 months ago

Retropex commented 6 months ago

Is there an existing issue for this?

Current behaviour

Unable to complete the compilation on macOS.

Expected behaviour

complete the compilation on macOS.

Steps to reproduce

Install all dependencies as indicated in build-osx.md

run ./autogen.sh run ./configure --with-gui=yes run make -j $(nproc)

Relevant log output

See here because it's too long for GitHub.

How did you obtain Bitcoin Knots

Compiled from source

What version of Bitcoin Knots are you using?

25.1

Operating system and version

macOS Sonoma (14.1.1)

Machine specifications

Mac mini M2

luke-jr commented 6 months ago

I don't see any errors in the paste :/

Retropex commented 6 months ago

I just saw that the end was cut by GitHub, here are the last lines before an error occurs.

There is a lot of warning but the error itself is not displayed in the logs.

    ^
/opt/homebrew/include/boost/signals2/connection.hpp:80:22: note: overridden virtual function is here
        virtual bool connected() const = 0;
                     ^
/opt/homebrew/include/boost/signals2/connection.hpp:195:22: warning: 'lock' overrides a member function but is not marked 'override' [-Wsuggest-override]
        virtual void lock()
                     ^
/opt/homebrew/include/boost/signals2/connection.hpp:102:22: note: overridden virtual function is here
        virtual void lock() = 0;
                     ^
/opt/homebrew/include/boost/signals2/connection.hpp:199:22: warning: 'unlock' overrides a member function but is not marked 'override' [-Wsuggest-override]
        virtual void unlock()
                     ^
/opt/homebrew/include/boost/signals2/connection.hpp:103:22: note: overridden virtual function is here
        virtual void unlock() = 0;
                     ^
/opt/homebrew/include/boost/signals2/connection.hpp:212:34: warning: 'release_slot' overrides a member function but is not marked 'override' [-Wsuggest-override]
        virtual shared_ptr<void> release_slot() const
                                 ^
/opt/homebrew/include/boost/signals2/connection.hpp:132:34: note: overridden virtual function is here
        virtual shared_ptr<void> release_slot() const = 0;
                                 ^
/opt/homebrew/include/boost/signals2/connection.hpp:150:22: warning: 'connected' overrides a member function but is not marked 'override' [-Wsuggest-override]
        virtual bool connected() const
                     ^
/opt/homebrew/include/boost/signals2/detail/slot_groups.hpp:77:26: note: in instantiation of template class 'boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional<int>>, boost::signals2::slot<void (wallet::CWallet *)>, boost::signals2::mutex>' requested here
            other_map_it != other._group_map.end();
                         ^
/opt/homebrew/include/boost/signals2/detail/signal_template.hpp:383:71: note: in instantiation of member function 'boost::signals2::detail::grouped_list<int, std::less<int>, boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional<int>>, boost::signals2::slot<void (wallet::CWallet *)>, boost::signals2::mutex>>>::grouped_list' requested here
            const combiner_type &combiner_in): _connection_bodies(new connection_list_type(connections_in)),
                                                                      ^
/opt/homebrew/include/boost/smart_ptr/make_shared_object.hpp:257:17: note: in instantiation of member function 'boost::signals2::detail::signal_impl<void (wallet::CWallet *), boost::signals2::optional_last_value<void>, int, std::less<int>, boost::function<void (wallet::CWallet *)>, boost::function<void (const boost::signals2::connection &, wallet::CWallet *)>, boost::signals2::mutex>::invocation_state::invocation_state' requested here
    ::new( pv ) T( boost::detail::sp_forward<Args>( args )... );
                ^
/opt/homebrew/include/boost/signals2/detail/signal_template.hpp:156:32: note: in instantiation of function template specialization 'boost::make_shared<boost::signals2::detail::signal_impl<void (wallet::CWallet *), boost::signals2::optional_last_value<void>, int, std::less<int>, boost::function<void (wallet::CWallet *)>, boost::function<void (const boost::signals2::connection &, wallet::CWallet *)>, boost::signals2::mutex>::invocation_state, boost::signals2::detail::grouped_list<int, std::less<int>, boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional<int>>, boost::signals2::slot<void (wallet::CWallet *)>, boost::signals2::mutex>>>, const boost::signals2::optional_last_value<void> &>' requested here
          _shared_state(boost::make_shared<invocation_state>(connection_list_type(group_compare), combiner_arg)),
                               ^
/opt/homebrew/include/boost/signals2/detail/signal_template.hpp:660:20: note: in instantiation of member function 'boost::signals2::detail::signal_impl<void (wallet::CWallet *), boost::signals2::optional_last_value<void>, int, std::less<int>, boost::function<void (wallet::CWallet *)>, boost::function<void (const boost::signals2::connection &, wallet::CWallet *)>, boost::signals2::mutex>::signal_impl' requested here
        _pimpl(new impl_class(combiner_arg, group_compare))
                   ^
./wallet/wallet.h:420:5: note: in instantiation of member function 'boost::signals2::signal<void (wallet::CWallet *)>::signal' requested here
    CWallet(interfaces::Chain* chain, const std::string& name, std::unique_ptr<WalletDatabase> database)
    ^
/opt/homebrew/include/boost/signals2/connection.hpp:80:22: note: overridden virtual function is here
        virtual bool connected() const = 0;
                     ^
/opt/homebrew/include/boost/signals2/connection.hpp:195:22: warning: 'lock' overrides a member function but is not marked 'override' [-Wsuggest-override]
        virtual void lock()
                     ^
/opt/homebrew/include/boost/signals2/connection.hpp:102:22: note: overridden virtual function is here
        virtual void lock() = 0;
                     ^
/opt/homebrew/include/boost/signals2/connection.hpp:199:22: warning: 'unlock' overrides a member function but is not marked 'override' [-Wsuggest-override]
        virtual void unlock()
                     ^
/opt/homebrew/include/boost/signals2/connection.hpp:103:22: note: overridden virtual function is here
        virtual void unlock() = 0;
                     ^
/opt/homebrew/include/boost/signals2/connection.hpp:212:34: warning: 'release_slot' overrides a member function but is not marked 'override' [-Wsuggest-override]
        virtual shared_ptr<void> release_slot() const
                                 ^
/opt/homebrew/include/boost/signals2/connection.hpp:132:34: note: overridden virtual function is here
        virtual shared_ptr<void> release_slot() const = 0;
                                 ^
31 warnings generated.
31 warnings generated.
31 warnings generated.
31 warnings generated.
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
luke-jr commented 6 months ago

Gotta be an error somewhere... Perhaps run make -j1 again to cut down on the noise?

Retropex commented 6 months ago

Indeed, the error is more explicit.

/opt/homebrew/Cellar/qt@5/5.15.10_1/lib/QtCore.framework/Headers/qobjectdefs.h:175:32: note: expanded from macro 'Q_OBJECT'
    virtual const QMetaObject *metaObject() const; \
                               ^
In file included from qt/moc_walletview.cpp:10:
In file included from ./qt/walletview.h:11:
In file included from /opt/homebrew/Cellar/qt@5/5.15.10_1/lib/QtWidgets.framework/Headers/QStackedWidget:1:
/opt/homebrew/Cellar/qt@5/5.15.10_1/lib/QtWidgets.framework/Headers/qstackedwidget.h:54:5: warning: 'qt_metacast' overrides a member function but is not marked 'override' [-Wsuggest-override]
    Q_OBJECT
    ^
/opt/homebrew/Cellar/qt@5/5.15.10_1/lib/QtCore.framework/Headers/qobjectdefs.h:176:19: note: expanded from macro 'Q_OBJECT'
    virtual void *qt_metacast(const char *); \
                  ^
/opt/homebrew/Cellar/qt@5/5.15.10_1/lib/QtWidgets.framework/Headers/qframe.h:54:5: note: overridden virtual function is here
    Q_OBJECT
    ^
/opt/homebrew/Cellar/qt@5/5.15.10_1/lib/QtCore.framework/Headers/qobjectdefs.h:176:19: note: expanded from macro 'Q_OBJECT'
    virtual void *qt_metacast(const char *); \
                  ^
In file included from qt/moc_walletview.cpp:10:
In file included from ./qt/walletview.h:11:
In file included from /opt/homebrew/Cellar/qt@5/5.15.10_1/lib/QtWidgets.framework/Headers/QStackedWidget:1:
/opt/homebrew/Cellar/qt@5/5.15.10_1/lib/QtWidgets.framework/Headers/qstackedwidget.h:54:5: warning: 'qt_metacall' overrides a member function but is not marked 'override' [-Wsuggest-override]
    Q_OBJECT
    ^
/opt/homebrew/Cellar/qt@5/5.15.10_1/lib/QtCore.framework/Headers/qobjectdefs.h:177:17: note: expanded from macro 'Q_OBJECT'
    virtual int qt_metacall(QMetaObject::Call, int, void **); \
                ^
/opt/homebrew/Cellar/qt@5/5.15.10_1/lib/QtWidgets.framework/Headers/qframe.h:54:5: note: overridden virtual function is here
    Q_OBJECT
    ^
/opt/homebrew/Cellar/qt@5/5.15.10_1/lib/QtCore.framework/Headers/qobjectdefs.h:177:17: note: expanded from macro 'Q_OBJECT'
    virtual int qt_metacall(QMetaObject::Call, int, void **); \
                ^
In file included from qt/moc_walletview.cpp:10:
./qt/walletview.h:36:5: warning: 'metaObject' overrides a member function but is not marked 'override' [-Wsuggest-override]
    Q_OBJECT
    ^
/opt/homebrew/Cellar/qt@5/5.15.10_1/lib/QtCore.framework/Headers/qobjectdefs.h:175:32: note: expanded from macro 'Q_OBJECT'
    virtual const QMetaObject *metaObject() const; \
                               ^
/opt/homebrew/Cellar/qt@5/5.15.10_1/lib/QtWidgets.framework/Headers/qstackedwidget.h:54:5: note: overridden virtual function is here
    Q_OBJECT
    ^
/opt/homebrew/Cellar/qt@5/5.15.10_1/lib/QtCore.framework/Headers/qobjectdefs.h:175:32: note: expanded from macro 'Q_OBJECT'
    virtual const QMetaObject *metaObject() const; \
                               ^
In file included from qt/moc_walletview.cpp:10:
./qt/walletview.h:36:5: warning: 'qt_metacast' overrides a member function but is not marked 'override' [-Wsuggest-override]
    Q_OBJECT
    ^
/opt/homebrew/Cellar/qt@5/5.15.10_1/lib/QtCore.framework/Headers/qobjectdefs.h:176:19: note: expanded from macro 'Q_OBJECT'
    virtual void *qt_metacast(const char *); \
                  ^
/opt/homebrew/Cellar/qt@5/5.15.10_1/lib/QtWidgets.framework/Headers/qstackedwidget.h:54:5: note: overridden virtual function is here
    Q_OBJECT
    ^
/opt/homebrew/Cellar/qt@5/5.15.10_1/lib/QtCore.framework/Headers/qobjectdefs.h:176:19: note: expanded from macro 'Q_OBJECT'
    virtual void *qt_metacast(const char *); \
                  ^
In file included from qt/moc_walletview.cpp:10:
./qt/walletview.h:36:5: warning: 'qt_metacall' overrides a member function but is not marked 'override' [-Wsuggest-override]
    Q_OBJECT
    ^
/opt/homebrew/Cellar/qt@5/5.15.10_1/lib/QtCore.framework/Headers/qobjectdefs.h:177:17: note: expanded from macro 'Q_OBJECT'
    virtual int qt_metacall(QMetaObject::Call, int, void **); \
                ^
/opt/homebrew/Cellar/qt@5/5.15.10_1/lib/QtWidgets.framework/Headers/qstackedwidget.h:54:5: note: overridden virtual function is here
    Q_OBJECT
    ^
/opt/homebrew/Cellar/qt@5/5.15.10_1/lib/QtCore.framework/Headers/qobjectdefs.h:177:17: note: expanded from macro 'Q_OBJECT'
    virtual int qt_metacall(QMetaObject::Call, int, void **); \
                ^
27 warnings generated.
- make[2]: *** No rule to make target `qt/res/rendered_icons/bitcoin.ico', needed by `qt/qrc_bitcoin.cpp'.  Stop.
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
luke-jr commented 5 months ago

How did you obtain Bitcoin Knots

Please answer this...

Retropex commented 5 months ago

from GitHub.

luke-jr commented 5 months ago

To build from git, you will need additionally rsvg-convert, ImageMagick convert, and png2icns

luke-jr commented 5 months ago

(you must re-run configure after installing them)

Retropex commented 5 months ago

It worked thank you :)

I still have a lot of warning though.

You should also consider adding these instructions in the macOS build doc.

Retropex commented 5 months ago

Oops I just saw another error.

Impossible to create the app with make deploy

leohaf@Mac-mini-de-Leo bitcoin % make deploy
/opt/homebrew/bin/gmkdir -p Bitcoin-Qt.app/Contents
/opt/homebrew/bin/gmkdir -p Bitcoin-Qt.app/Contents/Resources
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C src qt/res/rendered_icons/bitcoin.icns
/opt/homebrew/bin/rsvg-convert -f png -d 512 -p 512 < qt/res/src/bitcoin.svg > qt/res/rendered_icons/bitcoin512.png
/opt/homebrew/bin/png2icns qt/res/rendered_icons/bitcoin.icns qt/res/rendered_icons/bitcoin256.png qt/res/rendered_icons/bitcoin512.png qt/res/rendered_icons/bitcoin1024.png qt/res/rendered_icons/bitcoin32.png qt/res/rendered_icons/bitcoin16.png
/opt/homebrew/lib/node_modules/png2icns/png2icns.js:40
                throw Error('iconutil: ' + err);
                ^

Error: iconutil: Error: Command failed: iconutil --convert icns --output "icon.icns" /opt/homebrew/lib/node_modules/png2icns/temp_1701904511283.iconset
/opt/homebrew/lib/node_modules/png2icns/temp_1701904511283.iconset:Failed to generate ICNS.

    at /opt/homebrew/lib/node_modules/png2icns/png2icns.js:40:23
    at ChildProcess.exithandler (node:child_process:430:5)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)

Node.js v21.3.0
make[1]: *** [qt/res/rendered_icons/bitcoin.icns] Error 1
make: *** [src/qt/res/rendered_icons/bitcoin.icns] Error 2
luke-jr commented 5 months ago

No idea about that one. Please update if you find a solution. (I don't officially support building on macOS at this time)