Pages:
Author

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

full member
Activity: 131
Merit: 108
I am trying to compile smartcoind.exe, but  I am bumping in the following error

C:/deps/boost_1_53_0/boost/program_options/eof_iterator.hpp:75: undefined refere
nce to `boost::program_options::detail::common_config_file_iterator::get()'
obj/util.o: In function `ZN5boost15program_options6detail26basic_config_file_ite
ratorIcEC1ERSiRKSt3setISsSt4lessISsESaISsEEb':
C:/deps/boost_1_53_0/boost/program_options/detail/config_file.hpp:145: undefined
 reference to `boost::program_options::detail::common_config_file_iterator::comm
on_config_file_iterator(std::set, std::alloc
ator > const&, bool)'
C:/deps/boost_1_53_0/boost/program_options/detail/config_file.hpp:148: undefined
 reference to `boost::program_options::detail::common_config_file_iterator::get(
)'
collect2.exe: error: ld returned 1 exit status
makefile.mingw:76: recipe for target 'smartcoind.exe' failed
mingw32-make: *** [smartcoind.exe] Error 1


Anybody experience this before?

Fixing the makefile seems to solve the linking error

LIBS= \
 -l boost_system-mgw48-mt-s-1_5x \
 -l boost_filesystem-mgw48-mt-s-1_5x \
 -l boost_program_options-mgw48-mt-s-1_5x \
 -l boost_thread-mgw48-mt-s-1_5x \
newbie
Activity: 6
Merit: 0
I am trying to compile smartcoind.exe, but  I am bumping in the following error

C:/deps/boost_1_53_0/boost/program_options/eof_iterator.hpp:75: undefined refere
nce to `boost::program_options::detail::common_config_file_iterator::get()'
obj/util.o: In function `ZN5boost15program_options6detail26basic_config_file_ite
ratorIcEC1ERSiRKSt3setISsSt4lessISsESaISsEEb':
C:/deps/boost_1_53_0/boost/program_options/detail/config_file.hpp:145: undefined
 reference to `boost::program_options::detail::common_config_file_iterator::comm
on_config_file_iterator(std::set, std::alloc
ator > const&, bool)'
C:/deps/boost_1_53_0/boost/program_options/detail/config_file.hpp:148: undefined
 reference to `boost::program_options::detail::common_config_file_iterator::get(
)'
collect2.exe: error: ld returned 1 exit status
makefile.mingw:76: recipe for target 'smartcoind.exe' failed
mingw32-make: *** [smartcoind.exe] Error 1


Anybody experience this before?
sr. member
Activity: 470
Merit: 250
Better to have 100 friends than 100 rubles
I am currently trying to compile litecoin-qt.exe using makefile.debug but keep getting this error:

Code:
c:/deps/mingw/bin/../lib/gcc/i686-w64-mingw32/4.6.2/../../../../i686-w64-mingw32
/bin/ld.exe: cannot find -lQtGuid
c:/deps/mingw/bin/../lib/gcc/i686-w64-mingw32/4.6.2/../../../../i686-w64-mingw32
/bin/ld.exe: cannot find -lQtNetworkd
c:/deps/mingw/bin/../lib/gcc/i686-w64-mingw32/4.6.2/../../../../i686-w64-mingw32
/bin/ld.exe: cannot find -lQtCored
collect2: ld returned 1 exit status

I think its something to do with Qt but I cant figure out what... Any ideas?

I am using
boost 1.55
db 4.6.3
mingw 2.6.2
openssl-1.0.1c
qt 4.8.5


If this was a linux box, I'd say you didn't have the QtGUI package installed.  Have you tried this with QT 5.2.0 per post #1?

Cassey
sr. member
Activity: 260
Merit: 251
I am currently trying to compile litecoin-qt.exe using makefile.debug but keep getting this error:

Code:
c:/deps/mingw/bin/../lib/gcc/i686-w64-mingw32/4.6.2/../../../../i686-w64-mingw32
/bin/ld.exe: cannot find -lQtGuid
c:/deps/mingw/bin/../lib/gcc/i686-w64-mingw32/4.6.2/../../../../i686-w64-mingw32
/bin/ld.exe: cannot find -lQtNetworkd
c:/deps/mingw/bin/../lib/gcc/i686-w64-mingw32/4.6.2/../../../../i686-w64-mingw32
/bin/ld.exe: cannot find -lQtCored
collect2: ld returned 1 exit status

I think its something to do with Qt but I cant figure out what... Any ideas?

I am using
boost 1.55
db 4.6.3
mingw 2.6.2
openssl-1.0.1c
qt 4.8.5


I am able to compile using makefile.release but it just runs for a few seconds with no GUI and then stops again.

Note that your output says it is looking for gcc 4.6.2 and you say you are using gcc 2.6.2??? So something is wrong there for starters!

Also, traditionally we use BerkeleyDB 4.8.30 note db 4.6.3!

Ron
sr. member
Activity: 470
Merit: 250
Better to have 100 friends than 100 rubles
I had exactly the same problem, as did several others.   Solved it by going back to post #1 in this thread, which has been routinely updated, and following the instructions EXACTLY - use all the same packages and releases as specified in post #1.
newbie
Activity: 4
Merit: 0
I am currently trying to compile litecoin-qt.exe using makefile.debug but keep getting this error:

Code:
c:/deps/mingw/bin/../lib/gcc/i686-w64-mingw32/4.6.2/../../../../i686-w64-mingw32
/bin/ld.exe: cannot find -lQtGuid
c:/deps/mingw/bin/../lib/gcc/i686-w64-mingw32/4.6.2/../../../../i686-w64-mingw32
/bin/ld.exe: cannot find -lQtNetworkd
c:/deps/mingw/bin/../lib/gcc/i686-w64-mingw32/4.6.2/../../../../i686-w64-mingw32
/bin/ld.exe: cannot find -lQtCored
collect2: ld returned 1 exit status

I think its something to do with Qt but I cant figure out what... Any ideas?

I am using
boost 1.55
db 4.6.3
mingw 2.6.2
openssl-1.0.1c
qt 4.8.5


I am able to compile using makefile.release but it just runs for a few seconds with no GUI and then stops again.
olu
newbie
Activity: 10
Merit: 0
i compiled the bitoind.exe and is synchronizing( i can see through the log file in the roaming folder is getting the blocks)

i dont really understand how from one guide are coming different problem and different solution but here is mine:

about the winsock.h winsock2...

in ws2tcpip.h i found this part and seems it's already using winsock2.h and works ( Huh) so i removed that check...

Code:
-#if (defined _WINSOCK_H && !defined _WINSOCK2_H)
-#error "ws2tcpip.h is not compatable with winsock.h. Include winsock2.h instead."
-#endif

#include

scrolling down about the struct ip_mrq already declared i just commented the declaration:

Code:
struct ip_mreq {
struct in_addr imr_multiaddr;
struct in_addr imr_interface;
};

to solve the last error i removed this:

Code:
#if (_WIN32_WINNT >= 0x0501)
void WSAAPI freeaddrinfo (struct addrinfo*);
int WSAAPI getaddrinfo (const char*,const char*,const struct addrinfo*,
       struct addrinfo**);
int WSAAPI getnameinfo(const struct sockaddr*,socklen_t,char*,DWORD,
      char*,DWORD,int);
#else
/* FIXME: Need WS protocol-independent API helpers.  */
#endif




EDIT:

Trying to compile Qt(step 4.2) i get this error:

http://i.imgur.com/tYeqXUI.png


Set permissions/ issue the fix that keeps it from complaining about them.  Nitro wrote this somewhere in the guide, but you can get this fix by googling it I think.  I'll post the exact solution for this later.  

everytime I set  a genesis block for the daemon and change the nNonce, the epoch time, etc, rebuilding and re-running the coind.exe says the merkle root assertion failed.  The thing works perfectly in test net...

Nvm, fixed it.  Apparently when they say add the config file AFTER it tells you that you don't have one, they really do mean only AFTER.
olu
newbie
Activity: 10
Merit: 0
i compiled the bitoind.exe and is synchronizing( i can see through the log file in the roaming folder is getting the blocks)

i dont really understand how from one guide are coming different problem and different solution but here is mine:

about the winsock.h winsock2...

in ws2tcpip.h i found this part and seems it's already using winsock2.h and works ( Huh) so i removed that check...

Code:
-#if (defined _WINSOCK_H && !defined _WINSOCK2_H)
-#error "ws2tcpip.h is not compatable with winsock.h. Include winsock2.h instead."
-#endif

#include

scrolling down about the struct ip_mrq already declared i just commented the declaration:

Code:
struct ip_mreq {
struct in_addr imr_multiaddr;
struct in_addr imr_interface;
};

to solve the last error i removed this:

Code:
#if (_WIN32_WINNT >= 0x0501)
void WSAAPI freeaddrinfo (struct addrinfo*);
int WSAAPI getaddrinfo (const char*,const char*,const struct addrinfo*,
       struct addrinfo**);
int WSAAPI getnameinfo(const struct sockaddr*,socklen_t,char*,DWORD,
      char*,DWORD,int);
#else
/* FIXME: Need WS protocol-independent API helpers.  */
#endif




EDIT:

Trying to compile Qt(step 4.2) i get this error:

http://i.imgur.com/tYeqXUI.png


Set permissions/ issue the fix that keeps it from complaining about them.  Nitro wrote this somewhere in the guide, but you can get this fix by googling it I think.  I'll post the exact solution for this later. 

everytime I set  a genesis block for the daemon and change the nNonce, the epoch time, etc, rebuilding and re-running the coind.exe says the merkle root assertion failed.  The thing works perfectly in test net...
hero member
Activity: 784
Merit: 1416
i compiled the bitoind.exe and is synchronizing( i can see through the log file in the roaming folder is getting the blocks)

i dont really understand how from one guide are coming different problem and different solution but here is mine:

about the winsock.h winsock2...

in ws2tcpip.h i found this part and seems it's already using winsock2.h and works ( Huh) so i removed that check...

Code:
-#if (defined _WINSOCK_H && !defined _WINSOCK2_H)
-#error "ws2tcpip.h is not compatable with winsock.h. Include winsock2.h instead."
-#endif

#include

scrolling down about the struct ip_mrq already declared i just commented the declaration:

Code:
struct ip_mreq {
struct in_addr imr_multiaddr;
struct in_addr imr_interface;
};

to solve the last error i removed this:

Code:
#if (_WIN32_WINNT >= 0x0501)
void WSAAPI freeaddrinfo (struct addrinfo*);
int WSAAPI getaddrinfo (const char*,const char*,const struct addrinfo*,
       struct addrinfo**);
int WSAAPI getnameinfo(const struct sockaddr*,socklen_t,char*,DWORD,
      char*,DWORD,int);
#else
/* FIXME: Need WS protocol-independent API helpers.  */
#endif




EDIT:

Trying to compile Qt(step 4.2) i get this error:

sr. member
Activity: 470
Merit: 250
Better to have 100 friends than 100 rubles
Go into your mingw install and replace "winsock.h" with a copy of "winsock2.h".

I tried a variety of ways to force it to be included and none worked for reasons I don't understand, but this brute force approach did!
hero member
Activity: 784
Merit: 1416
Hi

I have some issues at the step 3.4




I edited the net.cpp like 4 times (checked like 500 lines) (oh and the ipv6 v6only is more like line 1700-1800 not 1600), restarted my computer ect
And try to be clear please, i'm 16 years old and french so I love hardware but when it's code like c, c++ it's not really my domain Smiley
thank you and have a nice day


EDIT : I think what's wrong

1.4 Install GCC from mingw-builds:
Download and unpack x32-4.8.1-release-posix-dwarf-rev5.7z
http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.8.1/32-bit/threads-posix/dwarf/x32-4.8.1-release-posix-dwarf-rev5.7z/download


it's this step

i see no mingw-builds in this file
and everytime i click on something that comports GCC on it a command appears and disapears



tried this yesterday night, but got stuck in this exact same point/error... if anybody got any suggestion
sr. member
Activity: 260
Merit: 251
I have managed to compile Litecoin 0.8.6 wallet without errors on closing but it has an awful windows 95 look. Why is that happening?

