elements icon indicating copy to clipboard operation
elements copied to clipboard

Build error in master

Open grubles opened this issue 2 years ago • 5 comments

Not sure if you guys are aware of this already. Running commit df8e57296c9d16ec4762bc0dd2b55184cd292cb4 on Fedora 38.

$ gcc --version
gcc (GCC) 13.2.1 20231011 (Red Hat 13.2.1-4)
  CXX      support/libbitcoin_util_a-lockedpool.o
support/lockedpool.cpp: In member function ‘void Arena::free(void*)’:
support/lockedpool.cpp:102:20: error: ‘runtime_error’ is not a member of ‘std’
  102 |         throw std::runtime_error("Arena: invalid or double free");
      |                    ^~~~~~~~~~~~~
support/lockedpool.cpp:25:1: note: ‘std::runtime_error’ is defined in header ‘<stdexcept>’; did you forget to ‘#include <stdexcept>’?
   24 | #include <algorithm>
  +++ |+#include <stdexcept>
   25 | #ifdef ARENA_DEBUG
support/lockedpool.cpp: In member function ‘void LockedPool::free(void*)’:
support/lockedpool.cpp:327:16: error: ‘runtime_error’ is not a member of ‘std’
  327 |     throw std::runtime_error("LockedPool: invalid address not pointing to any arena");
      |                ^~~~~~~~~~~~~
support/lockedpool.cpp:327:16: note: ‘std::runtime_error’ is defined in header ‘<stdexcept>’; did you forget to ‘#include <stdexcept>’?
make[2]: *** [Makefile:11455: support/libbitcoin_util_a-lockedpool.o] Error 1

grubles avatar Nov 15 '23 15:11 grubles

looks specific to fedora 38

@psgreco do you have a back port commit that fixes this?

@grubles can you try the elements-23.x branch please

delta1 avatar Nov 15 '23 16:11 delta1

Looks to be this? https://github.com/bitcoin/bitcoin/pull/26924

Trying elements-23.x now.

grubles avatar Nov 15 '23 16:11 grubles

elements-23.x branch builds successfully.

grubles avatar Nov 15 '23 16:11 grubles

Looks to be this? https://github.com/bitcoin/bitcoin/pull/26924

yeah looks like it. it's backported to 23.x but hasn't landed in master yet, you'll have to cherry-pick it if you specifically need master

delta1 avatar Nov 15 '23 17:11 delta1

Yes, sorry I saw this too late, but yes, this is a classic case where the "release" branch is in better shape than master because master needs to wait for the patch to come in from the normal merging process, while in the release branch we have much more flexibility.

https://github.com/ElementsProject/elements/pull/1142 is a previous case of the same problem

psgreco avatar Nov 15 '23 18:11 psgreco