Bitcoin Cross-compilation failed with errors in notification.cpp #29682

issue DebianUser007 openend this issue on March 20, 2024
  1. DebianUser007 commented at 3:32 pm on March 20, 2024: none

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    sudo apt update sudo apt upgrade sudo apt install build-essential libtool autotools-dev automake pkg-config bsdmainutils curl git installed all the dependencies in dependencies.md sudo apt install nsis git clone https://github.com/bitcoin/bitcoin.git cd bitcoin sudo apt install g++-mingw-w64-x86-64-posix

    selected the ‘posix’ variant for both. sudo update-alternatives –config x86_64-w64-mingw32-g++ sudo update-alternatives –config x86_64-w64-mingw32-gcc

    PATH=$(echo “$PATH” | sed -e ’s/:/mnt.*//g’) cd depends make HOST=x86_64-w64-mingw32 -j9 cd .. ./autogen.sh CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure –prefix=/ make -j9

    Expected behaviour

    For Linux, the build was successful and the QT wallet is working correctly, but when I tried to build for Windows, the problem started with several errors in notificator.cpp, which is located in the qt folder.

    Steps to reproduce

    btcf0

    Relevant log output

    No response

    How did you obtain Bitcoin Core

    Compiled from source

    What version of Bitcoin Core are you using?

    latest

    Operating system and version

    Debian bookworm

    Machine specifications

    Debian bookworm LXQT Release: 12 AMD Ryzen 7 3800X RAM 32GB HDD 2TB

  2. kristapsk commented at 3:36 pm on March 20, 2024: contributor
    It’s something related to Qt dependencies.
  3. hebasto commented at 3:41 pm on March 20, 2024: member

    @DebianUser007

    selected the ‘posix’ variant for both. sudo update-alternatives –config x86_64-w64-mingw32-g++ sudo update-alternatives –config x86_64-w64-mingw32-gcc

    PATH=$(echo “$PATH” | sed -e ’s/:/mnt.*//g’)

    Those lines could be skipped on your system.

  4. DebianUser007 commented at 3:46 pm on March 20, 2024: none

    @DebianUser007

    selected the ‘posix’ variant for both. sudo update-alternatives –config x86_64-w64-mingw32-g++ sudo update-alternatives –config x86_64-w64-mingw32-gcc PATH=$(echo “$PATH” | sed -e ’s/:/mnt.*//g’)

    Those lines could be skipped on your system. so I do not need to select the ‘posix’ variant for both of these sudo update-alternatives –config x86_64-w64-mingw32-g++ sudo update-alternatives –config x86_64-w64-mingw32-gcc ? also another question i do not need to do it when i build on debian you said but it is the doc for win build PATH=$(echo “$PATH” | sed -e ’s/:/mnt.*//g’) ? Really appreciate your answer and help here from you guys

  5. maflcko commented at 4:08 pm on March 20, 2024: member

    You can follow the existing documentation: https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md

    Make sure to select the right version in the dropdown of the documentation for the commit you want to compile.

  6. DebianUser007 commented at 4:15 pm on March 20, 2024: none

    You can follow the existing documentation: https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md

    Make sure to select the right version in the dropdown of the documentation for the commit you want to compile. I actually exactly used this one but for these commands I went with Posix because I read about the issue on github, maybe I should choose auto mode which is win32

    sudo update-alternatives –config x86_64-w64-mingw32-g++ sudo update-alternatives –config x86_64-w64-mingw32-gcc

  7. hebasto commented at 4:20 pm on March 20, 2024: member

    What version of Bitcoin Core are you using?

    latest

    The latest build documentation does not suggest any update-alternatives commands.

    maybe I should choose auto mode which is win32

    No. The Bitcoin Core uses the posix thread model.

  8. maflcko added the label Build system on Mar 20, 2024
  9. maflcko added the label Questions and Help on Mar 20, 2024
  10. DebianUser007 commented at 4:22 pm on March 20, 2024: none
    Since I’m cross-compiling Bitcoin (which is UNIX-style software) on Debian for Windows, I though the ‘posix’ variant is likely the more appropriate choice. Also this is not the first time I go with Posix when I cross compile Linux softwares for Windows.
  11. maflcko commented at 4:25 pm on March 20, 2024: member
    Closing for now. Feel free to leave a comment, if there is an issue with the build-windows.md documentation.
  12. maflcko closed this on Mar 20, 2024

  13. DebianUser007 commented at 4:27 pm on March 20, 2024: none

    Closing for now. Feel free to leave a comment, if there is an issue with the build-windows.md documentation. wonderful! nothing to say more, thanks anyway

  14. DebianUser007 commented at 4:30 pm on March 20, 2024: none

    What version of Bitcoin Core are you using?

    latest

    The latest build documentation does not suggest any update-alternatives commands.

    maybe I should choose auto mode which is win32

    No. The Bitcoin Core uses the posix thread model. the default auto mode is win32 not posix

    posix

  15. DebianUser007 commented at 10:53 pm on March 23, 2024: none
    After 3 days of hard work day and night, I figured it out and built it on the latest version (version 12) of Debian Bookwork for Windows and macOS. I read all the documentation, but for Debian Bookwork the documentation on Github didn’t help me much. Last but not the least, I didn’t want to change my OS or downgrade to an older version as I use this OS daily for my work.
  16. hebasto commented at 11:31 pm on March 23, 2024: member

    I read all the documentation, but for Debian Bookwork the documentation on Github didn’t help me.

    A pull request with documentation improvements is always welcome.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-21 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me