How? Depending on what versions of gcc, boost, openssl and bdb I use results can be anything from refusing to link, refusing to start up due to "wallet db error", or crashing on exit. Man, I hate Windows...
What makes you think it has anything to do with Windows?
Quote
I use Qt 4.8.5, gcc 4.4.0, boost 1.50, berkeley db 4.80, and openssl 1.0.1c currently, as I know these are used in several other working wallets, including a few Litecoin 0.8.6 forks that run perfectly.
I use Qt 4.8.4, gcc 4.6.2 (unobtanium now!), Boost 1.53, BerkeleyDB 4.8.30, OpenSSL 1.0.1c or 1.0.1e and levelDB 1.13 and build bitcoin with no problems.  I can't speak to litecoin as I don't know when its sources "forked" off of bitcoin.  It is important to know what version of bitcoin, and so what date, that an alternate crypto currency was born, as the tool versions that were used at the time would be most appropriate for that alt coin.  As the alt coin "matures" one may update the tools, but they need to be updated in a "gradual" "coordinated" fashion.  For example, one wouldn't - shouldn't use too much "newer" gccs as their "behavior" is known to "destabilize" "older" Qts for example.

Have you tired the tool combinations that fail somehow on Windows, and build the same alt coin (or bitcoin) on Linux (or MacOS) and test to see if they work there?

The main problem people have in building bitcoind & bitcoin-qt on Windows is that they aren't meticulous (enough) in following the recipe of nitrogenetics.  

Of course, it helps if you are knowledgeable on Windows!  Especially on command boxes (aka DOS windows).  It helps greatly if you know how to use .bat files or .wsh files, that is, how to "do" batch programming.  Also it helps if you are knowledgeable on how the Windows path environment is kept, controlled and manipulated.  There are many copies of the path at any moment in Windows, you know!  

There are subtle issues of pathnames with spaces in them, though that is less of an issue now than it was in the past.  And also one must be aware of subtleties regarding "\" versus "/" in couching pathnames.  None of these are difficult issues, it is just that the knowledge has been lost since there are no longer any definitive books on these subjects, and the general Windows user is no longer expected to know or wants to know, how  to do these things.  Remember that Windows 7 and 8 now make it even more difficult to "get your fingers in there and meddle around".

It helps if one knows the history of Windows and its DOS heritage.  Without that knowledge you have to fumble around by analogy with whatever you know about Linux, Unix, MacOs, etc. and  try to discern the "truth" of any subtle question by internet "research" and have the good judgement to know what is true, half-true or pure BS.  Kind of a vicious circle (catch-22) in which the only way to get knowledge is to know enough already to be able to tell what is knowledge Grin

So if you think the bitcoind (and Boost) code is pure and clean, try building it without the gcc -w argument!  Let's not even talk about qmake, makefile.release/debug and bitcoin-qt, which doesn't have the -w argument and you know what it "spews forth" Wink

What's interesting is that the compiler "warnings" about the bad C++ slang that is being used, as opposed to the preferred slang, i.e. the highly idiomatic, baroque (as Knuth calls it) nature of C++, can be controlled in MSVC++ and one can "see" more clearly what is "going on".  The thought is that this should lead to more understanding, but so far, the answers given are swamped by the questions that now appear!  Which is why you haven't heard from me (yet) on the Windows MSVC2005 version of bitcoind.  I have a "debug" version of bitcoind 0.8.6 that "appears to" run correctly.  And yes, Claire123 has a MSVC2012 version of bitcoind (& bitcoin-qt), but do our versions work correctly?  Do we have 'release' versions?  I am hoping to "GitHub" commit-pull request my MSVC "additions" to the bitcoind sources soon, but only when I feel that the code runs reliably.  

All of this reminds me of the Zen quote for today:
The most dangerous thing in the world is to think you understand something.

Ron
sr. member
Activity: 260
Merit: 251
Don't know if Ron and Nitro are still reading this, but thanks for the guide. 
You're welcome Smiley
Quote
I have grown from a complete novice to an intermediate crypto-phile/C++ coder thanks to this guide, ...
                                                                          -- Olu
Ron
sr. member
Activity: 470
Merit: 250
Better to have 100 friends than 100 rubles

Same issue as in

#351

Are you sure you now use 1.55 and its not 1.53? Maybe its good to try

#352

I'm not sure if building the rest of the environment, like QT (which came later in the instruction), or if installing the precompiled boost binaries fixed it, but the problem did go away.
sr. member
Activity: 470
Merit: 250
Better to have 100 friends than 100 rubles
Having problems building boost:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\cassey>cd c:\deps

c:\deps>cd boost*

c:\deps\boost_1_55_0>bootstrap.bat mingw
Building Boost.Build engine
'"VCVARS32.BAT"' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the batch label specified - Test_Option
'"VCVARS32.BAT"' is not recognized as an internal or external command,
operable program or batch file.
'"VCVARS32.BAT"' is not recognized as an internal or external command,
operable program or batch file.
'cl' is not recognized as an internal or external command,
operable program or batch file.

Update (and trimmed post):  I tried installing the pre-compile binaries by the final link failed.  Went back and tried building 1_53_0 and it worked fine.  For hells bell, tried it again in the 1_55_0 and the problem disappeared.  Strange, but maybe it will help someone else via Google searching in the future...

Update2:  After rebuilding, my coin linked clean - and for the VERY FIRST TIME on windows, actually worked!  Thank you SO MUCH for maintaining this thread!
sr. member
Activity: 480
Merit: 250
I managed to create altcoin.exe i altcoin-qt but when you run show me this error. Any advice?

Can't speak that language shown in the picture maybe you can translate it.

 Roll Eyes

The exception unknown software () in the application at location ()

Click on OK to terminate the program.
sr. member
Activity: 480
Merit: 250
I managed to create altcoin.exe i altcoin-qt but when you run show me this error. Any advice?




translate window

The exception unknown software () in the application at location ()

Click on OK to terminate the program.
member
Activity: 109
Merit: 10
... Anyway, I have a couple of questions to ask you not related to qt or BTC, but trading on Cryptsy.  Shoot me a private message, but preferably an email @ [email protected].  This offer is open to anyone who has Dev experience as well, Solcoin Project has just been particularly amiable and helpful.

You may shoot ME a message or an e-mail Smiley Address is in my forum signature.
olu
newbie
Activity: 10
Merit: 0
We wrestled quite a while with Windows when building the Qt 4.8 wallet for our currency Solcoin, forked from Litecoin 0.8.6.1. Depending on the versions of GCC, the Boost libraries, OpenSSL and especially BDB, the results varied greatly. The client would run perfectly on one Windows installation but fail on another.

The two recurring problems were that the wallet software either refused to start up because of failure to initialize the database, even in the case of creating a brand new such, or it would crash upon exit. We finally got the build right using GCC 4.6.3 (POSIX threading model) instead of 4.4.0 or 4.8.2, Boost 1.55, OpenSSL 1.0.1c, BDB 4.8.30 and our own build of the Qt 4.8.5 libraries, and finally linking all of it statically.

Oh god.... maybe I should try out my own currency for a bit on different systems before releasing it?  I know you are probably busy, but you mind helping out, Solcoin Project?  I would not be opposed to compensating you.  Also, you did get me to look into solcoin with your name, so maybe that's something I should have done with this account (or with another one?).  Anyway, I have a couple of questions to ask you not related to qt or BTC, but trading on Cryptsy.  Shoot me a private message, but preferably an email @ [email protected].  This offer is open to anyone who has Dev experience as well, Solcoin Project has just been particularly amiable and helpful.



PS: I don't think I'm a newbie, according to the standards set by the forum in terms of knowledge, but I definitely don't have a presence here. Sad
member
Activity: 109
Merit: 10
We wrestled quite a while with Windows when building the Qt 4.8 wallet for our currency Solcoin, forked from Litecoin 0.8.6.1. Depending on the versions of GCC, the Boost libraries, OpenSSL and especially BDB, the results varied greatly. The client would run perfectly on one Windows installation but fail on another.

The two recurring problems were that the wallet software either refused to start up because of failure to initialize the database, even in the case of creating a brand new such, or it would crash upon exit. We finally got the build right using GCC 4.6.3 (POSIX threading model) instead of 4.4.0 or 4.8.2, Boost 1.55, OpenSSL 1.0.1c, BDB 4.8.30 and our own build of the Qt 4.8.5 libraries, and finally linking all of it statically.
Pages:
Jump to: