Pages:
Author

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

newbie
Activity: 9
Merit: 0
Thanks for these instructions. This helped quickly get a solid build/dev environment up and running.
newbie
Activity: 7
Merit: 0
Shocked
at make -f makefile.release I get
Code:
ld.exe: cannot find -ldb_cxx
In the .pro file the path BDB_LIB_PATH point to the directory with db_cxx.h
also, how to I get a log from make?
If one studies the makefile, one sees that the -lxxx refers to a file in the -LpathWhateverDirectory whose name is libxxx.a Shocked

So do you have such a file in that place?  If not, then either it wasn't built, or was built but put elsewhere (or erased, renamed,...)  Can't think of too many orther possibilities Huh

Ron
I can find db_cxx.h in the "BDB_LIB_PATH=c:/deps/db-4.8.30.NC/build_unix" and when I built Berkeley DB I used --enable_cxx

Let's try again,

Did you see my message above?  I made it bigger this time Shocked  So when one sees a gcc argument like -ldb_cxx one should find a file named libdb_cxx.a there.  Notice how -lssl becomes libssl.a, etc.

Hint: one must observe and generalize from the patterns shown in the makefile.  It's all there if one just looks. Perhaps this has helped others.

Ron
So I checked in c:/deps/db-4.8.30.NC/build_unix I couldn't find db_cxx.a, did I build it wrong?  I also ran a full HD search and found nothing.  Thanks for your help!
full member
Activity: 210
Merit: 100
Nice ive looking for this. Can this be done on a VPS.
sr. member
Activity: 260
Merit: 250
i am testing to creat the bitcoin wallte
now i was completed those command
no error
Code:
set PATH=%PATH%;C:\Qt\4.8.5\bin
cd C:\bitcoin-0.8.6\
qmake bitcoin-qt.pro
mingw32-make -f Makefile.Release

then i dont know how to creat the bitcoin-qt.exe  Angry Angry Angry
i am try to use this command:
Code:
C:\bitcoin-0.8.6>strip bitcoin-qt.exe
strip: 'bitcoin-qt.exe': No such file

C:\bitcoin-0.8.6\src>strip bitcoin-qt.exe
strip: 'bitcoin-qt.exe': No such file

who was know how to build it? Huh
please told me Smiley
thanks very much! Smiley
full member
Activity: 131
Merit: 108
some of the guide is very unclear and very confusing

What parts are you referring to? I think I clearly stated that configuring the build environment on a clean vm is recommended. As you are using gcc-3.4.4-3-msys I suggest you remove C:\MinGW completely and reinstall MinGW by selecting only the packages mentioned at step 1.1 (msys-base-bin, msys-autoconf-bin, msys-automake-bin, msys-libtool-bin).
member
Activity: 84
Merit: 10
Code:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.6.2/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.6.2/configure --enable-languages=c,c++,ada,fortran,obj
c,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgo
mp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-r
untime-libs --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.6.2 (GCC)
Or some such.  Where the version, model, etc. may vary.  If you don't see that then you have to find out why.  And fix it Smiley

Ron

when I run gcc -v from inside mingw32.bat I get this

Code:
$ gcc -v
Reading specs from /usr/lib/gcc/i686-pc-msys/3.4.4/specs
Configured with: /home/cstrauss/build/gcc3/gcc-3.4.4/configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --infodir=/share/info --mandir=/share/man --libexecdir=/lib --enable-languages=c,c++
--disable-nls --enable-threads=posix --enable-sjlj-exceptions --enable-hash-synchronization --enable-libstdcxx-debug --with-newlib Thread model: posix
gcc version 3.4.4 (msys special)

sr. member
Activity: 260
Merit: 251
 Shocked
at make -f makefile.release I get
Code:
ld.exe: cannot find -ldb_cxx
In the .pro file the path BDB_LIB_PATH point to the directory with db_cxx.h
also, how to I get a log from make?
If one studies the makefile, one sees that the -lxxx refers to a file in the -LpathWhateverDirectory whose name is libxxx.a Shocked

So do you have such a file in that place?  If not, then either it wasn't built, or was built but put elsewhere (or erased, renamed,...)  Can't think of too many orther possibilities Huh

Ron
I can find db_cxx.h in the "BDB_LIB_PATH=c:/deps/db-4.8.30.NC/build_unix" and when I built Berkeley DB I used --enable_cxx

Let's try again,

Did you see my message above?  I made it bigger this time Shocked  So when one sees a gcc argument like -ldb_cxx one should find a file named libdb_cxx.a there.  Notice how -lssl becomes libssl.a, etc.

