Bitcoin Forum
June 26, 2024, 04:22:55 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 419327 times)
old c coder
Sr. Member
****
Offline Offline

Activity: 260
Merit: 250



View Profile WWW
May 16, 2014, 02:56:39 AM
 #621

Hello all,

Here is a live pix worth 1K words.

There is a lot in there.

Notice the 5 transactions hi-lighted in color on blockchain.info and hi-lighted on the running MSVC++ bitcoind.exe.  Also the ~117MB being used by bitcoind.exe according to procexp.exe.  Another bitcoind.exe just RPC quizzed the MSVC++ version for getblockcount, actually getblockcountt.  I added a command to give the block number and its blocktime so I could see easily how the "catch-up" was going. And on the right is MSVC++ Express having just compiled 3 of the files and linked them in 1:52 (1 minute and 52 seconds) to produce the program that is running.  I just commented (//) out a few printf()s to quiet the printtoconsole output a little so that I could capture the transactions as they go scrolling by.  If one looks closely one can see this forum open in another browser window in the background. Smiley

Ron
Hi all,

I couldn't wait any longer... Yes there are a few faux pas etc. but I think the ideas are clear.  Here is the video series on building bitcoind.exe and YACoind.exe using MSVS and C++ on windows:
https://www.youtube.com/playlist?list=PLFnWb0ttBBMLyUuniLp3PJ5Mn4tVUlliZ
there are 4 static library building videos, all short, and a two part finale  Smiley

Hope this helps those that are "gcc desperate"  Grin  I'm just offering an alternative to the current methods.  It passes the unit test too, BTW.

Ron


LTC: LUYiMVsrFQewUSPDasSKGzhyTPAkiTeSov BTC: 1DPvP6WoZzaNQ9Nxzd64hjYad1kyQzTTbx YAC: Y3ZggXDvnRJaRwtVGyGJwt6DMLN3EPQpQf 
The day is coming when a single carrot, freshly observed, will set off a revolution.  Paul Cezanne
old c coder
Sr. Member
****
Offline Offline

Activity: 260
Merit: 250



View Profile WWW
May 16, 2014, 03:08:01 AM
 #622

is it possible to expand your guide to include building the qt client?

Bitcoin-qt build instrunctions added Smiley

Hello nitrogenetics

Finally, after two months of studying and testing, on and off in spare moments, I have found what was keeping me from compiling bitcoin-qt on windows, for windows!

What I discovered was, was that in step 4.3 of your wonderful guide,
qmake "USE_UPNP=-" bitcoin-qt.pro
creates the Makefile.Release for the next step, and it makes an (at least one) error in doing it! What I found was that when the next step is run
mingw32-make -f Makefile.Release
the linker loader part (looking at Makefile.Release) at the end of the process, attempts to link
QtGui4  and QtCore4, which are .dll's in the bin directory, not the lib directory!

So I added a piece to the LIBS directive at line 18 of Makefile.Release:
it was
LIBS        =      -L"c:\Qt\4.8.4\lib" -lmingwthrd -lmingw32 -lqtmain build\bitcoin-qt_res.o D:/BTCversions/version_0_8_1/src/src/leveldb/libleveldb.a D:/BTCversions/version_0_8_1/src/src/leveldb/libmemenv.a -lshlwapi -LC:\boost_1_53_0\stage\lib -Lc:/db-4.8.30.NC/build_unix -Lc:/openssl-1.0.1e -lssl -lcrypto -ldb_cxx -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32 -lboost_system-mgw46-mt-sd-1_53 -lboost_filesystem-mgw46-mt-sd-1_53 -lboost_program_options-mgw46-mt-sd-1_53 -lboost_thread-mgw46-mt-sd-1_53 -lboost_chrono-mgw46-mt-sd-1_53 -lQtGui4 -lQtCore4

and it becomes
LIBS        =        -L"c:\Qt\4.8.4\bin" -L"c:\Qt\4.8.4\lib" -lmingwthrd -lmingw32 -lqtmain build\bitcoin-qt_res.o D:/BTCversions/version_0_8_1/src/src/leveldb/libleveldb.a D:/BTCversions/version_0_8_1/src/src/leveldb/libmemenv.a -lshlwapi -LC:\boost_1_53_0\stage\lib -Lc:/db-4.8.30.NC/build_unix -Lc:/openssl-1.0.1e -lssl -lcrypto -ldb_cxx -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32 -lboost_system-mgw46-mt-sd-1_53 -lboost_filesystem-mgw46-mt-sd-1_53 -lboost_program_options-mgw46-mt-sd-1_53 -lboost_thread-mgw46-mt-sd-1_53 -lboost_chrono-mgw46-mt-sd-1_53 -lQtGui4 -lQtCore4

Then it links, and bitcoin-qt.exe works so far, in the various tests I have given it.

Interestingly, the messages referred to that are emitted when qmake creates Makefile.Release from bitcoin-qt.pro suggest that it is turning uPnP back on and off and on, even with the flag saying no, off.  I think the QtGui4 & QtCore dlls are that uPnp part which somehow crept into the link from bitcoin-qt.pro

Perhaps the .pro file can be "fixed" but I think the problem may be more in the "less than robust" parser in qmake?

I am now off to giving the wallet.dat its own path, like bitcoin.conf can have. The only tricky code is at startup in AppInit2(), step 5, where the "Verifying wallet integrity..." code is, covering -salvagewallet and bitdb.Verify(...)

But I don't think it is too difficult.

I think there is a boatload of good programmers out there that are on the windows platform, that can improve the UI of bitcoin-qt and the internals too, and make it so tempting that many more (non technical) people will jump on the Bitcoin bandwagon...

All windows VC6, VC++Express 2005, 2008, 2010, 2012 (all free IDE BTW) users, let's contribute.

Getting off soapbox now Lips sealed

Ron

If this is of any help, small fragments may be donated to my profile btc $, 1DPvP6WoZzaNQ9Nxzd64hjYad1kyQzTTbx, thereby rounding up your wallet  Wink

It was about a year ago... well there is now a MSVS bitcoind.exe

Ron


LTC: LUYiMVsrFQewUSPDasSKGzhyTPAkiTeSov BTC: 1DPvP6WoZzaNQ9Nxzd64hjYad1kyQzTTbx YAC: Y3ZggXDvnRJaRwtVGyGJwt6DMLN3EPQpQf 
The day is coming when a single carrot, freshly observed, will set off a revolution.  Paul Cezanne
Dimelord
Hero Member
*****
Offline Offline

Activity: 490
Merit: 500


View Profile
May 16, 2014, 12:50:20 PM
 #623

Im using qt5 creator and im getting this error.

build_config.mk no such file or directory

 Huh
YarkoL
Legendary
*
Offline Offline

Activity: 996
Merit: 1013


View Profile
May 16, 2014, 01:03:51 PM
Last edit: May 20, 2014, 08:37:47 AM by YarkoL
 #624


build_config.mk no such file or directory


If it's not in leveldb folder, you can just copy it from somewhere.
edit: check first that build_detect_platform is executable


“God does not play dice"
ellen.yan
Member
**
Offline Offline

Activity: 106
Merit: 10


View Profile
May 25, 2014, 12:40:28 PM
 #625

good thread..want to learn it...thanks!

horstman
Newbie
*
Offline Offline

Activity: 59
Merit: 0


View Profile
May 26, 2014, 07:04:05 PM
 #626

Hey guys,

i am trying to understand this. But i got stuck @ 1.3 "Ensure that mingw- builds bin folder is set in your PATH..

What i am suposted to but there in?

Is it inside the C:\MinGW\msys\1.0\etc fstab file?

What should i enter there?

I am unpacking the files to c:\deps    ,   c:\MinGW     ,    mingw32

Help would be very apreciated Smiley
regtable69
Hero Member
*****
Offline Offline

Activity: 588
Merit: 500


View Profile
May 27, 2014, 03:19:30 PM
 #627

Hi i have been struggling with compiling a windows qt for about a week now. tried everything iv found on google. corrupted my linux with gitian had to re install it a million times. is it possible to use this method with a clone of abccoin? I have changed the coin values and how it operates to suit my needs, compiled both xcoind and xcoin-qt in ubuntu and have had it running and mining but not been able to make a windows qt. i even tried in desperation to use the easywinbuild from bitcoin talk thread and that just crashed. with this i get to the gcc -v and nothing happens iv tried setting env paths with set c:/mingw/* \mingw\* and so on, understand that may be wrong but iv tried so much i cant remember exactly what i used but alass nothing worked lol. Im a total newbie when it comes to this. Il have a read through the last pages of the thread in a mo. But hopefully someone can set me right. Im in ubuntu14.10 and vm win 7

http://ghettomining-co.in/net/coin 0% fee +potential block reward  https://discord.gg/NXDanPe net discord
http://ghettomining-co.in/ltc/coin 0% fee                                            https://discord.gg/kHekYc5 pool discord to sign up
http://ghettomining-co.in/waya/coin 0% fee
horstman
Newbie
*
Offline Offline

Activity: 59
Merit: 0


View Profile
May 27, 2014, 05:02:56 PM
 #628

Hi i have been struggling with compiling a windows qt for about a week now. tried everything iv found on google. corrupted my linux with gitian had to re install it a million times. is it possible to use this method with a clone of abccoin? I have changed the coin values and how it operates to suit my needs, compiled both xcoind and xcoin-qt in ubuntu and have had it running and mining but not been able to make a windows qt. i even tried in desperation to use the easywinbuild from bitcoin talk thread and that just crashed. with this i get to the gcc -v and nothing happens iv tried setting env paths with set c:/mingw/* \mingw\* and so on, understand that may be wrong but iv tried so much i cant remember exactly what i used but alass nothing worked lol. Im a total newbie when it comes to this. Il have a read through the last pages of the thread in a mo. But hopefully someone can set me right. Im in ubuntu14.10 and vm win 7

how to run the "gcc -v" command? Do i have to install sth not mentioned in the tutorial? My post with questions is one page back the last post, would be nice if someone could help me out.
regtable69
Hero Member
*****
Offline Offline

Activity: 588
Merit: 500


View Profile
May 27, 2014, 09:11:01 PM
 #629

Hi i have been struggling with compiling a windows qt for about a week now. tried everything iv found on google. corrupted my linux with gitian had to re install it a million times. is it possible to use this method with a clone of abccoin? I have changed the coin values and how it operates to suit my needs, compiled both xcoind and xcoin-qt in ubuntu and have had it running and mining but not been able to make a windows qt. i even tried in desperation to use the easywinbuild from bitcoin talk thread and that just crashed. with this i get to the gcc -v and nothing happens iv tried setting env paths with set c:/mingw/* \mingw\* and so on, understand that may be wrong but iv tried so much i cant remember exactly what i used but alass nothing worked lol. Im a total newbie when it comes to this. Il have a read through the last pages of the thread in a mo. But hopefully someone can set me right. Im in ubuntu14.10 and vm win 7

how to run the "gcc -v" command? Do i have to install sth not mentioned in the tutorial? My post with questions is one page back the last post, would be nice if someone could help me out.
I believe you run the gcc -v in the /mysys/1.0/mysys.bin linux based shell. If thats wrong its in cmd comand prompt. One or the other and you "should" be able to just type gcc -v and it does things as described but thats goin on your able to change the paths environmental variables as mentioned in the preceding paragraph. My issue is it says make sure you have done this environmental variable path should look like this. But never explains how or what you change. Iv found windows xp and earlier explanations how to do it. I.e rt click my comp click propertys click enviromental and so on. But windows 7 has no "my computer" and when propertys is clicked you get nothing usefull. So in summary if you type gcc -v in mysys.bin or cmd and it says gcc is not a valid command i am to assume the paths are not set as per previous notation and that is where i failed.
And what i did find was "set c:/mingw/  c\mingw\ which changes the "paths" from c:/ to linux native commands i believe, i did that for c:/* c\* believing it would make for all subfolders. But nope.

http://ghettomining-co.in/net/coin 0% fee +potential block reward  https://discord.gg/NXDanPe net discord
http://ghettomining-co.in/ltc/coin 0% fee                                            https://discord.gg/kHekYc5 pool discord to sign up
http://ghettomining-co.in/waya/coin 0% fee
nitrogenetics (OP)
Full Member
***
Offline Offline

Activity: 131
Merit: 108



View Profile
May 27, 2014, 09:29:01 PM
 #630

Right click on "Computer"->"Properties" or open system from control panel:


BTC: 1NWQ4TarCCC7j1XY26KRFFEtLYbPP6S3DH
XRP: rJkbeyRaUYDmcukEyLYVfn56QDM9VhybZG
YarkoL
Legendary
*
Offline Offline

Activity: 996
Merit: 1013


View Profile
May 27, 2014, 10:44:08 PM
Last edit: May 28, 2014, 05:56:17 AM by YarkoL
 #631

Have any of you got this?

Quote
/libmemenv.a: error adding symbols: Archive has no index; run ranlib to add one

Started anew on another machine with win7. Everything going smoothly... until the compiling of Qt 4.8.5
halts with:

Quote
/libmemenv.a: error adding symbols: Archive has no index; run ranlib to add one

I imagine I know a little how it feels to be hit by lightning twice in a row...

“God does not play dice"
nitrogenetics (OP)
Full Member
***
Offline Offline

Activity: 131
Merit: 108



View Profile
May 27, 2014, 11:01:46 PM
 #632

Quote
/libmemenv.a: error adding symbols: Archive has no index; run ranlib to add one

What coin/version are you trying to compile?

BTC: 1NWQ4TarCCC7j1XY26KRFFEtLYbPP6S3DH
XRP: rJkbeyRaUYDmcukEyLYVfn56QDM9VhybZG
YarkoL
Legendary
*
Offline Offline

Activity: 996
Merit: 1013


View Profile
May 27, 2014, 11:06:59 PM
 #633

Quote
/libmemenv.a: error adding symbols: Archive has no index; run ranlib to add one

What coin/version are you trying to compile?

This
https://github.com/YarkoL/lovecoin

The most promising hint about the problem I've found so far is to replace "ar" with
the full name of that tool (in the mingw libs) in configuring, but I'm not sure where
should I put it.

“God does not play dice"
regtable69
Hero Member
*****
Offline Offline

Activity: 588
Merit: 500


View Profile
May 28, 2014, 01:51:58 AM
 #634

Right click on "Computer"->"Properties" or open system from control panel:


Thanks nitrogenics i knew i was being a fool but sleep dep plus no "my computer" my brain fart turned into a shart! On to the next step where i shall get stuck. Iv seen around alot of build instruction say somthing about a contrib folder in the source will it be an issue if mine dosent contain it?. As i say iv started from razorloves abccoin stock.

http://ghettomining-co.in/net/coin 0% fee +potential block reward  https://discord.gg/NXDanPe net discord
http://ghettomining-co.in/ltc/coin 0% fee                                            https://discord.gg/kHekYc5 pool discord to sign up
http://ghettomining-co.in/waya/coin 0% fee
horstman
Newbie
*
Offline Offline

Activity: 59
Merit: 0


View Profile
May 28, 2014, 12:42:39 PM
 #635

Right click on "Computer"->"Properties" or open system from control panel:

http://www.faqforge.com/wp-content/uploads/2012/01/path.png
Thanks a lot, seems to be compileing the openssl Smiley
regtable69
Hero Member
*****
Offline Offline

Activity: 588
Merit: 500


View Profile
May 30, 2014, 02:56:41 PM
Last edit: May 30, 2014, 03:37:14 PM by regtable69
 #636

Hi all, I recently went through the process of building bitcoind on windows.
I found the official build-msw.txt to be a bit lacking, so I thought that documenting the steps here on the forums could save some time to people wanting to compile their own windows binary. Wink

Please note this is mostly for testing purposes. Always use official executables on production environments.
The following instructions are intended for use with the latest 0.9.1. See additional notes if compiling an older 0.8.6 version.

1. Prepare your build system.
I strongly suggest setting up a clean windows virtual machine via Virtualbox or similar.

1.1 Install msys shell:
http://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download
From MinGW installation manager -> All packages -> MSYS
mark the following for installation:

msys-base-bin
msys-autoconf-bin
msys-automake-bin
msys-libtool-bin


then click on Installation -> Apply changes

Make sure no mingw packages are checked for installation or present from a previous install. Only the above msys packages should be installed. Also make sure that msys-gcc and msys-w32api packages are not installed.
 


error in your wording!!  also make sure that mysys-gcc and mysys-w32api ARE installed. not not installed otherwise gcc - v errors out

and you would think this goes without saying but i have to say because i just made a school boy error. OPEN CMD BY RIGHT CLICK RUN AS ADMIN!!!!! that will save you hours if not days/weeks of why wont db compile or make.

http://ghettomining-co.in/net/coin 0% fee +potential block reward  https://discord.gg/NXDanPe net discord
http://ghettomining-co.in/ltc/coin 0% fee                                            https://discord.gg/kHekYc5 pool discord to sign up
http://ghettomining-co.in/waya/coin 0% fee
regtable69
Hero Member
*****
Offline Offline

Activity: 588
Merit: 500


View Profile
May 30, 2014, 04:00:43 PM
Last edit: May 30, 2014, 04:16:13 PM by regtable69
 #637

2.5 protoc and libprotobuf:
Download and unpack http://protobuf.googlecode.com/files/protobuf-2.5.0.zip
Then from msys shell
Code:
cd /c/deps/protobuf-2.5.0
configure --disable-shared
make

2.6 qrencode:
Download and unpack http://prdownloads.sourceforge.net/libpng/libpng-1.6.10.tar.gz?download inside your deps folder then configure and make:
Code:
cd /c/deps/libpng-1.6.10
configure --disable-shared
make

Download and unpack http://fukuchi.org/works/qrencode/qrencode-3.4.3.tar.gz inside your deps folder then configure and make:
Code:
cd /c/deps/qrencode-3.4.3

LIBS="../libpng-1.6.10/.libs/libpng16.a ../../mingw32/i686-w64-mingw32/lib/libz.a" \
png_CFLAGS="-I../libpng-1.6.10" \
png_LIBS="-L../libpng-1.6.10/.libs" \
configure --enable-static --disable-shared --without-tools

make
[/quote]


all errors out

 
at make
http://imgur.com/hsvV3F2
http://imgur.com/wcxFaPD
http://imgur.com/0hRHlgr

http://ghettomining-co.in/net/coin 0% fee +potential block reward  https://discord.gg/NXDanPe net discord
http://ghettomining-co.in/ltc/coin 0% fee                                            https://discord.gg/kHekYc5 pool discord to sign up
http://ghettomining-co.in/waya/coin 0% fee
YarkoL
Legendary
*
Offline Offline

Activity: 996
Merit: 1013


View Profile
May 30, 2014, 04:03:41 PM
 #638

error in your wording!!  also make sure that mysys-gcc and mysys-w32api ARE installed. not not installed otherwise gcc - v errors out

No, because you get those tools in the next step. Although I'm not sure why.

“God does not play dice"
regtable69
Hero Member
*****
Offline Offline

Activity: 588
Merit: 500


View Profile
May 30, 2014, 04:17:22 PM
Last edit: May 30, 2014, 04:31:56 PM by regtable69
 #639

error in your wording!!  also make sure that mysys-gcc and mysys-w32api ARE installed. not not installed otherwise gcc - v errors out

No, because you get those tools in the next step. Although I'm not sure why.
ok just the gcc -v command came up with no file  / programme found or similar error untill i went and repeated step one with those.

i presume doing this all in linux would be much easier but cant find a good run through for this.

if anyone knows of a good linux tut could you post it please.

http://ghettomining-co.in/net/coin 0% fee +potential block reward  https://discord.gg/NXDanPe net discord
http://ghettomining-co.in/ltc/coin 0% fee                                            https://discord.gg/kHekYc5 pool discord to sign up
http://ghettomining-co.in/waya/coin 0% fee
nitrogenetics (OP)
Full Member
***
Offline Offline

Activity: 131
Merit: 108



View Profile
May 30, 2014, 06:11:13 PM
 #640

error in your wording!!  also make sure that mysys-gcc and mysys-w32api ARE installed. not not installed otherwise gcc - v errors out

Using mingw included toolchain will not work so you should make sure not to install it.

if anyone knows of a good linux tut could you post it please.

Gitian is the easiest way to cross compile it on linux. You can see what is going on behind the scenes by having a look at gitian descriptors: https://github.com/bitcoin/bitcoin/tree/master/contrib/gitian-descriptors

BTC: 1NWQ4TarCCC7j1XY26KRFFEtLYbPP6S3DH
XRP: rJkbeyRaUYDmcukEyLYVfn56QDM9VhybZG
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!