Diapolo
|
|
August 21, 2013, 06:14:57 AM |
|
If you are doing such things, make sure to create a pull request for our official repository . Dia Ah, but like any artist, one doesn't like to submit an incomplete drawing, play, sculpture, painting, piece of music, novel, etc. Also, why bother others with something I can run myself, to see if it "flies". I was just surprised by the SIGSEGV (with a normal build) and the link given suggests that even valgrind may not even be able to find the "static miscues"? Ron Indeed, you are free to finish your work before doing any pull-request. I just wanted to encourage you to submit patches of great stuff you are doing . Dia
|
|
|
|
old c coder
|
|
September 04, 2013, 04:02:44 AM |
|
Hello all, I can no longer find Gavin's message/remark concerning the behavior of bitcoind and bitcoin-qt on Windows when one exits them. He stated that there was a shutdown issue. No kidding! For versions 0.8.3, (maybe 0.8.2 but not 0.8.1) and still with 0.8.4. Well Gavin, see https://github.com/old-c-coder/bitcoin-git/commit/0bd51c5ddd39e2e5adb1d1455b80c3a9e03b410b It's fixed. Windows never had a Ctl-C handler. Now the cleanup classes CNetCleanup and CMainCleanup destructors finally launch and "do their thing". But alas, Windows bitcoin-qt's stop or exit code never get near StartShutdown() so still no joy there. Even though this is a Windows-centric thread, how does the code, bitcoind & bitcoin-qt exit on a Mac? Or is it the same as Linux/Unix, which I presume work correctly? Ron
|
LTC: LUYiMVsrFQewUSPDasSKGzhyTPAkiTeSov BTC: 1DPvP6WoZzaNQ9Nxzd64hjYad1kyQzTTbx YAC: Y3ZggXDvnRJaRwtVGyGJwt6DMLN3EPQpQf The day is coming when a single carrot, freshly observed, will set off a revolution. Paul Cezanne
|
|
|
Gavin Andresen
Legendary
Offline
Activity: 1652
Merit: 2301
Chief Scientist
|
|
September 04, 2013, 04:25:14 AM |
|
I wrote a big comment in init.cpp describing how shutdown works: // // Thread management and startup/shutdown: // // The network-processing threads are all part of a thread group // created by AppInit() or the Qt main() function. // // A clean exit happens when StartShutdown() or the SIGTERM // signal handler sets fRequestShutdown, which triggers // the DetectShutdownThread(), which interrupts the main thread group. // DetectShutdownThread() then exits, which causes AppInit() to // continue (it .joins the shutdown thread). // Shutdown() is then // called to clean up database connections, and stop other // threads that should only be stopped after the main network-processing // threads have exited. // // Note that if running -daemon the parent process returns from AppInit2 // before adding any threads to the threadGroup, so .join_all() returns // immediately and the parent exits from main(). // // Shutdown for Qt is very similar, only it uses a QTimer to detect // fRequestShutdown getting set, and then does the normal Qt // shutdown thing. //
I don't know nuthin about Windows' SetConsoleCtrlHandler(), but just setting the fRequestShutdown global variable should do the right thing.
|
How often do you get the chance to work on a potentially world-changing project?
|
|
|
old c coder
|
|
September 04, 2013, 05:04:11 AM |
|
Hello Gavin,
I read your code comment, but that is how it should work (on Windows) but can't and doesn't with exit/stop for bitcoin-qt nor Ctl-C for bitcoind!
You have to trap the Ctl-C in order to set fRequestShutdown! If you don't, Windows boots you out, which is what happens now with the current code. There is nothing trapping Ctl-C in the Windows code.
All I'm doing is trapping the Ctl-C and calling the current HandleSIGTERM().
And I respectfully disagree with your comments on bitcoin-qt. It should but never calls HandleSIGTERM() on Windows anyway. All of which I stated in my change.
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
|
|
September 04, 2013, 10:41:17 AM |
|
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
|
LTC: LUYiMVsrFQewUSPDasSKGzhyTPAkiTeSov BTC: 1DPvP6WoZzaNQ9Nxzd64hjYad1kyQzTTbx YAC: Y3ZggXDvnRJaRwtVGyGJwt6DMLN3EPQpQf The day is coming when a single carrot, freshly observed, will set off a revolution. Paul Cezanne
|
|
|
barwizi
Legendary
Offline
Activity: 882
Merit: 1000
|
|
September 04, 2013, 02:24:53 PM |
|
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
|
|
|
|
old c coder
|
|
September 04, 2013, 05:04:25 PM |
|
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
|
LTC: LUYiMVsrFQewUSPDasSKGzhyTPAkiTeSov BTC: 1DPvP6WoZzaNQ9Nxzd64hjYad1kyQzTTbx YAC: Y3ZggXDvnRJaRwtVGyGJwt6DMLN3EPQpQf The day is coming when a single carrot, freshly observed, will set off a revolution. Paul Cezanne
|
|
|
fsb4000
Legendary
Offline
Activity: 1400
Merit: 1000
|
|
September 10, 2013, 12:25:17 PM |
|
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!
|
|
|
|
phelix
Legendary
Offline
Activity: 1708
Merit: 1020
|
|
September 10, 2013, 12:52:12 PM |
|
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.
|
|
|
|
fsb4000
Legendary
Offline
Activity: 1400
Merit: 1000
|
|
September 10, 2013, 03:58:36 PM |
|
ty phelix. I created bitcoind.exe and bitcoin-qt.exe
|
|
|
|
old c coder
|
|
September 10, 2013, 07:23:31 PM |
|
ty phelix. I created bitcoind.exe and bitcoin-qt.exe What version & for what OS? 0.8.4 for Windows? 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
|
|
September 10, 2013, 07:27:05 PM |
|
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"? Ron
|
LTC: LUYiMVsrFQewUSPDasSKGzhyTPAkiTeSov BTC: 1DPvP6WoZzaNQ9Nxzd64hjYad1kyQzTTbx YAC: Y3ZggXDvnRJaRwtVGyGJwt6DMLN3EPQpQf The day is coming when a single carrot, freshly observed, will set off a revolution. Paul Cezanne
|
|
|
phelix
Legendary
Offline
Activity: 1708
Merit: 1020
|
|
September 10, 2013, 07:48:59 PM |
|
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"? Ron This is so the noobs don't learn too fast 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
|
|
|
|
old c coder
|
|
September 23, 2013, 05:07:37 AM |
|
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 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
|
LTC: LUYiMVsrFQewUSPDasSKGzhyTPAkiTeSov BTC: 1DPvP6WoZzaNQ9Nxzd64hjYad1kyQzTTbx YAC: Y3ZggXDvnRJaRwtVGyGJwt6DMLN3EPQpQf The day is coming when a single carrot, freshly observed, will set off a revolution. Paul Cezanne
|
|
|
r3wt
|
|
September 23, 2013, 05:14:53 AM |
|
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.
|
My negative trust rating is reflective of a personal vendetta by someone on default trust.
|
|
|
old c coder
|
|
September 23, 2013, 02:28:15 PM |
|
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
|
LTC: LUYiMVsrFQewUSPDasSKGzhyTPAkiTeSov BTC: 1DPvP6WoZzaNQ9Nxzd64hjYad1kyQzTTbx YAC: Y3ZggXDvnRJaRwtVGyGJwt6DMLN3EPQpQf The day is coming when a single carrot, freshly observed, will set off a revolution. Paul Cezanne
|
|
|
phelix
Legendary
Offline
Activity: 1708
Merit: 1020
|
|
September 23, 2013, 08:57:52 PM |
|
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...). 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?
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. 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 No crashing here. 0.8.x with Coin Control. 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...
|
|
|
|
old c coder
|
|
September 24, 2013, 02:17:07 PM |
|
Thanks for the heads up about only "one fork on the table" when eating "gits" 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
|
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
|
|
September 25, 2013, 09:19:12 PM Last edit: September 25, 2013, 09:30:57 PM by old c coder |
|
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 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
|
LTC: LUYiMVsrFQewUSPDasSKGzhyTPAkiTeSov BTC: 1DPvP6WoZzaNQ9Nxzd64hjYad1kyQzTTbx YAC: Y3ZggXDvnRJaRwtVGyGJwt6DMLN3EPQpQf The day is coming when a single carrot, freshly observed, will set off a revolution. Paul Cezanne
|
|
|
phelix
Legendary
Offline
Activity: 1708
Merit: 1020
|
|
September 25, 2013, 09:42:48 PM |
|
Thanks for the heads up about only "one fork on the table" when eating "gits" 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 I will look again at your code, but it seems you bundle all the sources of an older version inside?
Still did not find the time to update but you can just copy paste the easywinbuilder directory. Maybe should be separate. 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?
x is some number 3 to 4 that I actually tested. But also regual 0.8.4 on windows does not crash on shutdown. Coin Control is a cool feature that my patched version has. There is a thread about the latest version by cozz it somewhere around. 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.
It may be an interesting IDE but what is the advantage of compiling Bitcoin with another IDE/compiler? 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 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).
|
|
|
|
|