Hint: one must observe and generalize from the patterns shown in the makefile.  It's all there if one just looks. Perhaps this has helped others.

Ron
newbie
Activity: 7
Merit: 0
at make -f makefile.release I get
Code:
ld.exe: cannot find -ldb_cxx
In the .pro file the path BDB_LIB_PATH point to the directory with db_cxx.h
also, how to I get a log from make?
If one studies the makefile, one sees that the -lxxx refers to a file in the -LpathWhateverDirectory whose name is libxxx.a Shocked

So do you have such a file in that place?  If not, then either it wasn't built, or was built but put elsewhere (or erased, renamed,...)  Can't think of too many orther possibilities Huh

Ron
I can find db_cxx.h in the "BDB_LIB_PATH=c:/deps/db-4.8.30.NC/build_unix" and when I built Berkeley DB I used --enable_cxx
sr. member
Activity: 260
Merit: 251
at make -f makefile.release I get
Code:
ld.exe: cannot find -ldb_cxx
In the .pro file the path BDB_LIB_PATH point to the directory with db_cxx.h
also, how to I get a log from make?
If one studies the makefile, one sees that the -lxxx refers to a file in the -LpathWhateverDirectory whose name is libxxx.a Shocked

So do you have such a file in that place?  If not, then either it wasn't built, or was built but put elsewhere (or erased, renamed,...)  Can't think of too many orther possibilities Huh

Ron
sr. member
Activity: 260
Merit: 251
Ron, thanks for the reply, I followed this guide and I am not sure if it's all set up correctly as some of the guide is very unclear and very confusing
Which guide?  We have at least two here that I know of?
Quote
but I have everything installed and im on windows 8.1 and gcc should be in all the paths so im a bit confused about it all as to why it won't find gcc.exe
Saying it should isn't enough.  One should be able to "inject a line" anywhere in any batch file like this:
gcc -v
and you should see this response:
Code:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.6.2/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.6.2/configure --enable-languages=c,c++,ada,fortran,obj
c,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgo
mp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-r
untime-libs --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.6.2 (GCC)
Or some such.  Where the version, model, etc. may vary.  If you don't see that then you have to find out why.  And fix it Smiley

Ron
member
Activity: 84
Merit: 10
Code:
C:\deps\boost_1_55_0>bootstrap.bat mingw
Building Boost.Build engine
'gcc' is not recognized as an internal or external command,
Code:
operable program or batch file.
Failed to build Boost.Build engine.
Please consult bootstrap.log for furter diagnostics.
You can try to obtain a prebuilt binary from
   http://sf.net/project/showfiles.php?group_id=7586&package_id=72941
Also, you can file an issue at http://svn.boost.org
Please attach bootstrap.log in that case.
C:\deps\boost_1_55_0>
Make sure mingw-builds is in path then check that your gcc -v output and the one specified at step 1.6 are the same.
i dont have it.are u mean this?http://sourceforge.net/projects/mingwbuilds/files/latest/download
I have no clue what you just said, can you repeat that in english

Hello Stygian,

I think he's saying that you can get a MinGW at the link given, FWIW.

Looking at your code output above, note the bold line!  It is saying to me that when you ran your build program, whatever it may be,  your Operating System, whatever it may be (Windows of some flavor, I presume), couldn't find gcc.exe.  It is your task to determine why it (the OS) couldn't find gcc.exe.  Hint: it looks first in the current directory, then in all the directories in the path environment variable.  If it still can't find gcc.exe you will see the above message.  The path is the path that exists when and where the build program is run.  Perhaps not the path when the build program ends?  Paths are dependent upon which user for example, is logged on, etc.

Ron

Ron, thanks for the reply, I followed this guide and I am not sure if it's all set up correctly as some of the guide is very unclear and very confusing but I have everything installed and im on windows 8.1 and gcc should be in all the paths so im a bit confused about it all as to why it won't find gcc.exe
newbie
Activity: 7
Merit: 0
at make -f makefile.release I get
Code:
ld.exe: cannot find -ldb_cxx
In the .pro file the path BDB_LIB_PATH point to the directory with db_cxx.h
also, how to I get a log from make?
sr. member
Activity: 260
Merit: 251
Code:
C:\deps\boost_1_55_0>bootstrap.bat mingw
Building Boost.Build engine
'gcc' is not recognized as an internal or external command,
Code:
operable program or batch file.
Failed to build Boost.Build engine.
Please consult bootstrap.log for furter diagnostics.
You can try to obtain a prebuilt binary from
   http://sf.net/project/showfiles.php?group_id=7586&package_id=72941
Also, you can file an issue at http://svn.boost.org
Please attach bootstrap.log in that case.
C:\deps\boost_1_55_0>
Make sure mingw-builds is in path then check that your gcc -v output and the one specified at step 1.6 are the same.
i dont have it.are u mean this?http://sourceforge.net/projects/mingwbuilds/files/latest/download
I have no clue what you just said, can you repeat that in english

Hello Stygian,

I think he's saying that you can get a MinGW at the link given, FWIW.

Looking at your code output above, note the bold line!  It is saying to me that when you ran your build program, whatever it may be,  your Operating System, whatever it may be (Windows of some flavor, I presume), couldn't find gcc.exe.  It is your task to determine why it (the OS) couldn't find gcc.exe.  Hint: it looks first in the current directory, then in all the directories in the path environment variable.  If it still can't find gcc.exe you will see the above message.  The path is the path that exists when and where the build program is run.  Perhaps not the path when the build program ends?  Paths are dependent upon which user for example, is logged on, etc.

Ron
member
Activity: 84
Merit: 10
Code:

C:\deps\boost_1_55_0>bootstrap.bat mingw
Building Boost.Build engine
'gcc' is not recognized as an internal or external command,
operable program or batch file.

Failed to build Boost.Build engine.
Please consult bootstrap.log for furter diagnostics.

You can try to obtain a prebuilt binary from

   http://sf.net/project/showfiles.php?group_id=7586&package_id=72941

Also, you can file an issue at http://svn.boost.org
Please attach bootstrap.log in that case.

C:\deps\boost_1_55_0>


Make sure mingw-builds is in path then check that your gcc -v output and the one specified at step 1.6 are the same.







i dont have it.are u mean this?http://sourceforge.net/projects/mingwbuilds/files/latest/download


I have no clue what you just said, can you repeat that in english
RJX
legendary
Activity: 1078
Merit: 1003
Succes!

Three days ago I did not know about boost or perl, and I still don't really, but now I have a working bitcoin wallet!

Amazing, thanks a lot!


 Grin

sr. member
Activity: 260
Merit: 251
Hey ron!
...
Code:
./build\leveldb.o:leveldb.cpp:(.text+0x425): undefined reference to `leveldb::Ne
wBloomFilterPolicy(int)'
...
Hello GivecoinDan

Looking at message #466
...
All pretty long-winded, but the idea is that if one builds the libleveldb.a & libmemenv.a with some code, one should check what it is compiling and what it is putting where? 
...
Ron
Hello Dan,

Thanks for the kind words.  I wanted to respond, but it seems your post, which was #476 as I remember, is gone!  I've seen that happen when editing a response.

Just an update on the MSVC++ project.  The code is good,  runs in debug or release, doesn't abort on illegal C++ code anymore.  The only issue is that it needs to "conform" to the "bitcoin standard" as to what is a legitimate transaction.  It seems that in block 284,028 ~2/4/2014 there was a transaction that there is a disagreement about the legality between gcc bitcoind.exe and MSVC bitcoind.exe.  I need to find that discrepancy.  I don't know how to go about that just yet, but like all things "bitcoin" there should be a way.

Ron

legendary
Activity: 1156
Merit: 1000
I sent you a PM

I am the lead of a new altcoin team, AppleBytes.

I successfully compiled the windows wallet, but it crashes when started.

Are you or anyone else on this thread interested in helping?

Payment will be made in Bitcoin.

We are also looking for help with the MAC wallet, I compiled it and it runs on my MAC, but not other peoples.
And are looking for someone to develop a pool server.

Details on AppleBytes here: Announce Thread


sr. member
Activity: 260
Merit: 251
Hey ron!

Interestingly enough, I've been having a very similar issue while trying to compile a test derivative of the litecoin master. I'm willing to bet the previous poster does have libmemenv.a and liblevel.a included in the directory.

I'm having a similar issue with this, and having done the old "copy and replace" from both Litecoin and Maxcoin from the leveldb path inside of src. I've looked through all the calls in leveldb.cpp and then followed them to the respective files(env, filterpolicy, status) and they're all there... Definitely seems like an include problem, but what the heck it could be is beyond me! Any thoughts?


Code:
./build\leveldb.o:leveldb.cpp:(.text+0x425): undefined reference to `leveldb::Ne
wBloomFilterPolicy(int)'
./build\leveldb.o:leveldb.cpp:(.text+0x6a3): undefined reference to `leveldb::En
v::Default()'
./build\leveldb.o:leveldb.cpp:(.text+0x768): undefined reference to `leveldb::St
atus::ToString() const'
./build\leveldb.o:leveldb.cpp:(.text+0x913): undefined reference to `leveldb::St
atus::ToString() const'
c:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bi
n/ld.exe: ./build\leveldb.o: bad reloc address 0x2 in section `.text$_ZN13leveld
b_errorD1Ev[__ZN13leveldb_errorD1Ev]'
collect2.exe: error: ld returned 1 exit status
Makefile.Release:287: recipe for target 'release\Altcoin-qt.exe' failed
mingw32-make: *** [release\Altcoin-qt.exe] Error 1

Hello GivecoinDan

Looking at message #466 (https://bitcointalksearch.org/topic/m.5627966), note that g++ is looking to link leveldb stuff using -L"C:/testcoin/src/leveldb", which is what I hi-lited in message #470.

If you "mix" leveldb "src" trees from MAXCoin, Litecoin etc., are you sure you have the same versions (of leveldb) among the sources and libraries?  I don't think that the code has changed from levelDB 1.9 to 1.12 to 1.15 but I'm not sure.

Also, note that the "include" lines in the bitcoin leveldb.h & leveldb.cpp sources are like this:
Code:
#include
#include

and

Code:
#include
#include
#include
#include

which means that the "include path" the gcc needs to see is
-IC:/testcoin/src/leveldb/include -IC:/testcoin/src/leveldb/helpers as in message #466

But if you are creating those libraries, then you need an additional path of -IC:/testcoin/src/leveldb so that the leveldb source files can "find each other" in their includes! See block_builder.cc for example, which looks like:

Code:
#include "table/block_builder.h"

#include
#include
#include "leveldb/comparator.h"
#include "leveldb/table_builder.h"
#include "util/coding.h"

All pretty long-winded, but the idea is that if one builds the libleveldb.a & libmemenv.a with some code, one should check what it is compiling and what it is putting where?  

Of course, all of this nonsense vanishes when one just compiles and links one's Bitcoin or *coin sources in MSVC++ Shocked  I have a set of multi-threaded static libraries placed where I please, and I just point MSVS at them and it figures out all the details!  I will announce here that I have compiled and ran daemons successfully for Bitcoin, Maxcoin, Auroracoin and YACoin all using the same libraries, that were built once and then one basically forgets about them.  Ah, full screen debugging Grin  Here's a  hint:

Consider the line of code from bitcoin's (*coin's?) CScriptCompressor class member function Serialize() in script.h:

s << CFlatData(&script[0], &script[script.size()]);

What happens, or should happen, when:
1. one references &script[0] and script.size() is 0?
2. one references script[script.size()] when script.size() is any value including 0?

The answer is that what happens is unknown!!!

At least according to my reading on vector templates.  And sure enough, P.J. Plauger agrees when running in debug mode (LOL).  How many years has "loose" vector<> (especially), list<> and map<> code been in the Bitcoin sources?  Four years.  I think it is time to make the code correct, don't you think?

Ron
full member
Activity: 210
Merit: 100
Code:

C:\deps\boost_1_55_0>bootstrap.bat mingw
Building Boost.Build engine
'gcc' is not recognized as an internal or external command,
operable program or batch file.

Failed to build Boost.Build engine.
Please consult bootstrap.log for furter diagnostics.

You can try to obtain a prebuilt binary from

   http://sf.net/project/showfiles.php?group_id=7586&package_id=72941

Also, you can file an issue at http://svn.boost.org
Please attach bootstrap.log in that case.

C:\deps\boost_1_55_0>


Make sure mingw-builds is in path then check that your gcc -v output and the one specified at step 1.6 are the same.







i dont have it.are u mean this?http://sourceforge.net/projects/mingwbuilds/files/latest/download
full member
Activity: 131
Merit: 108
Hello all,

It has been over 3 months, and three *coind.exe's later and finally fixing a bug in the MSVC windows version of the leveldb code,  I can say that bitcoind.exe is a full, pure MSVC++ product (again?).

Much more to follow...

Ron

Interesting, keep us informed Wink


Code:

C:\deps\boost_1_55_0>bootstrap.bat mingw
Building Boost.Build engine
'gcc' is not recognized as an internal or external command,
operable program or batch file.

Failed to build Boost.Build engine.
Please consult bootstrap.log for furter diagnostics.

You can try to obtain a prebuilt binary from

   http://sf.net/project/showfiles.php?group_id=7586&package_id=72941

Also, you can file an issue at http://svn.boost.org
Please attach bootstrap.log in that case.

C:\deps\boost_1_55_0>

Make sure mingw-builds is in path then check that your gcc -v output and the one specified at step 1.6 are the same.
Pages:
Jump to: