Skip to content

Commit a77ef57

Browse files
Merge #7077: fix: add $(PTHREAD_FLAGS) to dash_util_LDFLAGS
f8d5c00 fix: add `$(PTHREAD_FLAGS)` to `dash_util_LDFLAGS` (Kittywhiskers Van Gogh) Pull request description: ## Motivation Resolving a regression in Guix builds (see below) ``` AR libtest_util.a x86_64-linux-gnu-ld: dash_util-bitcoin-util.o: in function `std::thread::thread<void (&)(unsigned int, CBlockHeader&, unsigned int, unsigned int, std::atomic<bool>&), unsigned int&, std::reference_wrapper<CBlockHeader>, int&, int&, std::reference_wrapper<std::atomic<bool> >, void>(void (&)(unsigned int, CBlockHeader&, unsigned int, unsigned int, std::atomic<bool>&), unsigned int&, std::reference_wrapper<CBlockHeader>&&, int&, int&, std::reference_wrapper<std::atomic<bool> >&&)': /usr/include/c++/bits/std_thread.h:163:(.text._ZNSt6vectorISt6threadSaIS0_EE17_M_realloc_insertIJRFvjR12CBlockHeaderjjRSt6atomicIbEERjSt17reference_wrapperIS4_ERiSE_SC_IS7_EEEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_[_ZNSt6vectorISt6threadSaIS0_EE17_M_realloc_insertIJRFvjR12CBlockHeaderjjRSt6atomicIbEERjSt17reference_wrapperIS4_ERiSE_SC_IS7_EEEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_]+0x103): undefined reference to `pthread_create' x86_64-linux-gnu-ld: /usr/include/c++/bits/std_thread.h:163:(.text.startup+0x573): undefined reference to `pthread_create' CXXLD test/test_dash x86_64-linux-gnu-ld: /gnu/store/dxk5rbssn95i797xzxycj1vzzmhw5r1b-gcc-cross-x86_64-linux-gnu-12.4.0-lib/lib/gcc/x86_64-linux-gnu/12.4.0/../../../../x86_64-linux-gnu/lib/../lib64/libstdc++.a(thread.o): in function `std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)())': (.text._ZNSt6thread15_M_start_threadESt10unique_ptrINS_6_StateESt14default_deleteIS1_EEPFvvE+0x28): undefined reference to `pthread_create' x86_64-linux-gnu-ld: /gnu/store/dxk5rbssn95i797xzxycj1vzzmhw5r1b-gcc-cross-x86_64-linux-gnu-12.4.0-lib/lib/gcc/x86_64-linux-gnu/12.4.0/../../../../x86_64-linux-gnu/lib/../lib64/libstdc++.a(thread.o): in function `std::thread::_M_start_thread(std::shared_ptr<std::thread::_Impl_base>, void (*)())': (.text._ZNSt6thread15_M_start_threadESt10shared_ptrINS_10_Impl_baseEEPFvvE+0x6f): undefined reference to `pthread_create' collect2: error: ld returned 1 exit status make[2]: *** [Makefile:8039: dash-util] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory '/distsrc-base/distsrc-23.0.2-844-g6fbe514262c1-x86_64-linux-gnu/src' make[1]: *** [Makefile:21926: all-recursive] Error 1 make[1]: Leaving directory '/distsrc-base/distsrc-23.0.2-844-g6fbe514262c1-x86_64-linux-gnu/src' make: *** [Makefile:804: all-recursive] Error 1 ``` ## Breaking Changes None expected. ## Checklist - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)** - [x] I have added or updated relevant unit/integration/functional/e2e tests **(note: N/A)** - [x] I have made corresponding changes to the documentation **(note: N/A)** - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: ACK f8d5c00 Tree-SHA512: 391f5421593f063e1662d645cae5a82f71ab980b0ccd4a905b15f981bb0c9bcfef4cc9b1cb3f6b272c19e9b74129e92c0171734a1b622f256b0be5fcb49a115c
2 parents 0455eb8 + f8d5c00 commit a77ef57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,7 @@ endif
11301130
dash_util_SOURCES = bitcoin-util.cpp
11311131
dash_util_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
11321132
dash_util_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
1133-
dash_util_LDFLAGS = $(LDFLAGS_WRAP_EXCEPTIONS) $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
1133+
dash_util_LDFLAGS = $(LDFLAGS_WRAP_EXCEPTIONS) $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS)
11341134

11351135
if TARGET_WINDOWS
11361136
dash_util_SOURCES += bitcoin-util-res.rc

0 commit comments

Comments
 (0)