Pages:
Author

Topic: Building headless Bitcoin and Bitcoin-qt on Windows - page 51. (Read 419389 times)

hero member
Activity: 772
Merit: 500
Here is the bitcoind release 0.8.5 exit running on a "pure" Windows 7 machine:



Now on an XP machine, the same code when exiting using any of the 5 ways mentioned previously, produce first this (which Windows7 doesn't let you see!):


and then in short order, this:

which is similar to the Windows7 message.

I still claim, that
https://github.com/old-c-coder/bitcoin-git/commit/0bd51c5ddd39e2e5adb1d1455b80c3a9e03b410b
fixes this, see message #176

Am I really the only one who ever exits bitcoind.exe on a windows machine, or shuts that machine down, or closes bitcoind.exe's window or ends the bitcoind.exe process (task manager, etc.)?

There has to be someone who has seen this on bitcoind.exe 0.8.2, 0.8.3, 0.8.4, 0.8.5?

If not, then I will just continue on as if I am the only person in the world running bitcoind.exe on a Windows machine Smiley

According to
http://en.wikipedia.org/wiki/Usage_share_of_operating_systems
as of August 2013, I see that 90.75% of the "desktop" machines are the dreaded Windows variety. I think this is a number that is too big to be ignored, don't you?

Ron

I really only use bitcoin-qt.exe, so I can't comment on bitcoind.exe. But I think it's worth opening an issue ticket on Github so that other devs get attention and can take a look.
You also should take a look here: http://stackoverflow.com/questions/3640633/c-setconsolectrlhandler-routine-issue

Dia
sr. member
Activity: 260
Merit: 251
too bad there isn't a tutorial for building windows with gitian. to a person who's never used gitian or virtualbox its pretty confusing. the instructions assume to much.

I use no virtual machine nor gitian AFAIK.

I repeat 1. Does your (or anyone's but mine) windows bitcoind.exe &/or your windows bitcoin-qt.exe crash upon exit?

Ron

nope, i'm on windows 8. it used to crash all the time on windows 7 though and corrupt my wallet. i found running in compatibility mode for windows xp sp3 did the trick.

Hello fellow Windows user  Grin,

OK, which: d or Qt crashed on Windows7? and how, when? On exit? If so, my fix would have saved the day, I claim! Have you tried XP SP2 compatibility, if it is offered? Just curious as I have both SP2 & SP3 versions. Lots of laptops out there, you know, that are more or less frozen in time as to what they can run.

Ron
sr. member
Activity: 260
Merit: 251
Thanks for responding, I thought no one is reading these "musings".

Thanks for the heads up about only "one fork on the table" when eating "gits"Smiley

And the link to nathanj git gui.

Previous links suggested that one fork and clone from a "tags" selection rather than a "branches" selection. Any guidance there? And if one or the other, then does one select the latest version from the "branches" choice, or master? Or does it matter?
Depends on what you want to do i guess. Latest tag --> latest stable.     master --> latest code

Don't know if I quite understand? My aim is to get the latest, say 0.8.5, but retain the ability, in the future, to get (clone?) the next version if I want to continue developing. This is what I can't do now, unless I create yet another identity, which I have no problem with!
Am I really the only one who ever exits bitcoind.exe on a windows machine, or shuts that machine down, or closes bitcoind.exe's window or ends the bitcoind.exe process (task manager, etc.)?
hehe. From the commit it seems like you are not stopping it but terminating it with ctrl-c  Roll Eyes  that is not the proper way to shut it down.

You need to do "namecoind stop" from a second command window (will rpc into the daemon).
I tried that and I see this:
____________________________
17:50:26.34 >bitcoind.exe -stop
Error: Unable to bind to 0.0.0.0:8333 on this computer. Bitcoin is probably alre
ady running.
Error: Failed to listen on any port. Use -listen=0 if you want this.
____________________________
I wonder which or both bitcoind.exes need this argument? I guess I'll try the 3 combinations!

But what if bitcoind.exe is closed, shutdown or terminated by something outside of it's control? I see SIGTERM trap code for Linux, that I presume works. Shouldn't Windows have it too?
Quote

Ron
hero member
Activity: 686
Merit: 504
always the student, never the master.
too bad there isn't a tutorial for building windows with gitian. to a person who's never used gitian or virtualbox its pretty confusing. the instructions assume to much.

I use no virtual machine nor gitian AFAIK.

I repeat 1. Does your (or anyone's but mine) windows bitcoind.exe &/or your windows bitcoin-qt.exe crash upon exit?

Ron

nope, i'm on windows 8. it used to crash all the time on windows 7 though and corrupt my wallet. i found running in compatibility mode for windows xp sp3 did the trick.
legendary
Activity: 1708
Merit: 1020
Thanks for the heads up about only "one fork on the table" when eating "gits"Smiley

And the link to nathanj git gui.

Previous links suggested that one fork and clone from a "tags" selection rather than a "branches" selection. Any guidance there? And if one or the other, then does one select the latest version from the "branches" choice, or master? Or does it matter?
Depends on what you want to do i guess. Latest tag --> latest stable.     master --> latest code

Am I really the only one who ever exits bitcoind.exe on a windows machine, or shuts that machine down, or closes bitcoind.exe's window or ends the bitcoind.exe process (task manager, etc.)?
hehe. From the commit it seems like you are not stopping it but terminating it with ctrl-c  Roll Eyes  that is not the proper way to shut it down.

You need to do "namecoind stop" from a second command window (will rpc into the daemon).
sr. member
Activity: 260
Merit: 251
Here is the bitcoind release 0.8.5 exit running on a "pure" Windows 7 machine:



Now on an XP machine, the same code when exiting using any of the 5 ways mentioned previously, produce first this (which Windows7 doesn't let you see!):


and then in short order, this:

which is similar to the Windows7 message.

I still claim, that
https://github.com/old-c-coder/bitcoin-git/commit/0bd51c5ddd39e2e5adb1d1455b80c3a9e03b410b
fixes this, see message #176

Am I really the only one who ever exits bitcoind.exe on a windows machine, or shuts that machine down, or closes bitcoind.exe's window or ends the bitcoind.exe process (task manager, etc.)?

There has to be someone who has seen this on bitcoind.exe 0.8.2, 0.8.3, 0.8.4, 0.8.5?

If not, then I will just continue on as if I am the only person in the world running bitcoind.exe on a Windows machine Smiley

According to
http://en.wikipedia.org/wiki/Usage_share_of_operating_systems
as of August 2013, I see that 90.75% of the "desktop" machines are the dreaded Windows variety. I think this is a number that is too big to be ignored, don't you?

Ron
sr. member
Activity: 260
Merit: 251
Thanks for the heads up about only "one fork on the table" when eating "gits"Smiley

And the link to nathanj git gui.

Previous links suggested that one fork and clone from a "tags" selection rather than a "branches" selection. Any guidance there? And if one or the other, then does one select the latest version from the "branches" choice, or master? Or does it matter?

I will look again at your code, but it seems you bundle all the sources of an older version inside?

When you say "No crashing here. 0.8.x with Coin Control." What version is the "x"? What is coin control? Does "coin control" affect the result?

As to MS VS/VC++ Express being a pita, I see little difference with other free IDEs. All have their pita quotients. I like the ability to view all the classes, etc. even if one can't (yet) compile/build in the IDE.

More comments to come...

Ron
legendary
Activity: 1708
Merit: 1020
Hello all

These remarks are all from the point of view of a Windows person, running Windows, and running GitHub for Windows 1.1.1.0

I don't know if it's just me, but I can't seem to "fork" or "clone in desktop" the "bitcoin/bitcoin" 0.8.5 tag code? When I "fork", github sends me back to "my" github area "old-c-coder/bitcoin-git", which was forked from gavinandresen/bitcoin-git, and only goes "up" to version 0.8.3
Somehow Github for Windows and the website itself do not allow to create two forks of the same repository. It is possible just like that by using proper Git. This bothered me, too, and I wonder why it is like this.

I found this real Git Gui to be quite helpful: http://nathanj.github.io/gitguide/tour.html   (you got to get used to it but so far it did everything I wanted it to once I had found out how...).

Hi! I need help
I have done all steps up to 3.2. And  C:\bitcoin\bitcoin-master\src\makefile.mingw does'nt exist. Exist only Makefile.am and Makefile.include. Where can I find makefile.mingw?
thanks in advance!
You downloaded the wrong file. Click the branch button and select a tag (not a branch) before downloading the zip.

Quote
Can we no longer build and run, test changes, etc.? It seems that bitcoin 0.8.4rc2 ( and maybe only 0.8.3) are the last versions that can be made on Windows and still shared on GitHub?
Rest assured, it is possible. Take a look at my signature for the easy way  Grin


Quote
1. https://github.com/old-c-coder/bitcoin-git/commit/0bd51c5ddd39e2e5adb1d1455b80c3a9e03b410b
(0.8.3 bitcoind on Windows {shutdown/close window/Ctl-C/Ctl-break/Program shutdown} problem fixed) BTW, I still claim that bitcoind and bitcoin-qt for windows (0.8.3, 0.8.4, 0.8.5) can't exit without erroring. Is anyone else seeing this?
No crashing here. 0.8.x with Coin Control.

Quote
But I see no way to GitHub these changes into 0.8.5 nor 0.8.4rc2?

Back to more interesting matters. It seems that earlier in the year, the "chatter on the web" was that levelDB was hard to integrate into Microsoft Visual Studio C++ compilers. But now it seems that that hurdle has been cleared. It seems that openssl, boost and BerkeleyDb are all Visual Studio "doable" in some sense. This means that bitcoin "should" be too!? Any thoughts...
If you like pita for nothing...  Tongue
sr. member
Activity: 260
Merit: 251
too bad there isn't a tutorial for building windows with gitian. to a person who's never used gitian or virtualbox its pretty confusing. the instructions assume to much.

I use no virtual machine nor gitian AFAIK.

I repeat 1. Does your (or anyone's but mine) windows bitcoind.exe &/or your windows bitcoin-qt.exe crash upon exit?

Ron
hero member
Activity: 686
Merit: 504
always the student, never the master.
too bad there isn't a tutorial for building windows with gitian. to a person who's never used gitian or virtualbox its pretty confusing. the instructions assume to much.
sr. member
Activity: 260
Merit: 251
Hello all

These remarks are all from the point of view of a Windows person, running Windows, and running GitHub for Windows 1.1.1.0

I don't know if it's just me, but I can't seem to "fork" or "clone in desktop" the "bitcoin/bitcoin" 0.8.5 tag code? When I "fork", github sends me back to "my" github area "old-c-coder/bitcoin-git", which was forked from gavinandresen/bitcoin-git, and only goes "up" to version 0.8.3

Even when I "download zip" the 0.8.5 code, there seems to be a big change in the build procedure. The notes in doc/build-msw.md seem pretty much what we have been doing, finishing with the usual
"mingw32-make -f makefile.mingw". But there is no makefile.mingw in the src directory, nor anywhere else? So is the documentation wrong? Ditto for the bitcoin-qt.pro file. Nowhere, so how is a makefile.release made?

Also peering into the sourceforge bitcoin, "bitcoin-0.8.5-win32-setup.exe", there is still a makefile.mingw in the src directory, but no longer a bitcoin-qt.pro in the root as in the past?

It seems that a new configure program is required in some fashion, a program called autoconf. Does this work with mingW on Windows? Should it? If so, how?

Can we no longer build and run, test changes, etc.? It seems that bitcoin 0.8.4rc2 ( and maybe only 0.8.3) are the last versions that can be made on Windows and still shared on GitHub?

Anyone have any insight in these matters?

I have an 0.8.4rc2 and even an 0.8.5 that have the:

1. https://github.com/old-c-coder/bitcoin-git/commit/0bd51c5ddd39e2e5adb1d1455b80c3a9e03b410b
(0.8.3 bitcoind on Windows {shutdown/close window/Ctl-C/Ctl-break/Program shutdown} problem fixed) BTW, I still claim that bitcoind and bitcoin-qt for windows (0.8.3, 0.8.4, 0.8.5) can't exit without erroring. Is anyone else seeing this?

2. https://github.com/old-c-coder/bitcoin-git/commit/929019012dc7d93fd3ba59d8eb553e390211a713
the wallet.dat no longer "pinned" to the "datadir" nor the name wallet.dat. The newer version of the above,  "plants/finds" all the (3) BerkeleyDB database files ( [datadir]db.log, [datadir]wallet.dat, [datadir]/database/log.0000000001 and can now (optionally) start up bitcoind or bitcoin-qt with that [new wallet datadir] anywhere on your computer, and wallet.dat can have any name too. For example, they can be on a USB (thumb)drive, and removed when the program exits. The block chain, levelDB files ([datadir]/blocks/*.dat, [datadir]/blocks/index/*.sst etc.,  [datadir]/chainstate/*.sst,*.log, etc.) are still in the "-datadir=..." directory.

3. https://github.com/old-c-coder/bitcoin-git/commit/d511cff2fceb0a2b8e9fe248800edcf1b766288a
the -frandom-seed=$@ addition to the bitcoind & bitcoin-qt make files to make them more "deterministic". Which I thought I saw incorporated into a bitcoind makefile.mingW?

4. https://github.com/old-c-coder/bitcoin-git/commit/a3b0406c78c194a2925f627caefc0548fcaa012b
a splash screen that has a thin black border so that it can be seen on a normal white background of other screens, when launched (on top of them).

5. https://github.com/old-c-coder/bitcoin-git/commit/289d78d6aaf3ea4bbafd681b96cd8029b3b3b30d
a default argument (#if'd for Windows) to keep the splash screen a "top-most" window. This way it is not "clobbered" by other popping up or passing by windows. Unless they are also a top-most window! See the task manager "duke it out" with splash.png Smiley I also tried to animate (update) the splash when it is "VerifyDB'ing" so that it can be differentiated from being hung, stalled or broken in some way, and also doesn't get "clobbered" by task manager, for example.

But I see no way to GitHub these changes into 0.8.5 nor 0.8.4rc2?

Back to more interesting matters. It seems that earlier in the year, the "chatter on the web" was that levelDB was hard to integrate into Microsoft Visual Studio C++ compilers. But now it seems that that hurdle has been cleared. It seems that openssl, boost and BerkeleyDb are all Visual Studio "doable" in some sense. This means that bitcoin "should" be too!? Any thoughts...

Ron


legendary
Activity: 1708
Merit: 1020
Hi! I need help
I have done all steps up to 3.2. And  C:\bitcoin\bitcoin-master\src\makefile.mingw does'nt exist. Exist only Makefile.am and Makefile.include. Where can I find makefile.mingw?
thanks in advance!
You downloaded the wrong file. Click the branch button and select a tag (not a branch) before downloading the zip.

And how is one supposed to know what not to do? They are of equal "weight" it seems on GitHub. If it serves a purpose, what might it be? And how would one find out? The online help/tutorials are not very "enlightening"? Huh

Ron
This is so the noobs don't learn too fast  Cheesy

Ok, actually I think those who know are too lazy busy to document properly. I can't blame... if you can then write better docs and keep them up to date   Tongue
sr. member
Activity: 260
Merit: 251
Hi! I need help
I have done all steps up to 3.2. And  C:\bitcoin\bitcoin-master\src\makefile.mingw does'nt exist. Exist only Makefile.am and Makefile.include. Where can I find makefile.mingw?
thanks in advance!
You downloaded the wrong file. Click the branch button and select a tag (not a branch) before downloading the zip.

And how is one supposed to know what not to do? They are of equal "weight" it seems on GitHub. If it serves a purpose, what might it be? And how would one find out? The online help/tutorials are not very "enlightening"? Huh

Ron
sr. member
Activity: 260
Merit: 251
ty phelix.  Wink
I created bitcoind.exe and bitcoin-qt.exe  Cool
What version & for what OS? 0.8.4 for Windows?

Ron
legendary
Activity: 1400
Merit: 1000
ty phelix.  Wink
I created bitcoind.exe and bitcoin-qt.exe  Cool
legendary
Activity: 1708
Merit: 1020
Hi! I need help
I have done all steps up to 3.2. And  C:\bitcoin\bitcoin-master\src\makefile.mingw does'nt exist. Exist only Makefile.am and Makefile.include. Where can I find makefile.mingw?
thanks in advance!
You downloaded the wrong file. Click the branch button and select a tag (not a branch) before downloading the zip.
legendary
Activity: 1400
Merit: 1000
Hi! I need help
I have done all steps up to 3.2. And  C:\bitcoin\bitcoin-master\src\makefile.mingw does'nt exist. Exist only Makefile.am and Makefile.include. Where can I find makefile.mingw?
thanks in advance!
sr. member
Activity: 260
Merit: 251
hi

i need help

i keep getting

 'g++' is not recognized as an internal or external command,
operable program or batch file.
Makefile.Release:720: recipe for target 'build/bitcoin.o' failed
mingw32-make: *** [build/bitcoin.o] Error 1

I think we need some more information, otherwise we are guessing too much about what you have? All that is certain is that your OS can't find g++. So presuming you are building bitcoin-qt (I see a
Makefile.Release mention) then either the path environment variable no longer has a mention of where g++.exe is, or the error is gibberish and is being caused by other failures.

Generally, makefile.release can't mess up path variables, and bitcoin-qt.pro, which creates makefile.release, can't either! So the problem may be deeper?

Have you tried nitrogenetics  "recipe"? See message #1 in this thread. Note especially step 1.3

Ron
legendary
Activity: 882
Merit: 1000
hi

i need help

i keep getting

 'g++' is not recognized as an internal or external command,
operable program or batch file.
Makefile.Release:720: recipe for target 'build/bitcoin.o' failed
mingw32-make: *** [build/bitcoin.o] Error 1
sr. member
Activity: 260
Merit: 251
Hello Gavin,

The comment I referred to in message #164, was not the code comment at the start of init.cpp, but a remark you made in a bitcointalk.org or a sourceforge.net forum somewhere on just this problem in Windows!

The only code to trap Ctl-C (a terminate signal I guess in Linux/Unix) at the start of AppInit2() was :
_________________________
#ifndef WIN32
    umask(077);

    // Clean shutdown on SIGTERM
    struct sigaction sa;
    sa.sa_handler = HandleSIGTERM;
    sigemptyset(&sa.sa_mask);
    sa.sa_flags = 0;
    sigaction(SIGTERM, &sa, NULL);
    sigaction(SIGINT, &sa, NULL);

    // Reopen debug.log on SIGHUP
    struct sigaction sa_hup;
    sa_hup.sa_handler = HandleSIGHUP;
    sigemptyset(&sa_hup.sa_mask);
    sa_hup.sa_flags = 0;
    sigaction(SIGHUP, &sa_hup, NULL);
#endif
_______________________________
Notice the #ifndef WIN32
That precludes Windows from participating in any termination signal trapping.
All I did was add an #else clause, with the appropriate code. And it works!

Ron
Pages:
Jump to: