Bitcoin Forum
May 04, 2024, 11:56:22 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 [16] 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 »
  Print  
Author Topic: Building headless Bitcoin and Bitcoin-qt on Windows  (Read 419326 times)
BitcoinTate
Full Member
***
Offline Offline

Activity: 224
Merit: 100


DigiByte Founder


View Profile
January 02, 2014, 12:45:03 AM
 #301

I am so close!

I am getting this error when I do the mingw32-make -f Makefile.Release.





I made all the changes to the files.


You need to apply the second half of the QT 5 patches. I split the patch into two files, 1 for the src/ files and one for the src/qt/ files.

Quote
Qt5 compatibility. #if QT_VERSION < 0x050000 ... in
src/qt/addressbookpage.cpp
src/qt/bitcoin.cpp
src/qt/bitcoingui.cpp
src/qt/guiutil.cpp
src/qt/paymentserver.cpp
src/qt/qrcodedialog.cpp
src/qt/rpcconsole.cpp
src/qt/sendcoinsdialog.cpp
src/qt/transactionview.cpp
src/qt/walletview.cpp
see: https://github.com/bitcoin/bitcoin/commit/25c0cce7fb494fcb871d134e28b26504d30e34d3
http://qt-project.org/doc/qt-5.0/qtdoc/sourcebreaks.html
http://qt-project.org/wiki/Transition_from_Qt_4.x_to_Qt5

Also see patch file at the end of this post.

- aka The "DigiMan"
1714866982
Hero Member
*
Offline Offline

Posts: 1714866982

View Profile Personal Message (Offline)

Ignore
1714866982
Reply with quote  #2

1714866982
Report to moderator
1714866982
Hero Member
*
Offline Offline

Posts: 1714866982

View Profile Personal Message (Offline)

Ignore
1714866982
Reply with quote  #2

1714866982
Report to moderator
1714866982
Hero Member
*
Offline Offline

Posts: 1714866982

View Profile Personal Message (Offline)

Ignore
1714866982
Reply with quote  #2

1714866982
Report to moderator
TalkImg was created especially for hosting images on bitcointalk.org: try it next time you want to post an image
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714866982
Hero Member
*
Offline Offline

Posts: 1714866982

View Profile Personal Message (Offline)

Ignore
1714866982
Reply with quote  #2

1714866982
Report to moderator
1714866982
Hero Member
*
Offline Offline

Posts: 1714866982

View Profile Personal Message (Offline)

Ignore
1714866982
Reply with quote  #2

1714866982
Report to moderator
1714866982
Hero Member
*
Offline Offline

Posts: 1714866982

View Profile Personal Message (Offline)

Ignore
1714866982
Reply with quote  #2

1714866982
Report to moderator
BitcoinTate
Full Member
***
Offline Offline

Activity: 224
Merit: 100


DigiByte Founder


View Profile
January 02, 2014, 03:27:12 AM
 #302

in coincontroldialog.cpp to make it work with qt 5.2
I mean the wallet works and all but pops out a lot of errors when trying to close it.

Same here, it was still syncing with the testnet when I replied.
Might be a good idea to file a bug report about it
I am having the same problem with litecoin as well. Have tried 8.6 and I am now trying several of the 8.5 versions.

- aka The "DigiMan"
Apocalipsis
Full Member
***
Offline Offline

Activity: 147
Merit: 100


View Profile
January 02, 2014, 07:31:08 AM
 #303

1)When I close Compiled altcoin-qt.exe,it crashes,and after debug in VS 2012, I see something like that:
cannot open pdb file



1)What can it be?
I don't see genesis block,and merkleroot in debug file in appdata/roaming/XXXcoin/debug.log
How Can I make it?

BitcoinTate
Full Member
***
Offline Offline

Activity: 224
Merit: 100


DigiByte Founder


View Profile
January 02, 2014, 10:35:36 AM
 #304

If i am not mistaken it appears the function to generate a new Genesis Block has been taken out of version 7 & 8.

- aka The "DigiMan"
CryptoMine
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
January 02, 2014, 12:31:59 PM
 #305

After closing the compiled Windows-QT it crashes and I get runtime error 'The application has requested the Runtime to terminate in an unusual way'

Checking Eventviewer on the crash I can see mini-crashes:

The Open Procedure for service "MSDTC" in DLL "C:\Windows\system32\msdtcuiu.DLL" failed. Performance data for this service will not be available. The first four bytes (DWORD) of the Data section contains the error code.

The Open Procedure for service "Lsa" in DLL "C:\Windows\System32\Secur32.dll" failed. Performance data for this service will not be available. The first four bytes (DWORD) of the Data section contains the error code.

The Open Procedure for service "ESENT" in DLL "C:\Windows\system32\esentprf.dll" failed. Performance data for this service will not be available. The first four bytes (DWORD) of the Data section contains the error code.

The Open Procedure for service "BITS" in DLL "C:\Windows\System32\bitsperf.dll" failed. Performance data for this service will not be available. The first four bytes (DWORD) of the Data section contains the error code.


Any ideas? I've been scratching my head for about 10 hours now Sad
BitcoinTate
Full Member
***
Offline Offline

Activity: 224
Merit: 100


DigiByte Founder


View Profile
January 02, 2014, 07:12:00 PM
 #306

After closing the compiled Windows-QT it crashes and I get runtime error 'The application has requested the Runtime to terminate in an unusual way'

Checking Eventviewer on the crash I can see mini-crashes:

The Open Procedure for service "MSDTC" in DLL "C:\Windows\system32\msdtcuiu.DLL" failed. Performance data for this service will not be available. The first four bytes (DWORD) of the Data section contains the error code.

The Open Procedure for service "Lsa" in DLL "C:\Windows\System32\Secur32.dll" failed. Performance data for this service will not be available. The first four bytes (DWORD) of the Data section contains the error code.

The Open Procedure for service "ESENT" in DLL "C:\Windows\system32\esentprf.dll" failed. Performance data for this service will not be available. The first four bytes (DWORD) of the Data section contains the error code.

The Open Procedure for service "BITS" in DLL "C:\Windows\System32\bitsperf.dll" failed. Performance data for this service will not be available. The first four bytes (DWORD) of the Data section contains the error code.


Any ideas? I've been scratching my head for about 10 hours now Sad
Is this for Litecoin? I am getting that error for the LTC wallet upon closing.

- aka The "DigiMan"
raistlinthewiz
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile WWW
January 02, 2014, 10:51:54 PM
Last edit: January 02, 2014, 11:15:11 PM by raistlinthewiz
 #307



The only problem now is when I close the wallet I get this:



having the exact same situation. managed to fix it? I'm also on litecoin 0.8.6.1
and it'll also be not sending coins Smiley

raistlinthewiz
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile WWW
January 02, 2014, 10:52:30 PM
Last edit: January 04, 2014, 12:31:33 AM by raistlinthewiz
 #308

anybody was able to run through gitian builds for windows?

LitecoinRates
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile WWW
January 04, 2014, 05:04:22 AM
 #309

Is anyone able to compile a Windows wallet for Nutcoin please?

https://github.com/dmx374/nutcoin
50cent_rapper
Legendary
*
Offline Offline

Activity: 1344
Merit: 1000



View Profile
January 04, 2014, 07:11:19 PM
 #310

Same problem with crashing on exit, like above.

 Huh Huh Huh
Sharrow
Member
**
Offline Offline

Activity: 66
Merit: 10


View Profile
January 04, 2014, 07:42:00 PM
Last edit: January 05, 2014, 06:38:54 PM by Sharrow
 #311

Code:
include" -o obj/rpcnet.o rpcnet.cpp
In file included from compat.h:17:0,
                 from netbase.h:11,
                 from net.h:19,
                 from rpcnet.cpp:5:
c:\mingw\include\ws2tcpip.h:38:2: error: #error "ws2tcpip.h is not compatible wi
th winsock.h. Include winsock2.h instead."
 #error "ws2tcpip.h is not compatible with winsock.h. Include winsock2.h instead
."
  ^
In file included from compat.h:17:0,
                 from netbase.h:11,
                 from net.h:19,
                 from rpcnet.cpp:5:
c:\mingw\include\ws2tcpip.h:147:8: error: redefinition of 'struct ip_mreq'
 struct ip_mreq {
        ^
In file included from c:\mingw\include\windows.h:93:0,
                 from c:/deps/openssl-1.0.1e/include/openssl/rand.h:67,
                 from net.h:11,
                 from rpcnet.cpp:5:
c:\mingw\include\winsock.h:315:8: error: previous definition of 'struct ip_mreq'

 struct ip_mreq {
        ^
In file included from compat.h:17:0,
                 from netbase.h:11,
                 from net.h:19,
                 from rpcnet.cpp:5:
c:\mingw\include\ws2tcpip.h:390:13: error: expected initializer before 'freeaddr
info'
 void WSAAPI freeaddrinfo (struct addrinfo*);
             ^
c:\mingw\include\ws2tcpip.h:391:12: error: expected initializer before 'getaddri
nfo'
 int WSAAPI getaddrinfo (const char*,const char*,const struct addrinfo*,
            ^
c:\mingw\include\ws2tcpip.h:393:12: error: expected initializer before 'getnamei
nfo'
 int WSAAPI getnameinfo(const struct sockaddr*,socklen_t,char*,DWORD,
            ^
makefile.mingw:124: recipe for target 'obj/rpcnet.o' failed
mingw32-make: *** [obj/rpcnet.o] Error 1

C:\currencies\bitcoin-0.8.6\src>

The above wall of text appears every time it comes to compiling bitcoind (at part 3.3) when using mingw32-make -f makefile.mingw

Has anybody come across this issue or have any idea how it can be resolved? I've followed the tutorial to the letter and spent ages googleing various parts of the long list of errors, but can't find a solution. Any help would be greatly appreciated.

**EDIT**

It is working now. Went back to square one and removed all of the minGW stuff and everything that was unpacked in the depenencies folder.

If there was an issue, I suspect I hadn't done the config right the first time at part 2.4.

The tutorial is absolutely brilliant but misses a minor step, which tripped me up. At step 2.4, it ideally should say after "after renaming 'miniupnpc-1.8" to "miniupnpc':

Code:
cd C:\deps\miniupnpc
mingw32-make -f Makefile.mingw init upnpc-static

widewave
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
January 05, 2014, 10:51:58 AM
Last edit: January 05, 2014, 12:24:59 PM by widewave
 #312

Following your tips, I've compiled BITCOIN0.8.6 on windows with qt 4.8.5(release version).
But the program 'bitcoin-qt' crash when run.
raistlinthewiz
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile WWW
January 05, 2014, 11:58:17 PM
Last edit: January 06, 2014, 01:02:38 AM by raistlinthewiz
 #313


2.3 Boost: http://sourceforge.net/projects/boost/files/boost/1.55.0/
Unpack boost inside your C:\deps folder, then bootstrap and compile from a Windows command prompt:
Code:
cd C:\deps\boost_1_55_0\
bootstrap.bat mingw
b2 --build-type=complete --with-chrono --with-filesystem --with-program_options --with-system --with-thread toolset=gcc stage

bootstrap.bat mingw is broken for boost 1_55.

fix: https://groups.google.com/d/msg/boost-developers-archive/hVNKGbZcXs0/fIh-iK-DVOMJ

Quote
Adding an empty!! new line in

$BOOSTDIR/tools/build/v2/engine/build.bat

in line 93 right before:
:Guess_Toolset

and here is precompiled qt-5.2: http://www.nic.funet.fi/pub/mirrors/download.qt-project.org/official_releases/qt/5.2/5.2.0/qt-windows-opensource-5.2.0-mingw48_opengl-x86-offline.exe

nondescriptmale
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
January 06, 2014, 01:52:18 AM
 #314

My God...it...it works!!  Built correctly the first time and is now running and synchronizing with the network (196 weeks behind at time I write this).

Much thanks to the OP for this build guide!

Next step is to learn the development tools for working with Linux code and build system on a Windows 7 machine.  I've been a MS Visual Studio monkey for most of my life so I have some learning to do.
Bram
Newbie
*
Offline Offline

Activity: 41
Merit: 0


View Profile
January 06, 2014, 02:20:22 AM
 #315

I installed an compiled Bitcoin-qt after about a week and it works fine.

I tried to follow the direction to build the foocoin/barcoin QT but I keep getting this error:

src/util.h: At global scope:
src/util.h:555:16: error: conflicting declaration 'typedef void* pthread_t'
 typedef HANDLE pthread_t;


any idea how to fix this?


gsc
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile WWW
January 06, 2014, 08:41:40 AM
 #316

After closing the compiled Windows-QT it crashes and I get runtime error 'The application has requested the Runtime to terminate in an unusual way'

Checking Eventviewer on the crash I can see mini-crashes:

The Open Procedure for service "MSDTC" in DLL "C:\Windows\system32\msdtcuiu.DLL" failed. Performance data for this service will not be available. The first four bytes (DWORD) of the Data section contains the error code.

The Open Procedure for service "Lsa" in DLL "C:\Windows\System32\Secur32.dll" failed. Performance data for this service will not be available. The first four bytes (DWORD) of the Data section contains the error code.

The Open Procedure for service "ESENT" in DLL "C:\Windows\system32\esentprf.dll" failed. Performance data for this service will not be available. The first four bytes (DWORD) of the Data section contains the error code.

The Open Procedure for service "BITS" in DLL "C:\Windows\System32\bitsperf.dll" failed. Performance data for this service will not be available. The first four bytes (DWORD) of the Data section contains the error code.


Any ideas? I've been scratching my head for about 10 hours now Sad
Is this for Litecoin? I am getting that error for the LTC wallet upon closing.

Maybe the windows problem? I donate 1000 GSC for fix.
nitrogenetics (OP)
Full Member
***
Offline Offline

Activity: 131
Merit: 108



View Profile
January 06, 2014, 01:18:32 PM
 #317


I've seen that also, however I couldn't reproduce the problem (it just worked like the previous versions did).
Did you need the workaround to compile boost? If so what are your system specs?

BTC: 1NWQ4TarCCC7j1XY26KRFFEtLYbPP6S3DH
XRP: rJkbeyRaUYDmcukEyLYVfn56QDM9VhybZG
nitrogenetics (OP)
Full Member
***
Offline Offline

Activity: 131
Merit: 108



View Profile
January 06, 2014, 03:42:39 PM
 #318

I installed an compiled Bitcoin-qt after about a week and it works fine.

I tried to follow the direction to build the foocoin/barcoin QT but I keep getting this error:

src/util.h: At global scope:
src/util.h:555:16: error: conflicting declaration 'typedef void* pthread_t'
 typedef HANDLE pthread_t;


any idea how to fix this?


See relevant patch here:
https://github.com/laanwj/bitcoin/commit/61d85071405b99c3734606eed31ea8f615c0c77a

BTC: 1NWQ4TarCCC7j1XY26KRFFEtLYbPP6S3DH
XRP: rJkbeyRaUYDmcukEyLYVfn56QDM9VhybZG
xslugx
Sr. Member
****
Offline Offline

Activity: 293
Merit: 250


View Profile
January 07, 2014, 03:00:39 AM
Last edit: January 07, 2014, 05:23:40 AM by xslugx
 #319

This is where I am stuck, all the other ./build\*.o files have no issues and are built correctly. Any thoughts

c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot fin
d ./build\irc.o
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot fin
d ./build\rpcnet.o
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot fin
d ./build\crypter.o
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot fin
d -lssl
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot fin
d -lcrypto
collect2.exe: error: ld returned 1 exit status < SOLVED - new issue below



so this is a new issue I have not seen yet ./build\main.o:main.cpp:(.text+0x20f4): undefined reference to `vnThreadsRunning
'
./build\main.o:main.cpp:(.text+0xaf6e): undefined reference to `fClient'
./build\main.o:main.cpp:(.text+0xeb70): undefined reference to `fClient'
./build\main.o:main.cpp:(.text+0x18d7b): undefined reference to `vnThreadsRunnin
g'
./build\main.o:main.cpp:(.text+0x18ded): undefined reference to `vnThreadsRunnin
g'
./build\main.o:main.cpp:(.text+0x1913a): undefined reference to `vnThreadsRunnin
g'
./build\main.o:main.cpp:(.text+0x19145): undefined reference to `vnThreadsRunnin
g'
./build\main.o:main.cpp:(.text+0x1914d): undefined reference to `vnThreadsRunnin
g'
./build\main.o:main.cpp:(.text+0x1919d): more undefined references to `vnThreads
Running' follow
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: ./build\ma
in.o: bad reloc address 0x2 in section `.text$_ZN5boost6detail17sp_counted_impl_
pINS_8signals26detail12signal2_implIvRK7uint25610ChangeTypeNS2_19optional_last_ v
alueIvEEiSt4lessIiENS_8functionIFvS7_S8_EEENSD_IFvRKNS2_10connectionES7_S8_EEEN S
2_5mutexEE16invocation_stateEED1Ev[__ZN5boost6detail17sp_counted_impl_pINS_8sign
als26detail12signal2_implIvRK7uint25610ChangeTypeNS2_19optional_last_valueIvEEi S
t4lessIiENS_8functionIFvS7_S8_EEENSD_IFvRKNS2_10connectionES7_S8_EEENS2_5mutexE E
16invocation_stateEED1Ev]

old c coder
Sr. Member
****
Offline Offline

Activity: 260
Merit: 250



View Profile WWW
January 07, 2014, 07:34:12 PM
 #320

My God...it...it works!!  Built correctly the first time and is now running and synchronizing with the network (196 weeks behind at time I write this).

Much thanks to the OP for this build guide!

Next step is to learn the development tools for working with Linux code and build system on a Windows 7 machine.  I've been a MS Visual Studio monkey for most of my life so I have some learning to do.
Hello nondescriptmale,

From one to another Smiley

See message #230 here in this forum, this link:
https://bitcointalk.org/index.php?topic=149479.msg3915582#msg3915582
will get you to page 12, but #230 is in there.

I too have no trouble building a gcc version of bitcoind and bitcoin-qt on windows. But then again, if you've read my previous posts, I tend to stay with what works, that is the versions of gcc (no longer available, or hard to find), Boost, and Qt that were available last spring and summer.

My goal is to run bitcoind.exe as a MSVC++ build, Release and Debug, statically linked (/MT and /MTd). All is well, except for a couple of items.

As an update to everyone else who might be interested:

1. Static libraries for Boost, OpenSSL, BerkeleyDB and levelDB (1.13) are easy to make, when you know how! I am speaking of MSVC++ .lib static libraries, not gcc static libraries, though there isn't that much difference except in the ABIs.

I am thinking of making some short videos,  u-toob style on the libraries, since the text seems so inappropriate when just showing what to click in the IDE, and why, is much easier.

2. levelDB 1.13 appears to remove .sst files from its LRU cache when the DBImpl::Get(...) is called, but the rest of levelDB isn't notified! I commented out the lines near the end of the DBImpl::Get(), that look like this in db_impl.cc:
 
Code:
#ifdef _MSC_VER
#else
    if (have_stat_update && current->UpdateStats(stats))
    {
        MaybeScheduleCompaction();    // killed here
    }
#endif
and now I can finally do a startup VerifyDB() at level 3 and above.

3. MSVC++ is basically C++2003 with P.J. Plauger's Dinkumware libraries, see:
http://www.tech-archive.net/Archive/VC/microsoft.public.vc.stl/2005-10/msg00030.html
So with a little jiggery pokery and an application of
Code:
#ifdef _MSC_VER
     #define _HAS_STRICT_CONFORMANCE 0
 #endif
I am able to compile and run a Debug version of bitcoind.exe, stand-alone no dlls

4. The release compile of the identical code, emits a mystical:
Code:
 Microsoft Visual Studio 8\VC\include\xtree(1174) : error C3848: 
        expression having type 'const CBlockIndexWorkComparator'
        would lose some const-volatile qualifiers in order to call
        'bool CBlockIndexWorkComparator::operator ()(CBlockIndex *,CBlockIndex *)'
upon noticing that the (global) set in main.cpp
Code:
set<CBlockIndex*, CBlockIndexWorkComparator> setBlockIndexValid; 
invokes its erase method,
Code:
setBlockIndexValid.erase(pindex)
in the function
Code:
InvalidBlockFound(CBlockIndex *pindex){...}
and
Code:
setBlockIndexValid.erase(pindexFailed
in the function
Code:
ConnectBestBlock(CValidationState &state) {...}
If I comment out those two lines, the Release build compiles!?

I have tried various combinations of
Code:
#define _HAS_IMMUTABLE_SETS 0
and other such to no avail.

If anyone can shed some C++ light on sets, .erase, etc. I might be able to get a screaming fast bitcoind.exe going. I say that because the Debug version seems as fast as the gcc version?

It is really instructive to see where the C++ code goes, live in real time, in the IDE, when a function or method is called with complicated arguments, and which overloaded operator is invoked with certain assignments!

Also, for all you gcc-ers, there is an awful lot of implicit casting being done! At least MSVC++ thinks so.

BTW, all you *coin lurkers, if you've snagged the bitcoin sources pre levelDB, which it seems quite few have, you can do this to your sources too and have nice alternative windows versions! I only say this since I "honed" my static library building skills "making" one of those *coins Roll Eyes since there was so little interest here, when I first posted those screens. But I'm back here now. Sometimes it isn't the best technology that prevails, but the one with the nicest implementation or the most advertising! Think of Beta-Max vs VHS, Windows vs OS2, etc.

That is why I'm trying to offer an alternative build platform for Windows. The bitcoin source is the same. Not changed at all. Except with changes as above. It should (famous last words) be easier to pretty up a windows version in MSVC than in Qt. At least it seems so to me at this time. Qt is fine but it seems to have a lot of compatibility issues with its compiler, its libraries, etc.

Think of how many more "desktops" one could attract. See
http://www.netmarketshare.com/operating-system-market-share.aspx?qprid=10&qpcustomd=0

I see that bitcoin has gone from levelDB 1.9(2011) (bitcoin 0.8.1, 0.8.2, 0.8.3) to levelDB 1.12 (biticoin 0.8.4 & 0.8.5) and levelDB 1.13 (bitcoin 0.8.6). Just wondering if there's any reason, since the levelDB "issues"
http://code.google.com/p/leveldb/issues/list
makes for interesting reading!

Ron


LTC: LUYiMVsrFQewUSPDasSKGzhyTPAkiTeSov BTC: 1DPvP6WoZzaNQ9Nxzd64hjYad1kyQzTTbx YAC: Y3ZggXDvnRJaRwtVGyGJwt6DMLN3EPQpQf 
The day is coming when a single carrot, freshly observed, will set off a revolution.  Paul Cezanne
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 [16] 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!