Skip to content

Fix build for GCC 15 and add Arch Linux support#107

Open
RhettCreighton wants to merge 1 commit intomasterfrom
fix/gcc15-arch-linux-build-support
Open

Fix build for GCC 15 and add Arch Linux support#107
RhettCreighton wants to merge 1 commit intomasterfrom
fix/gcc15-arch-linux-build-support

Conversation

@RhettCreighton
Copy link
Copy Markdown

Summary

  • Fix GCC 15 / C23 compatibility in depends build system by setting -std=gnu17 / -std=gnu++17 CFLAGS
  • Fix FakeCoinsViewDB::DB_COINS ODR-use link failure with GCC 15
  • Fix build.sh to pass explicit --with-boost, CPPFLAGS, and LDFLAGS to configure, resolving unreliable depends_prefix resolution in config.site with newer autoconf
  • Add Arch Linux / Manjaro / EndeavourOS / Garuda support to install-deps.sh
  • Update BUILD.md with Arch Linux build instructions

Details

GCC 15 + GMP 6.3.0: GCC 15 defaults to C23 where void g(){} means "no parameters". GMP's configure test calls such a function with arguments, causing the compiler reliability test to fail. Setting -std=gnu17 restores the old behavior.

ODR violation: static const char DB_COINS = 'c' in FakeCoinsViewDB is ODR-used by std::make_pair (taken by const reference). GCC 15 enforces this strictly. Fixed by copying to a local variable.

config.site boost detection: The depends_prefix backtick expansion in config.site can fail with newer autoconf versions, causing --with-boost to resolve to an empty path. Passing explicit paths on the configure command line is more reliable.

Test plan

  • Built successfully on Manjaro Linux with GCC 15.2.1
  • All three binaries produced: zclassicd, zclassic-cli, zclassic-tx
  • Verify build still works on Ubuntu/Debian

GCC 15 defaults to C23 semantics where void f() means no parameters,
breaking GMP 6.3.0 configure tests. Add -std=gnu17/-std=gnu++17 to
depends CFLAGS/CXXFLAGS to restore compatibility.

Fix FakeCoinsViewDB::DB_COINS ODR violation that causes link failure
with GCC 15 by copying the static member to a local variable before
passing to std::make_pair.

Pass explicit --with-boost, CPPFLAGS, and LDFLAGS in build.sh to fix
unreliable depends_prefix resolution in config.site with newer autoconf.

Add Arch/Manjaro/EndeavourOS/Garuda support to install-deps.sh.
Update BUILD.md with Arch Linux instructions.
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.

1 participant