Windows 64bit compile error #15386

issue yunchiri opened this issue on February 12, 2019
  1. yunchiri commented at 5:34 AM on February 12, 2019: none

    Thanks contributes I want compile and excute bitcon-qt.exe on windows machine

    I tried

    https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md#building-for-64-bit-windows

    PATH=$(echo "$PATH" | sed -e 's/:/mnt.*//g') # strip out problematic Windows %PATH% imported var cd depends make HOST=x86_64-w64-mingw32 cd .. ./autogen.sh # not required when building from tarball CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure --prefix=/ make

    compile error when make

    here is log

    CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure --prefix=/

    ` Options used to compile and link: with wallet = yes with gui / qt = yes with bip70 = yes with qr = yes with zmq = yes with test = yes with fuzz = no with bench = yes with upnp = yes use asm = yes sanitizers = debug enabled = no gprof enabled = no werror = no

    target os = windows build os =

    CC = x86_64-w64-mingw32-gcc CFLAGS = -pipe -O2 CPPFLAGS = -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I/home/hashkorea/bitcoin/depends/x86_64-w64-mingw32/share/../include/ -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -D_WIN32_WINNT=0x0601 -D_FILE_OFFSET_BITS=64 CXX = x86_64-w64-mingw32-g++ -std=c++11 CXXFLAGS = -Wstack-protector -fstack-protector-all -pipe -O2 LDFLAGS = -pthread -Wl,--dynamicbase -Wl,--nxcompat -Wl,--high-entropy-va -pie -L/home/hashkorea/bitcoin/depends/x86_64-w64-mingw32/share/../lib ARFLAGS = cr `

    make <-- error here

    Making all in src make[1]: Entering directory '/home/hashkorea/bitcoin/src' make[2]: Entering directory '/home/hashkorea/bitcoin/src' make[3]: Entering directory '/home/hashkorea/bitcoin' make[3]: Leaving directory '/home/hashkorea/bitcoin' CXX bitcoind-bitcoind.o In file included from ./util/system.h:20:0, from ./init.h:11, from bitcoind.cpp:16: ./logging.h:63:14: error: ‘mutex’ in namespace ‘std’ does not name a type std::mutex m_file_mutex; ^~~~~ In file included from ./util/system.h:21:0, from ./init.h:11, from bitcoind.cpp:16: ./sync.h:107:44: error: ‘recursive_mutex’ is not a member of ‘std’ using RecursiveMutex = AnnotatedMixinstd::recursive_mutex; ^~~~~~~~~~~~~~~ ./sync.h:107:44: error: ‘recursive_mutex’ is not a member of ‘std’ ./sync.h:107:59: error: template argument 1 is invalid using RecursiveMutex = AnnotatedMixinstd::recursive_mutex; ^ ./sync.h:108:29: error: ‘recursive_mutex’ is not a member of ‘std’ typedef AnnotatedMixinstd::recursive_mutex CCriticalSection; ^~~~~~~~~~~~~~~ ./sync.h:108:29: error: ‘recursive_mutex’ is not a member of ‘std’ ./sync.h:108:44: error: template argument 1 is invalid typedef AnnotatedMixinstd::recursive_mutex CCriticalSection; ^ ./sync.h:111:29: error: ‘mutex’ is not a member of ‘std’ typedef AnnotatedMixinstd::mutex Mutex; ^~~~~ ./sync.h:111:29: error: ‘mutex’ is not a member of ‘std’ ./sync.h:111:34: error: template argument 1 is invalid typedef AnnotatedMixinstd::mutex Mutex; ^ ./sync.h:204:10: error: ‘condition_variable’ in namespace ‘std’ does not name a type std::condition_variable condition; ^~~~~~~~~~~~~~~~~~ ./sync.h:205:10: error: ‘mutex’ in namespace ‘std’ does not name a type std::mutex mutex; ^~~~~ ./sync.h: In member function ‘void CSemaphore::wait()’: ./sync.h:213:31: error: ‘mutex’ is not a member of ‘std’ std::unique_lockstd::mutex lock(mutex); ^~~~~ ./sync.h:213:31: error: ‘mutex’ is not a member of ‘std’ ./sync.h:213:36: error: template argument 1 is invalid std::unique_lockstd::mutex lock(mutex); ^ ./sync.h:213:43: error: ‘mutex’ was not declared in this scope std::unique_lockstd::mutex lock(mutex); ^~~~~ ./sync.h:213:43: note: suggested alternative: ‘Mutex’ std::unique_lockstd::mutex lock(mutex); ^~~~~ Mutex ./sync.h:214:9: error: ‘condition’ was not declared in this scope condition.wait(lock, & { return value >= 1; }); ^~~~~~~~~ ./sync.h: In member function ‘bool CSemaphore::try_wait()’: ./sync.h:220:30: error: ‘mutex’ is not a member of ‘std’ std::lock_guardstd::mutex lock(mutex); ^~~~~ ./sync.h:220:30: error: ‘mutex’ is not a member of ‘std’ ./sync.h:220:35: error: template argument 1 is invalid std::lock_guardstd::mutex lock(mutex); ^ ./sync.h:220:42: error: ‘mutex’ was not declared in this scope std::lock_guardstd::mutex lock(mutex); ^~~~~ ./sync.h:220:42: note: suggested alternative: ‘Mutex’ std::lock_guardstd::mutex lock(mutex); ^~~~~ Mutex ./sync.h: In member function ‘void CSemaphore::post()’: ./sync.h:230:34: error: ‘mutex’ is not a member of ‘std’ std::lock_guardstd::mutex lock(mutex); ^~~~~ ./sync.h:230:34: error: ‘mutex’ is not a member of ‘std’ ./sync.h:230:39: error: template argument 1 is invalid std::lock_guardstd::mutex lock(mutex); ^ ./sync.h:230:46: error: ‘mutex’ was not declared in this scope std::lock_guardstd::mutex lock(mutex); ^~~~~ ./sync.h:230:46: note: suggested alternative: ‘Mutex’ std::lock_guardstd::mutex lock(mutex); ^~~~~ Mutex ./sync.h:233:9: error: ‘condition’ was not declared in this scope condition.notify_one(); ^~~~~~~~~ ./sync.h: In substitution of ‘template<class MutexArg> using DebugLock = UniqueLock<typename std::remove_reference<typename std::remove_pointer<_Tp>::type>::type> [with MutexArg = int]’: ./util/system.h:276:9: required from here ./sync.h:177:113: error: ‘std::remove_reference<int>::type {aka int}’ is not a class, struct, or union type using DebugLock = UniqueLock<typename std::remove_reference<typename std::remove_pointer<MutexArg>::type>::type>; ^ ./util/system.h: In member function ‘void ArgsManager::ClearArgs()’: ./sync.h:182:104: error: expression list treated as compound expression in initializer [-fpermissive] #define LOCK(cs) DebugLock<decltype(cs)> PASTE2(criticalblock, COUNTER)(cs, #cs, FILE, LINE) ^ ./util/system.h:276:9: note: in expansion of macro ‘LOCK’ LOCK(cs_args); ^ Makefile:10236: recipe for target 'bitcoind-bitcoind.o' failed make[2]: *** [bitcoind-bitcoind.o] Error 1 make[2]: Leaving directory '/home/hashkorea/bitcoin/src' Makefile:12302: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/hashkorea/bitcoin/src' Makefile:775: recipe for target 'all-recursive' failed make: *** [all-recursive] Error 1

  2. fanquake added the label Windows on Feb 12, 2019
  3. AkioNak commented at 7:15 AM on February 12, 2019: contributor

    It seems this is due to the win32-thread mode of Mingw-w64. If so, try with posix mode.

  4. yunchiri commented at 5:06 AM on February 13, 2019: none

    @AkioNak Thanks Arigato!

  5. fanquake closed this on Feb 13, 2019

  6. yunchiri commented at 6:23 AM on February 13, 2019: none

    i did compile is passed Thanks! sudo update-alternatives --config x86_64-w64-mingw32-g++ # Set the default mingw32 g++ compiler option to posix.

  7. DrahtBot locked this on Dec 16, 2021
Contributors
Labels

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: 2026-04-17 03:14 UTC

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