Greetings once again.
Yesterday I decided the pick the (somewhat daunting) task to compile Bitcoin from source. So, I grabbed my tools, downloaded all the dependencies with the versions indicated in the
build-msw.txt file,
used this thread as a reference for the trickier stuff (Only changing the versions for the dependencies where it was relevant), compiled them (Screw you, Boost) and then... nada. Here's the output:
C:\bitcoin-bitcoin-f8937b2\src>mingw32-make bitcoin.exe bitcoind.exe -f makefile
.mingw
g++ -c -mthreads -O2 -w -Wno-invalid-offsetof -Wformat -g -D__WXDEBUG__ -DWIN32
-D__WXMSW__ -D_WINDOWS -DNOPCH -DUSE_SSL -DBOOST_THREAD_USE_LIB -DSTATICLIB -DUS
E_UPNP=0 -I"C:\boost-1.47.0-mgw" -I"C:\db-4.8.30.NC-mgw\build_unix" -I"C:\openss
l-1.0.0d-mgw\include" -I"C:\wxWidgets-2.9.2-mgw\lib\gcc_lib\mswud" -I"C:\wxWidge
ts-2.9.2-mgw\include" -I"C:\miniupnpc-1.6-mgw" -DGUI -o obj/crypter.o crypter.cp
p
In file included from headers.h:94:0,
from crypter.cpp:9:
util.h:582:16: error: conflicting declaration 'typedef void* pthread_t'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/pthread.h:571:24: erro
r: 'pthread_t' has a previous declaration as 'typedef struct ptw32_handle_t pthr
ead_t'
util.h: In function 'pthread_t CreateThread(void (*)(void*), void*, bool)':
util.h:598:27: error: no matching function for call to 'ptw32_handle_t::ptw32_ha
ndle_t(int)'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/pthread.h:569:3: note:
candidates are: ptw32_handle_t::ptw32_handle_t()
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/pthread.h:569:3: note:
ptw32_handle_t::ptw32_handle_t(const ptw32_handle_t&)
util.h:603:28: error: no matching function for call to 'ptw32_handle_t::ptw32_ha
ndle_t(int)'
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/pthread.h:569:3: note:
candidates are: ptw32_handle_t::ptw32_handle_t()
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/pthread.h:569:3: note:
ptw32_handle_t::ptw32_handle_t(const ptw32_handle_t&)
util.h:605:12: error: conversion from 'void*' to non-scalar type 'pthread_t' req
uested
util.h: In function 'bool AffinityBugWorkaround(void (*)(void*))':
util.h:673:36: error: no match for 'operator!' in '!CreateThread(pfn, 0u, 0)'
util.h:673:36: note: candidate is: operator!(bool)
mingw32-make: *** [obj/crypter.o] Error 1
C:\bitcoin-bitcoin-f8937b2\src>
Also, here's my MinGW version info, provided
by this batch file, in case it becomes relevant.
MINGWBASEDIR=C:\MinGW
gcc version 4.5.2 (GCC)
gcc version 4.5.2 (GCC)
GNU gdb (GDB) 7.2
GNU ld (GNU Binutils) 2.21.1
GNU windres (GNU Binutils) 2.21.1
GNU dlltool (GNU Binutils) 2.21.1
GNU Make 3.82
#define __MINGW32_VERSION 3.18
#define __W32API_VERSION 3.17
This is not the first time I've tried compiling something like this, but certainly it is the first I've tried to do so in Windows, and the first time I've tried with a project this big, so I know I was asking for trouble.
From the output, the first I thought about (Given the declaration conflict) was that the headers were being added in the wrong order, but I tinkered a bit with that, no dice. Any more ideas?
Thanks in advance!