Compilation error for windows target #8511

issue NicolasDorier openend this issue on August 14, 2016
  1. NicolasDorier commented at 8:05 am on August 14, 2016: contributor

    I used git clean -dfx, rebuilt depends, still getting it:

      0CXX      libbitcoin_server_a-pow.o
      1  CXX      libbitcoin_server_a-rest.o
      2  CXX      rpc/libbitcoin_server_a-blockchain.o
      3gcc gen_context.o -o gen_context
      4./gen_context
      5  CC       src/libsecp256k1_la-secp256k1.lo
      6httpserver.cpp:69:10: error: mutex in namespace std does not name a type
      7     std::mutex cs;
      8          ^
      9httpserver.cpp:70:10: error: condition_variable in namespace std does not name a type
     10     std::condition_variable cond;
     11          ^
     12httpserver.cpp: In constructor WorkQueue<WorkItem>::ThreadCounter::ThreadCounter(WorkQueue<WorkItem>&):
     13httpserver.cpp:83:29: error: mutex is not a member of std
     14             std::lock_guard<std::mutex> lock(wq.cs);
     15                             ^
     16httpserver.cpp:83:29: note: suggested alternatives:
     17In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0,
     18                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17,
     19                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14,
     20                 from sync.h:11,
     21                 from httpserver.cpp:12:
     22/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note:   boost::mutex
     23     class mutex:
     24           ^
     25In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0,
     26                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31,
     27                 from util.h:29,
     28                 from httpserver.cpp:9:
     29/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note:   boost::signals2::mutex
     30 class mutex
     31       ^
     32httpserver.cpp:83:29: error: mutex is not a member of std
     33             std::lock_guard<std::mutex> lock(wq.cs);
     34                             ^
     35httpserver.cpp:83:29: note: suggested alternatives:
     36In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0,
     37                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17,
     38                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14,
     39                 from sync.h:11,
     40                 from httpserver.cpp:12:
     41/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note:   boost::mutex
     42     class mutex:
     43           ^
     44In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0,
     45                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31,
     46                 from util.h:29,
     47                 from httpserver.cpp:9:
     48/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note:   boost::signals2::mutex
     49 class mutex
     50       ^
     51httpserver.cpp:83:39: error: template argument 1 is invalid
     52             std::lock_guard<std::mutex> lock(wq.cs);
     53                                       ^
     54httpserver.cpp:83:45: error: invalid type in declaration before ( token
     55             std::lock_guard<std::mutex> lock(wq.cs);
     56                                             ^
     57httpserver.cpp: In destructor WorkQueue<WorkItem>::ThreadCounter::~ThreadCounter():
     58httpserver.cpp:88:29: error: mutex is not a member of std
     59             std::lock_guard<std::mutex> lock(wq.cs);
     60                             ^
     61httpserver.cpp:88:29: note: suggested alternatives:
     62In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0,
     63                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17,
     64                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14,
     65                 from sync.h:11,
     66                 from httpserver.cpp:12:
     67/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note:   boost::mutex
     68     class mutex:
     69           ^
     70In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0,
     71                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31,
     72                 from util.h:29,
     73                 from httpserver.cpp:9:
     74/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note:   boost::signals2::mutex
     75 class mutex
     76       ^
     77httpserver.cpp:88:29: error: mutex is not a member of std
     78             std::lock_guard<std::mutex> lock(wq.cs);
     79                             ^
     80httpserver.cpp:88:29: note: suggested alternatives:
     81In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0,
     82                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17,
     83                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14,
     84                 from sync.h:11,
     85                 from httpserver.cpp:12:
     86/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note:   boost::mutex
     87     class mutex:
     88           ^
     89In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0,
     90                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31,
     91                 from util.h:29,
     92                 from httpserver.cpp:9:
     93/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note:   boost::signals2::mutex
     94 class mutex
     95       ^
     96httpserver.cpp:88:39: error: template argument 1 is invalid
     97             std::lock_guard<std::mutex> lock(wq.cs);
     98                                       ^
     99httpserver.cpp:88:45: error: invalid type in declaration before ( token
    100             std::lock_guard<std::mutex> lock(wq.cs);
    101                                             ^
    102httpserver.cpp: In member function bool WorkQueue<WorkItem>::Enqueue(WorkItem*):
    103httpserver.cpp:109:26: error: mutex is not a member of std
    104         std::unique_lock<std::mutex> lock(cs);
    105                          ^
    106httpserver.cpp:109:26: note: suggested alternatives:
    107In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0,
    108                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17,
    109                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14,
    110                 from sync.h:11,
    111                 from httpserver.cpp:12:
    112/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note:   boost::mutex
    113     class mutex:
    114           ^
    115In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0,
    116                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31,
    117                 from util.h:29,
    118                 from httpserver.cpp:9:
    119/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note:   boost::signals2::mutex
    120 class mutex
    121       ^
    122httpserver.cpp:109:26: error: mutex is not a member of std
    123         std::unique_lock<std::mutex> lock(cs);
    124                          ^
    125httpserver.cpp:109:26: note: suggested alternatives:
    126In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0,
    127                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17,
    128                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14,
    129                 from sync.h:11,
    130                 from httpserver.cpp:12:
    131/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note:   boost::mutex
    132     class mutex:
    133           ^
    134In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0,
    135                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31,
    136                 from util.h:29,
    137                 from httpserver.cpp:9:
    138/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note:   boost::signals2::mutex
    139 class mutex
    140       ^
    141httpserver.cpp:109:36: error: template argument 1 is invalid
    142         std::unique_lock<std::mutex> lock(cs);
    143                                    ^
    144httpserver.cpp:109:42: error: invalid type in declaration before ( token
    145         std::unique_lock<std::mutex> lock(cs);
    146                                          ^
    147httpserver.cpp:109:43: error: cs was not declared in this scope
    148         std::unique_lock<std::mutex> lock(cs);
    149                                           ^
    150httpserver.cpp:114:9: error: cond was not declared in this scope
    151         cond.notify_one();
    152         ^
    153httpserver.cpp: In member function void WorkQueue<WorkItem>::Run():
    154httpserver.cpp:124:34: error: mutex is not a member of std
    155                 std::unique_lock<std::mutex> lock(cs);
    156                                  ^
    157httpserver.cpp:124:34: note: suggested alternatives:
    158In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0,
    159                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17,
    160                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14,
    161                 from sync.h:11,
    162                 from httpserver.cpp:12:
    163/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note:   boost::mutex
    164     class mutex:
    165           ^
    166In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0,
    167                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31,
    168                 from util.h:29,
    169                 from httpserver.cpp:9:
    170/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note:   boost::signals2::mutex
    171 class mutex
    172       ^
    173httpserver.cpp:124:34: error: mutex is not a member of std
    174                 std::unique_lock<std::mutex> lock(cs);
    175                                  ^
    176httpserver.cpp:124:34: note: suggested alternatives:
    177In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0,
    178                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17,
    179                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14,
    180                 from sync.h:11,
    181                 from httpserver.cpp:12:
    182/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note:   boost::mutex
    183     class mutex:
    184           ^
    185In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0,
    186                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31,
    187                 from util.h:29,
    188                 from httpserver.cpp:9:
    189/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note:   boost::signals2::mutex
    190 class mutex
    191       ^
    192httpserver.cpp:124:44: error: template argument 1 is invalid
    193                 std::unique_lock<std::mutex> lock(cs);
    194                                            ^
    195httpserver.cpp:124:50: error: invalid type in declaration before ( token
    196                 std::unique_lock<std::mutex> lock(cs);
    197                                                  ^
    198httpserver.cpp:124:51: error: cs was not declared in this scope
    199                 std::unique_lock<std::mutex> lock(cs);
    200                                                   ^
    201httpserver.cpp:126:21: error: cond was not declared in this scope
    202                     cond.wait(lock);
    203                     ^
    204httpserver.cpp: In member function void WorkQueue<WorkItem>::Interrupt():
    205httpserver.cpp:138:26: error: mutex is not a member of std
    206         std::unique_lock<std::mutex> lock(cs);
    207                          ^
    208httpserver.cpp:138:26: note: suggested alternatives:
    209In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0,
    210                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17,
    211                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14,
    212                 from sync.h:11,
    213                 from httpserver.cpp:12:
    214/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note:   boost::mutex
    215     class mutex:
    216           ^
    217In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0,
    218                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31,
    219                 from util.h:29,
    220                 from httpserver.cpp:9:
    221/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note:   boost::signals2::mutex
    222 class mutex
    223       ^
    224httpserver.cpp:138:26: error: mutex is not a member of std
    225         std::unique_lock<std::mutex> lock(cs);
    226                          ^
    227httpserver.cpp:138:26: note: suggested alternatives:
    228In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0,
    229                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17,
    230                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14,
    231                 from sync.h:11,
    232                 from httpserver.cpp:12:
    233/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note:   boost::mutex
    234     class mutex:
    235           ^
    236In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0,
    237                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31,
    238                 from util.h:29,
    239                 from httpserver.cpp:9:
    240/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note:   boost::signals2::mutex
    241 class mutex
    242       ^
    243httpserver.cpp:138:36: error: template argument 1 is invalid
    244         std::unique_lock<std::mutex> lock(cs);
    245                                    ^
    246httpserver.cpp:138:42: error: invalid type in declaration before ( token
    247         std::unique_lock<std::mutex> lock(cs);
    248                                          ^
    249httpserver.cpp:138:43: error: cs was not declared in this scope
    250         std::unique_lock<std::mutex> lock(cs);
    251                                           ^
    252httpserver.cpp:140:9: error: cond was not declared in this scope
    253         cond.notify_all();
    254         ^
    255httpserver.cpp: In member function void WorkQueue<WorkItem>::WaitExit():
    256httpserver.cpp:145:26: error: mutex is not a member of std
    257         std::unique_lock<std::mutex> lock(cs);
    258                          ^
    259httpserver.cpp:145:26: note: suggested alternatives:
    260In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0,
    261                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17,
    262                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14,
    263                 from sync.h:11,
    264                 from httpserver.cpp:12:
    265/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note:   boost::mutex
    266     class mutex:
    267           ^
    268In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0,
    269                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31,
    270                 from util.h:29,
    271                 from httpserver.cpp:9:
    272/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note:   boost::signals2::mutex
    273 class mutex
    274       ^
    275httpserver.cpp:145:26: error: mutex is not a member of std
    276         std::unique_lock<std::mutex> lock(cs);
    277                          ^
    278httpserver.cpp:145:26: note: suggested alternatives:
    279In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0,
    280                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17,
    281                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14,
    282                 from sync.h:11,
    283                 from httpserver.cpp:12:
    284/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note:   boost::mutex
    285     class mutex:
    286           ^
    287In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0,
    288                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31,
    289                 from util.h:29,
    290                 from httpserver.cpp:9:
    291/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note:   boost::signals2::mutex
    292 class mutex
    293       ^
    294httpserver.cpp:145:36: error: template argument 1 is invalid
    295         std::unique_lock<std::mutex> lock(cs);
    296                                    ^
    297httpserver.cpp:145:42: error: invalid type in declaration before ( token
    298         std::unique_lock<std::mutex> lock(cs);
    299                                          ^
    300httpserver.cpp:145:43: error: cs was not declared in this scope
    301         std::unique_lock<std::mutex> lock(cs);
    302                                           ^
    303httpserver.cpp:147:13: error: cond was not declared in this scope
    304             cond.wait(lock);
    305             ^
    306httpserver.cpp: In member function size_t WorkQueue<WorkItem>::Depth():
    307httpserver.cpp:153:26: error: mutex is not a member of std
    308         std::unique_lock<std::mutex> lock(cs);
    309                          ^
    310httpserver.cpp:153:26: note: suggested alternatives:
    311In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0,
    312                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17,
    313                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14,
    314                 from sync.h:11,
    315                 from httpserver.cpp:12:
    316/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note:   boost::mutex
    317     class mutex:
    318           ^
    319In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0,
    320                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31,
    321                 from util.h:29,
    322                 from httpserver.cpp:9:
    323/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note:   boost::signals2::mutex
    324 class mutex
    325       ^
    326httpserver.cpp:153:26: error: mutex is not a member of std
    327         std::unique_lock<std::mutex> lock(cs);
    328                          ^
    329httpserver.cpp:153:26: note: suggested alternatives:
    330In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0,
    331                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17,
    332                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14,
    333                 from sync.h:11,
    334                 from httpserver.cpp:12:
    335/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note:   boost::mutex
    336     class mutex:
    337           ^
    338In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0,
    339                 from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31,
    340                 from util.h:29,
    341                 from httpserver.cpp:9:
    342/home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note:   boost::signals2::mutex
    343 class mutex
    344       ^
    345httpserver.cpp:153:36: error: template argument 1 is invalid
    346         std::unique_lock<std::mutex> lock(cs);
    347                                    ^
    348httpserver.cpp:153:42: error: invalid type in declaration before ( token
    349         std::unique_lock<std::mutex> lock(cs);
    350                                          ^
    351httpserver.cpp:153:43: error: cs was not declared in this scope
    352         std::unique_lock<std::mutex> lock(cs);
    353                                           ^
    354httpserver.cpp: At global scope:
    355httpserver.cpp:439:6: error: thread in namespace std does not name a type
    356 std::thread threadHTTP;
    357      ^
    358httpserver.cpp:440:19: error: aggregate std::future<bool> threadResult has incomplete type and cannot be defined
    359 std::future<bool> threadResult;
    360                   ^
    361httpserver.cpp: In function bool StartHTTPServer():
    362httpserver.cpp:447:67: error: variable std::packaged_task<bool(event_base*, evhttp*)> task has initializer but incomplete type
    363     std::packaged_task<bool(event_base*, evhttp*)> task(ThreadHTTP);
    364                                                                   ^
    365httpserver.cpp:449:5: error: threadHTTP was not declared in this scope
    366     threadHTTP = std::thread(std::move(task), eventBase, eventHTTP);
    367     ^
    368httpserver.cpp:449:18: error: thread is not a member of std
    369     threadHTTP = std::thread(std::move(task), eventBase, eventHTTP);
    370                  ^
    371httpserver.cpp:452:9: error: thread is not a member of std
    372         std::thread rpc_worker(HTTPWorkQueueRun, workQueue);
    373         ^
    374httpserver.cpp:453:9: error: rpc_worker was not declared in this scope
    375         rpc_worker.detach();
    376         ^
    377httpserver.cpp: In function void StopHTTPServer():
    378httpserver.cpp:493:9: error: threadHTTP was not declared in this scope
    379         threadHTTP.join();
    380         ^
    381httpserver.cpp: In instantiation of WorkQueue<WorkItem>::ThreadCounter::ThreadCounter(WorkQueue<WorkItem>&) [with WorkItem = HTTPClosure]:
    382httpserver.cpp:120:34:   required from void WorkQueue<WorkItem>::Run() [with WorkItem = HTTPClosure]
    383httpserver.cpp:356:16:   required from here
    384httpserver.cpp:83:51: error: class WorkQueue<HTTPClosure> has no member named cs
    385             std::lock_guard<std::mutex> lock(wq.cs);
    386                                                   ^
    387httpserver.cpp: In instantiation of WorkQueue<WorkItem>::ThreadCounter::~ThreadCounter() [with WorkItem = HTTPClosure]:
    388httpserver.cpp:120:34:   required from void WorkQueue<WorkItem>::Run() [with WorkItem = HTTPClosure]
    389httpserver.cpp:356:16:   required from here
    390httpserver.cpp:88:51: error: class WorkQueue<HTTPClosure> has no member named cs
    391             std::lock_guard<std::mutex> lock(wq.cs);
    392                                                   ^
    393httpserver.cpp:90:13: error: class WorkQueue<HTTPClosure> has no member named cond
    394             wq.cond.notify_all();
    395             ^
    396Makefile:5033: recipe for target 'libbitcoin_server_a-httpserver.o' failed
    397make[2]: *** [libbitcoin_server_a-httpserver.o] Error 1
    398make[2]: *** Waiting for unfinished jobs....
    399  CCLD     libsecp256k1.la
    400libtool: link: warning: undefined symbols not allowed in x86_64-w64-mingw32 shared libraries
    401/usr/bin/x86_64-w64-mingw32-ar: `u' modifier ignored since `D' is the default (see `U')
    402make[3]: Leaving directory '/home/nicolasdorier/bitcoin/src/secp256k1'
    403make[2]: Leaving directory '/home/nicolasdorier/bitcoin/src'
    404Makefile:8349: recipe for target 'all-recursive' failed
    405make[1]: *** [all-recursive] Error 1
    406make[1]: Leaving directory '/home/nicolasdorier/bitcoin/src'
    407Makefile:677: recipe for target 'all-recursive' failed
    408make: *** [all-recursive] Error 1
    
  2. achow101 commented at 3:03 pm on August 14, 2016: member

    I’ve got the same error. The discussion we had on IRC said that it might have something to do with c++11.

    On 8/14/2016 4:06 AM, Nicolas Dorier wrote:

    I used git clean -dfx, rebuilt depends, still getting it:

    |CXX libbitcoin_server_a-pow.o CXX libbitcoin_server_a-rest.o CXX rpc/libbitcoin_server_a-blockchain.o gcc gen_context.o -o gen_context ./gen_context CC src/libsecp256k1_la-secp256k1.lo httpserver.cpp:69:10: error: ‘mutex’ in namespace ‘std’ does not name a type std::mutex cs; ^ httpserver.cpp:70:10: error: ‘condition_variable’ in namespace ‘std’ does not name a type std::condition_variable cond; ^ httpserver.cpp: In constructor ‘WorkQueue::ThreadCounter::ThreadCounter(WorkQueue&)’: httpserver.cpp:83:29: error: ‘mutex’ is not a member of ‘std’ std::lock_guardstd::mutex lock(wq.cs); ^ httpserver.cpp:83:29: note: suggested alternatives: In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14, from sync.h:11, from httpserver.cpp:12: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note: ‘boost::mutex’ class mutex: ^ In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31, from util.h:29, from httpserver.cpp:9: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note: ‘boost::signals2::mutex’ class mutex ^ httpserver.cpp:83:29: error: ‘mutex’ is not a member of ‘std’ std::lock_guardstd::mutex lock(wq.cs); ^ httpserver.cpp:83:29: note: suggested alternatives: In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14, from sync.h:11, from httpserver.cpp:12: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note: ‘boost::mutex’ class mutex: ^ In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31, from util.h:29, from httpserver.cpp:9: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note: ‘boost::signals2::mutex’ class mutex ^ httpserver.cpp:83:39: error: template argument 1 is invalid std::lock_guardstd::mutex lock(wq.cs); ^ httpserver.cpp:83:45: error: invalid type in declaration before ‘(’ token std::lock_guardstd::mutex lock(wq.cs); ^ httpserver.cpp: In destructor ‘WorkQueue::ThreadCounter::~ThreadCounter()’: httpserver.cpp:88:29: error: ‘mutex’ is not a member of ‘std’ std::lock_guardstd::mutex lock(wq.cs); ^ httpserver.cpp:88:29: note: suggested alternatives: In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14, from sync.h:11, from httpserver.cpp:12: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note: ‘boost::mutex’ class mutex: ^ In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31, from util.h:29, from httpserver.cpp:9: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note: ‘boost::signals2::mutex’ class mutex ^ httpserver.cpp:88:29: error: ‘mutex’ is not a member of ‘std’ std::lock_guardstd::mutex lock(wq.cs); ^ httpserver.cpp:88:29: note: suggested alternatives: In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14, from sync.h:11, from httpserver.cpp:12: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note: ‘boost::mutex’ class mutex: ^ In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31, from util.h:29, from httpserver.cpp:9: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note: ‘boost::signals2::mutex’ class mutex ^ httpserver.cpp:88:39: error: template argument 1 is invalid std::lock_guardstd::mutex lock(wq.cs); ^ httpserver.cpp:88:45: error: invalid type in declaration before ‘(’ token std::lock_guardstd::mutex lock(wq.cs); ^ httpserver.cpp: In member function ‘bool WorkQueue::Enqueue(WorkItem_)’: httpserver.cpp:109:26: error: ‘mutex’ is not a member of ‘std’ std::unique_lockstd::mutex lock(cs); ^ httpserver.cpp:109:26: note: suggested alternatives: In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14, from sync.h:11, from httpserver.cpp:12: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note: ‘boost::mutex’ class mutex: ^ In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31, from util.h:29, from httpserver.cpp:9: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note: ‘boost::signals2::mutex’ class mutex ^ httpserver.cpp:109:26: error: ‘mutex’ is not a member of ‘std’ std::unique_lockstd::mutex lock(cs); ^ httpserver.cpp:109:26: note: suggested alternatives: In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14, from sync.h:11, from httpserver.cpp:12: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note: ‘boost::mutex’ class mutex: ^ In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31, from util.h:29, from httpserver.cpp:9: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note: ‘boost::signals2::mutex’ class mutex ^ httpserver.cpp:109:36: error: template argument 1 is invalid std::unique_lockstd::mutex lock(cs); ^ httpserver.cpp:109:42: error: invalid type in declaration before ‘(’ token std::unique_lockstd::mutex lock(cs); ^ httpserver.cpp:109:43: error: ‘cs’ was not declared in this scope std::unique_lockstd::mutex lock(cs); ^ httpserver.cpp:114:9: error: ‘cond’ was not declared in this scope cond.notify_one(); ^ httpserver.cpp: In member function ‘void WorkQueue::Run()’: httpserver.cpp:124:34: error: ‘mutex’ is not a member of ‘std’ std::unique_lockstd::mutex lock(cs); ^ httpserver.cpp:124:34: note: suggested alternatives: In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14, from sync.h:11, from httpserver.cpp:12: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note: ‘boost::mutex’ class mutex: ^ In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31, from util.h:29, from httpserver.cpp:9: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note: ‘boost::signals2::mutex’ class mutex ^ httpserver.cpp:124:34: error: ‘mutex’ is not a member of ‘std’ std::unique_lockstd::mutex lock(cs); ^ httpserver.cpp:124:34: note: suggested alternatives: In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14, from sync.h:11, from httpserver.cpp:12: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note: ‘boost::mutex’ class mutex: ^ In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31, from util.h:29, from httpserver.cpp:9: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note: ‘boost::signals2::mutex’ class mutex ^ httpserver.cpp:124:44: error: template argument 1 is invalid std::unique_lockstd::mutex lock(cs); ^ httpserver.cpp:124:50: error: invalid type in declaration before ‘(’ token std::unique_lockstd::mutex lock(cs); ^ httpserver.cpp:124:51: error: ‘cs’ was not declared in this scope std::unique_lockstd::mutex lock(cs); ^ httpserver.cpp:126:21: error: ‘cond’ was not declared in this scope cond.wait(lock); ^ httpserver.cpp: In member function ‘void WorkQueue::Interrupt()’: httpserver.cpp:138:26: error: ‘mutex’ is not a member of ‘std’ std::unique_lockstd::mutex lock(cs); ^ httpserver.cpp:138:26: note: suggested alternatives: In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14, from sync.h:11, from httpserver.cpp:12: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note: ‘boost::mutex’ class mutex: ^ In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31, from util.h:29, from httpserver.cpp:9: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note: ‘boost::signals2::mutex’ class mutex ^ httpserver.cpp:138:26: error: ‘mutex’ is not a member of ‘std’ std::unique_lockstd::mutex lock(cs); ^ httpserver.cpp:138:26: note: suggested alternatives: In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14, from sync.h:11, from httpserver.cpp:12: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note: ‘boost::mutex’ class mutex: ^ In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31, from util.h:29, from httpserver.cpp:9: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note: ‘boost::signals2::mutex’ class mutex ^ httpserver.cpp:138:36: error: template argument 1 is invalid std::unique_lockstd::mutex lock(cs); ^ httpserver.cpp:138:42: error: invalid type in declaration before ‘(’ token std::unique_lockstd::mutex lock(cs); ^ httpserver.cpp:138:43: error: ‘cs’ was not declared in this scope std::unique_lockstd::mutex lock(cs); ^ httpserver.cpp:140:9: error: ‘cond’ was not declared in this scope cond.notify_all(); ^ httpserver.cpp: In member function ‘void WorkQueue::WaitExit()’: httpserver.cpp:145:26: error: ‘mutex’ is not a member of ‘std’ std::unique_lockstd::mutex lock(cs); ^ httpserver.cpp:145:26: note: suggested alternatives: In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14, from sync.h:11, from httpserver.cpp:12: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note: ‘boost::mutex’ class mutex: ^ In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31, from util.h:29, from httpserver.cpp:9: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note: ‘boost::signals2::mutex’ class mutex ^ httpserver.cpp:145:26: error: ‘mutex’ is not a member of ‘std’ std::unique_lockstd::mutex lock(cs); ^ httpserver.cpp:145:26: note: suggested alternatives: In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14, from sync.h:11, from httpserver.cpp:12: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note: ‘boost::mutex’ class mutex: ^ In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31, from util.h:29, from httpserver.cpp:9: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note: ‘boost::signals2::mutex’ class mutex ^ httpserver.cpp:145:36: error: template argument 1 is invalid std::unique_lockstd::mutex lock(cs); ^ httpserver.cpp:145:42: error: invalid type in declaration before ‘(’ token std::unique_lockstd::mutex lock(cs); ^ httpserver.cpp:145:43: error: ‘cs’ was not declared in this scope std::unique_lockstd::mutex lock(cs); ^ httpserver.cpp:147:13: error: ‘cond’ was not declared in this scope cond.wait(lock); ^ httpserver.cpp: In member function ‘size_t WorkQueue::Depth()’: httpserver.cpp:153:26: error: ‘mutex’ is not a member of ‘std’ std::unique_lockstd::mutex lock(cs); ^ httpserver.cpp:153:26: note: suggested alternatives: In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14, from sync.h:11, from httpserver.cpp:12: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note: ‘boost::mutex’ class mutex: ^ In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31, from util.h:29, from httpserver.cpp:9: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note: ‘boost::signals2::mutex’ class mutex ^ httpserver.cpp:153:26: error: ‘mutex’ is not a member of ‘std’ std::unique_lockstd::mutex lock(cs); ^ httpserver.cpp:153:26: note: suggested alternatives: In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/mutex.hpp:14:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:17, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14, from sync.h:11, from httpserver.cpp:12: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/mutex.hpp:25:11: note: ‘boost::mutex’ class mutex: ^ In file included from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/mutex.hpp:32:0, from /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/signal.hpp:31, from util.h:29, from httpserver.cpp:9: /home/nicolasdorier/bitcoin/depends/x86_64-w64-mingw32/share/../include/boost/signals2/detail/lwm_win32_cs.hpp:68:7: note: ‘boost::signals2::mutex’ class mutex ^ httpserver.cpp:153:36: error: template argument 1 is invalid std::unique_lockstd::mutex lock(cs); ^ httpserver.cpp:153:42: error: invalid type in declaration before ‘(’ token std::unique_lockstd::mutex lock(cs); ^ httpserver.cpp:153:43: error: ‘cs’ was not declared in this scope std::unique_lockstd::mutex lock(cs); ^ httpserver.cpp: At global scope: httpserver.cpp:439:6: error: ‘thread’ in namespace ‘std’ does not name a type std::thread threadHTTP; ^ httpserver.cpp:440:19: error: aggregate ‘std::future threadResult’ has incomplete type and cannot be defined std::future threadResult; ^ httpserver.cpp: In function ‘bool StartHTTPServer()’: httpserver.cpp:447:67: error: variable ‘std::packaged_task<bool(event_base_, evhttp_)> task’ has initializer but incomplete type std::packaged_task<bool(event_base_, evhttp_)> task(ThreadHTTP); ^ httpserver.cpp:449:5: error: ‘threadHTTP’ was not declared in this scope threadHTTP = std::thread(std::move(task), eventBase, eventHTTP); ^ httpserver.cpp:449:18: error: ‘thread’ is not a member of ‘std’ threadHTTP = std::thread(std::move(task), eventBase, eventHTTP); ^ httpserver.cpp:452:9: error: ‘thread’ is not a member of ‘std’ std::thread rpc_worker(HTTPWorkQueueRun, workQueue); ^ httpserver.cpp:453:9: error: ‘rpc_worker’ was not declared in this scope rpc_worker.detach(); ^ httpserver.cpp: In function ‘void StopHTTPServer()’: httpserver.cpp:493:9: error: ‘threadHTTP’ was not declared in this scope threadHTTP.join(); ^ httpserver.cpp: In instantiation of ‘WorkQueue::ThreadCounter::ThreadCounter(WorkQueue&) [with WorkItem = HTTPClosure]’: httpserver.cpp:120:34: required from ‘void WorkQueue::Run() [with WorkItem = HTTPClosure]’ httpserver.cpp:356:16: required from here httpserver.cpp:83:51: error: ‘class WorkQueue’ has no member named ‘cs’ std::lock_guardstd::mutex lock(wq.cs); ^ httpserver.cpp: In instantiation of ‘WorkQueue::ThreadCounter::~ThreadCounter() [with WorkItem = HTTPClosure]’: httpserver.cpp:120:34: required from ‘void WorkQueue::Run() [with WorkItem = HTTPClosure]’ httpserver.cpp:356:16: required from here httpserver.cpp:88:51: error: ‘class WorkQueue’ has no member named ‘cs’ std::lock_guardstd::mutex lock(wq.cs); ^ httpserver.cpp:90:13: error: ‘class WorkQueue’ has no member named ‘cond’ wq.cond.notify_all(); ^ Makefile:5033: recipe for target ’libbitcoin_server_a-httpserver.o’ failed make[2]: _ [libbitcoin_server_a-httpserver.o] Error 1 make[2]: *** Waiting for unfinished jobs…. CCLD libsecp256k1.la libtool: link: warning: undefined symbols not allowed in x86_64-w64-mingw32 shared libraries /usr/bin/x86_64-w64-mingw32-ar: u' modifier ignored sinceD’ is the default (see `U’) make[3]: Leaving directory ‘/home/nicolasdorier/bitcoin/src/secp256k1’ make[2]: Leaving directory ‘/home/nicolasdorier/bitcoin/src’ Makefile:8349: recipe for target ‘all-recursive’ failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory ‘/home/nicolasdorier/bitcoin/src’ Makefile:677: recipe for target ‘all-recursive’ failed make: *** [all-recursive] Error 1 |

    — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub #8511, or mute the thread https://github.com/notifications/unsubscribe-auth/ADm2gq9ef9AoB09zEUPS-Eku7TTTCL56ks5qfsx0gaJpZM4Jj2Qm.

  3. theuni commented at 6:25 pm on August 14, 2016: member

    Looks like it’s just missing includes. Try adding:

    #include #include <condition_variable>

  4. NicolasDorier commented at 1:11 am on August 15, 2016: contributor
    @theuni strange, it does not help. Same issue.
  5. jonasschnelli added the label Windows on Aug 15, 2016
  6. jonasschnelli added the label Build system on Aug 15, 2016
  7. wbchen99 commented at 4:34 pm on September 4, 2016: none
    any update for this issue?
  8. sstone commented at 5:17 pm on September 4, 2016: contributor
    Does #8653 fix it for you ?
  9. wbchen99 commented at 2:48 am on September 5, 2016: none

    Thanks for reply. When I did: sudo update-alternatives –config x86_64-w64-mingw32-gcc

    It seems missing " x86_64-w64-mingw32-gcc files /usr/bin/x86_64-w64-mingw32-gcc-5-posix "

    How to install posix version of x86_64-w64-mingw32-gcc on ubuntu?

  10. sstone commented at 9:09 am on September 5, 2016: contributor

    Which version are you on ? On Ubuntu 16.04 you just need to install the toolchain:

    0sudo apt-get install g++-mingw-w64-i686 mingw-w64-i686-dev g++-mingw-w64-x86-64 mingw-w64-x86-64-dev
    
  11. wbchen99 commented at 12:21 pm on September 5, 2016: none

    sudo update-alternatives –config x86_64-w64-mingw32-gcc

    Press to keep the current choice[*], or type selection number: 1 update-alternatives: using /usr/bin/x86_64-w64-mingw32-gcc-posix to provide /usr/bin/x86_64-w64-mingw32-gcc (x86_64-w64-mingw32-gcc) in manual mode update-alternatives: warning: skip creation of /usr/bin/x86_64-w64-mingw32-gcc-5 because associated file /usr/bin/x86_64-w64-mingw32-gcc-5-posix (of link group x86_64-w64-mingw32-gcc) doesn’t exist

    I got this warning message! How to fit it?

  12. NicolasDorier commented at 5:55 am on September 6, 2016: contributor
    On my side I did not tried again since I posted this error. It is very problematic because most of my tests are done on windows, but get busy on other stuff those last days. I’ll test again later.
  13. sipa commented at 8:08 am on September 6, 2016: member
    You’ll need version 4.7 or later of mingw/gcc at least for those definitions. Which version are you using?
  14. NicolasDorier commented at 9:02 am on September 6, 2016: contributor
    @sstone you are the man, #8653 fixed my issue.
  15. NicolasDorier closed this on Sep 6, 2016

  16. wbchen99 commented at 5:40 am on September 8, 2016: none

    $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v –with-pkgversion=‘Ubuntu 5.4.0-6ubuntu116.04.2’ –with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs –enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ –prefix=/usr –program-suffix=-5 –enable-shared –enable-linker-build-id –libexecdir=/usr/lib –without-included-gettext –enable-threads=posix –libdir=/usr/lib –enable-nls –with-sysroot=/ –enable-clocale=gnu –enable-libstdcxx-debug –enable-libstdcxx-time=yes –with-default-libstdcxx-abi=new –enable-gnu-unique-object –disable-vtable-verify –enable-libmpx –enable-plugin –with-system-zlib –disable-browser-plugin –enable-java-awt=gtk –enable-gtk-cairo –with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre –enable-java-home –with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 –with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 –with-arch-directory=amd64 –with-ecj-jar=/usr/share/java/eclipse-ecj.jar –enable-objc-gc –enable-multiarch –disable-werror –with-arch-32=i686 –with-abi=m64 –with-multilib-list=m32,m64,mx32 –enable-multilib –with-tune=generic –enable-checking=release –build=x86_64-linux-gnu –host=x86_64-linux-gnu –target=x86_64-linux-gnu Thread model: posix gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu116.04.2)

    That is the version of gcc

  17. sstone commented at 5:48 pm on September 9, 2016: contributor
    @wbchen99 this is just a warning, you should be able to select the posix compilers and cross-build bitcoind.exe and bitcoint-qt.exe. Does it work ? If it does, did you test the compiled binaries ?
  18. wbchen99 commented at 12:19 pm on September 19, 2016: none
    @sstone Sorry for late reply. I still met same problem. I tried previous version of “depends” directory and it worked fine for bitcoin 12.99. Same environments , gcc, g++ and libs. Not sure for these? Could you help?
  19. laanwj commented at 1:47 pm on September 19, 2016: member
    There are multiple serious issues with bitcoin core and newer mingw compilers, see #8653. For now the only recommendation I can make is to use an Ubuntu Trusty VM for building as is used for gitian and travis.
  20. TheKogs commented at 3:40 pm on March 20, 2018: none

    Sorry to bring that old topic back up, but is there maybe already a solution for this?

    I have the same issue compiling the bitcoin client under Debian Stretch using mingw-w64.

    I’m using the default packages from Debian stretch repository. And I also tried to switch to posix version with

    0$ update-alternatives --config i686-w64-mingw32-gcc
    1$ update-alternatives --config x86_64-w64-mingw32-gcc
    

    but the error still happens after cleaning and building everything again.

    My environment

     0$ uname -a
     1Linux 4.9.0-3-amd64 [#1](/bitcoin-bitcoin/1/) SMP Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64 GNU/Linux
     2
     3$ gcc --version
     4gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
     5
     6$ dpkg-query -l | grep mingw
     7ii  binutils-mingw-w64-i686                2.28-5+7.4+b4                  amd64        Cross-binutils for Win32 (x86) using MinGW-w64
     8ii  binutils-mingw-w64-x86-64              2.28-5+7.4+b4                  amd64        Cross-binutils for Win64 (x64) using MinGW-w64
     9ii  g++-mingw-w64                          6.3.0-14+19.3                  all          GNU C++ compiler for MinGW-w64
    10ii  g++-mingw-w64-i686                     6.3.0-18+19.3+b3               amd64        GNU C++ compiler for MinGW-w64 targeting Win32
    11ii  g++-mingw-w64-x86-64                   6.3.0-18+19.3+b3               amd64        GNU C++ compiler for MinGW-w64 targeting Win64
    12ii  gcc-mingw-w64                          6.3.0-14+19.3                  all          GNU C compiler for MinGW-w64
    13ii  gcc-mingw-w64-base                     6.3.0-18+19.3+b3               amd64        GNU Compiler Collection for MinGW-w64 (base package)
    14ii  gcc-mingw-w64-i686                     6.3.0-18+19.3+b3               amd64        GNU C compiler for MinGW-w64 targeting Win32
    15ii  gcc-mingw-w64-x86-64                   6.3.0-18+19.3+b3               amd64        GNU C compiler for MinGW-w64 targeting Win64
    16ii  mingw-w64                              5.0.1-1                        all          Development environment targeting 32- and 64-bit Windows
    17ii  mingw-w64-common                       5.0.1-1                        all          Common files for Mingw-w64
    18ii  mingw-w64-i686-dev                     5.0.1-1                        all          Development files for MinGW-w64 targeting Win32
    19ii  mingw-w64-x86-64-dev                   5.0.1-1                        all          Development files for MinGW-w64 targeting Win64
    
  21. TheKogs commented at 6:52 pm on March 20, 2018: none

    Solved the issue.

    Bitcoin uses g++, not gcc

    $ sudo update-alternatives --config x86_64-w64-mingw32-g++

    then select “2” for switching to posix and that’s it. Cleaning the environment or rebuilding dependencies were not necesseary.

  22. globaltoken commented at 1:41 pm on June 27, 2019: none

    I can confirm that

    sudo update-alternatives --config x86_64-w64-mingw32-g++

    solved it for me as well.

    I have GCC 5.3.1, and those are enabled:

    • 0 /usr/bin/x86_64-w64-mingw32-g++-win32 60 auto mode 1 /usr/bin/x86_64-w64-mingw32-g++-posix 30 manual mode 2 /usr/bin/x86_64-w64-mingw32-g++-win32 60 manual mode

    where 0 was selected. (win32). It seems not to use posix, so just select the g++-posix edition.

    After that it compiled successfully.

  23. DrahtBot locked this on Dec 16, 2021

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: 2024-12-22 21:12 UTC

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