Skip to content

build: Fix guix build for Windows, macOS cross-compile, and Namecoin branding#571

Merged
domob1812 merged 5 commits intonamecoin:masterfrom
mstrofnone:guix-build-fixes
Mar 6, 2026
Merged

build: Fix guix build for Windows, macOS cross-compile, and Namecoin branding#571
domob1812 merged 5 commits intonamecoin:masterfrom
mstrofnone:guix-build-fixes

Conversation

@mstrofnone
Copy link

Guix Build Fixes for Namecoin Core 30.x

This PR fixes several build issues encountered during reproducible (guix) builds of Namecoin Core, plus replaces remaining Bitcoin branding in user-visible macOS UI strings.

Commits

  1. fix: rename bitcoin-gui to namecoin-gui in import_plugins — Qt plugin import referenced bitcoin-gui target which doesn't exist in Namecoin.

  2. depends: add boost xpressive for Namecoin name RPCs — Namecoin name RPCs require boost::xpressive which wasn't included in the depends boost build.

  3. fix: remove HAS_MANPAGE from bitcoin multiprocess wrapper — The bitcoin wrapper binary's install_binary_component(bitcoin) had no man page at doc/man/bitcoin.1, causing cmake --install to fail on Darwin with:

    CMake Error: file INSTALL cannot find ".../doc/man/bitcoin.1": No such file or directory.
    
  4. Fix CMake target names for Namecoin (deploy, check-symbols, NSIS, macOS bundle) — Namecoin renames most executables (bitcoindnamecoind, bitcoin-qtnamecoin-qt, etc.) but Maintenance.cmake and GenerateSetupNsi.cmake still referenced the Bitcoin target names. This caused:

    • Windows: make: *** No rule to make target 'deploy'. Stop. — the add_windows_deploy_target() function's if(MINGW AND TARGET bitcoind AND TARGET bitcoin-qt ...) condition silently failed because those targets don't exist, so no deploy target was ever created.
    • macOS: Same issue — add_macos_deploy_target() checked for TARGET bitcoin-qt which doesn't exist.
    • check-symbols/check-security: Only checked the bitcoin wrapper binary, missing all the renamed executables.
  5. Replace Bitcoin with Namecoin in macOS UI and user-visible strings — Fixes remaining "Bitcoin" references that users would see:

    • macnotificationhandler.mm: bundle identifier org.bitcoinfoundation.Bitcoin-Qtorg.namecoin.Namecoin-Qt
    • Info.plist.in: icon reference bitcoin.icnsnamecoin.icns
    • Maintenance.cmake: macOS app bundle name Bitcoin-Qt.appNamecoin-Qt.app, icon copy path
    • UI form strings in debugwindow.ui, optionsdialog.ui, receivecoinsdialog.ui: "Bitcoin node/network/client" → "Namecoin"
  6. Fix macOS cross-compile: add CMAKE_INSTALL_NAME_TOOL for darwin targets — When cross-compiling for Darwin in the guix container, CMake's CMakeFindBinUtils module looks for install_name_tool in PATH. The guix environment only provides llvm-install-name-tool, causing:

    CMake Error: Could not find install_name_tool, please check your installation.
    

    This failed during the boost depends configure for x86_64-apple-darwin. Fixed by:

    • Adding darwin_INSTALL_NAME_TOOL to depends/hosts/darwin.mk pointing to llvm-install-name-tool
    • Registering INSTALL_NAME_TOOL in the tool chain in depends/hosts/default.mk
    • Passing -DCMAKE_INSTALL_NAME_TOOL in depends/funcs.mk for darwin cross-compile cmake invocations
    • Setting CMAKE_INSTALL_NAME_TOOL in depends/toolchain.cmake.in for the main build

Additional Notes

  • OOM during Windows build: With JOBS=$(nproc) (16 jobs) and 8GB RAM, the Windows (mingw32) build was OOM-killed during heavy Qt/template compilation. Reducing to JOBS=4 resolved this.
  • PSBT strings: "Partially Signed Bitcoin Transaction (PSBT)" was intentionally left as-is since PSBT is a protocol-standard term (BIP 174).
  • Internal C++ class names (BitcoinGUI, BitcoinUnits, etc.) were left unchanged as they have no user-visible impact.

Build Outputs & Hashes

Linux targets (x86_64, aarch64, arm, powerpc64, riscv64):

8d8f527968a6896663958bc4685a47a79f46fb0cbe9f495de2a2fe6481ff9138  dist-archive/namecoin-3a74a5b91350.tar.gz
a47b01644918fff2f683660a684d74be0bd23bac0c0bdc1302702308026759b4  x86_64-linux-gnu/namecoin-3a74a5b91350-x86_64-linux-gnu.tar.gz
999e394033eadc3f53cefa1a1142592fdaf140ba83259b976abc52e776cc509d  x86_64-linux-gnu/namecoin-3a74a5b91350-x86_64-linux-gnu-debug.tar.gz
f6e951b8bcd9c9c5a6f55de48ebe15b035727a7cc67da6e4452d2c4a8daaf225  aarch64-linux-gnu/namecoin-3a74a5b91350-aarch64-linux-gnu.tar.gz
ae618e451db3860436fa25d596c7c62bf53dfa185d8bb142d1e702fef23bbbee  aarch64-linux-gnu/namecoin-3a74a5b91350-aarch64-linux-gnu-debug.tar.gz
b63c9cc080883e4ee3d698572859c12db94dceaa695d7b24c74fb2043fa4c752  arm-linux-gnueabihf/namecoin-3a74a5b91350-arm-linux-gnueabihf.tar.gz
5ae0a620ff8fe9c98a95e01246829fbc8f3ea067b9eb48251312e43a207171f3  arm-linux-gnueabihf/namecoin-3a74a5b91350-arm-linux-gnueabihf-debug.tar.gz
83e55b2ff2afb7ddac2eb2a18930b7b0c84099a20c899aab24967d2b428f001c  powerpc64-linux-gnu/namecoin-3a74a5b91350-powerpc64-linux-gnu.tar.gz
93d087fed188ad247b25fb1d1b4f17782ce04647a37963c9af2a1ac979c10d27  powerpc64-linux-gnu/namecoin-3a74a5b91350-powerpc64-linux-gnu-debug.tar.gz
dec3a7eb1b72639349b5440b98a54a55c0fea32cc45ccb15cd1dcfa4b1d2c3b8  riscv64-linux-gnu/namecoin-3a74a5b91350-riscv64-linux-gnu.tar.gz
71b716b57320e5276d2ca5b8f334f734a068857d196a77e9a67de890bc61b07a  riscv64-linux-gnu/namecoin-3a74a5b91350-riscv64-linux-gnu-debug.tar.gz

Windows (x86_64-w64-mingw32):

cb57ab3ce27112e4fcf94b113674e615610dc356d423f4f95098fab058bdf8e0  dist-archive/namecoin-38dfd6168b0c.tar.gz
1d3f62d06c3332323cd63d9a602b42075f3fb8d0b197314b694d25b4acb98f31  x86_64-w64-mingw32/namecoin-38dfd6168b0c-win64-unsigned.zip
e0c438ca1ae63cbfc4afea040c0f4b7a4a733b1d92174f89390874cc3ab65ab0  x86_64-w64-mingw32/namecoin-38dfd6168b0c-win64-setup-unsigned.exe
a45dee04b27829279ed31807df3d51319e13efc65da44ec65d793eeae2521b38  x86_64-w64-mingw32/namecoin-38dfd6168b0c-win64-codesigning.tar.gz
de48428927418b6f4aae824d177e1b910977c0538ac19a4787832bcd9bdfc41c  x86_64-w64-mingw32/namecoin-38dfd6168b0c-win64-debug.zip

macOS (x86_64 + arm64):

ef4ec4935331345951cb7d2360a8003862a1e599c755a2e704872362e06f149c  dist-archive/namecoin-7bcd02830cf1.tar.gz
62dd1dc697be62c63659548ad9187bea1926e300a48c6e0c4f71698f6bd12217  x86_64-apple-darwin/namecoin-7bcd02830cf1-x86_64-apple-darwin-unsigned.tar.gz
2ed2ff5cb2a8e9719762006900f34983d50f0ecf42dbbcbaaf312e2417a496aa  x86_64-apple-darwin/namecoin-7bcd02830cf1-x86_64-apple-darwin-unsigned.zip
fe40a7a764783b895a6d237c4c14d61ab25c356ad21a5389a04c53a5f3bead14  x86_64-apple-darwin/namecoin-7bcd02830cf1-x86_64-apple-darwin-codesigning.tar.gz
63e0d4c48f8392ce8aba089ccee74a9e2341e130ef89e312d4163fb876f44c97  arm64-apple-darwin/namecoin-7bcd02830cf1-arm64-apple-darwin-unsigned.tar.gz
cb2f7faed606eaa80f1ff90792c63afa763516c6d035503446f2b4f4f04a76cc  arm64-apple-darwin/namecoin-7bcd02830cf1-arm64-apple-darwin-unsigned.zip
4a946f882d96ee680ad677f543db46483f36f5592969ec135ad348baa140cbb9  arm64-apple-darwin/namecoin-7bcd02830cf1-arm64-apple-darwin-codesigning.tar.gz

Note: Linux builds were from an earlier commit before the Windows/macOS fixes. The hashes above correspond to different commit SHAs because fixes were applied incrementally. A clean full rebuild from the final commit would produce a single consistent set of hashes across all platforms.

@domob1812
Copy link

Thanks! Please rebase and submit this for the master branch (we can backport to 30.x as well if you want, but should do that later).

What is the llvm-name-tool change? Why is that required specifically for Namecoin?

@mstrofnone
Copy link
Author

Thanks! Please rebase and submit this for the master branch (we can backport to 30.x as well if you want, but should do that later).

What is the llvm-name-tool change? Why is that required specifically for Namecoin?

Namecoin needs xpressive -> xpressive gets built via CMake in depends -> CMake searches for install_name_tool on darwin -> Guix only has llvm-install-name-tool -> build fails. Bitcoin Core never hits this because it doesn't build any Boost components that go through CMake in the depends system?

@domob1812
Copy link

Ok thanks for the explanation, that makes sense.

build and others added 4 commits March 7, 2026 01:13
- macnotificationhandler.mm: bundle identifier
- Info.plist.in: icon reference (bitcoin.icns -> namecoin.icns)
- Maintenance.cmake: icon copy path
- debugwindow.ui, optionsdialog.ui, receivecoinsdialog.ui: user-visible descriptions
CMake cannot find install_name_tool when cross-compiling for Darwin because
the guix environment only provides llvm-install-name-tool. This adds proper
toolchain plumbing so CMAKE_INSTALL_NAME_TOOL is set to llvm-install-name-tool
for darwin builds.
@mstrofnone mstrofnone changed the base branch from 30.x to master March 6, 2026 14:16
@domob1812
Copy link

domob1812 commented Mar 6, 2026

ACK ccb1c90. Thanks!

@domob1812 domob1812 merged commit b53238c into namecoin:master Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants