Pages:
Author

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

newbie
Activity: 25
Merit: 0
@Nitro

After what me and Ron came through, perhaps it is a good idea to expend your post to include the following import pointers:

* Make sure that your MSYS bin directory precedes any other Windows system directory, like c:\Windows\System32 (this is necessary if you want to use the Unix find and not the Windows variant).
* The WSAPOLLFD structure bug in MinGW (not really bug, it is just missing)
* UnregisterWaitEx() problems when not setting _WIN32_WINNT
(also look for a reference to the two above here: http://stackoverflow.com/questions/20957727/boostasio-unregisterwaitex-has-not-been-declared)

Also, Ron mentioned that makefile.mingw is not longer used and there are more problems (Perl is unnecessary and so is Python too I believe, although I'm not sure about Python). It would also be nice if you explain a bit about the inner workings of the building process (i.e. why this utility or command), because as it is now it is sending a wrong message to people. I don't only want to know what to do, but also why to do it.

Don't get me wrong, I really appreciate this post and I think it is very useful, but it can be made so much better.

(we could work together a bit and also update the build_msw file, should be much more accessible than this forum thread)
Jori.
full member
Activity: 131
Merit: 108
Also it is worth mentioning that the instructions to build boost on this thread caused troubles later on - I had to go back and build boost and add --with-regex

Bitcoin doesn't need Boost.Regex, HoboNickels does.


Berkely database did not come with libdb_cxx.a

When configured and compiled correctly you will have both libdb.a and libdb_cxx.a, try cleaning and compiling again. HoboNickels seems to compile just fine on my build system.
legendary
Activity: 1330
Merit: 1000
Blockchain Developer
Getting this error when building hobonickels.   Not quite sure what to do now, some googling says something about libraries being out of order but I don't think this is the problem.

Code:
./build\db.o:db.cpp:(.text+0x21e): undefined reference to `DbEnv::DbEnv(unsigned
 int)'
./build\db.o:db.cpp:(.text+0x18d6): undefined reference to `DbEnv::close(unsigne
d int)'
./build\db.o:db.cpp:(.text+0x18f7): undefined reference to `DbEnv::DbEnv(unsigne
d int)'
./build\db.o:db.cpp:(.text+0x190d): undefined reference to `DbEnv::remove(char c
onst*, unsigned int)'
./build\db.o:db.cpp:(.text+0x1918): undefined reference to `DbEnv::~DbEnv()'
./build\db.o:db.cpp:(.text+0x1927): undefined reference to `DbEnv::strerror(int)
'
./build\db.o:db.cpp:(.text+0x1947): undefined reference to `DbEnv::~DbEnv()'
./build\db.o:db.cpp:(.text+0x19a6): undefined reference to `DbEnv::~DbEnv()'
./build\db.o:db.cpp:(.text+0x1a40): undefined reference to `DbEnv::~DbEnv()'
./build\db.o:db.cpp:(.text+0x1db9): undefined reference to `DbEnv::set_lg_dir(ch
ar const*)'
./build\db.o:db.cpp:(.text+0x1e0b): undefined reference to `DbEnv::set_cachesize
(unsigned int, unsigned int, int)'
./build\db.o:db.cpp:(.text+0x1e1c): undefined reference to `DbEnv::set_lg_bsize(
unsigned int)'
./build\db.o:db.cpp:(.text+0x1e2d): undefined reference to `DbEnv::set_lg_max(un
signed int)'
./build\db.o:db.cpp:(.text+0x1e3e): undefined reference to `DbEnv::set_lk_max_lo
cks(unsigned int)'
./build\db.o:db.cpp:(.text+0x1e4f): undefined reference to `DbEnv::set_lk_max_ob
jects(unsigned int)'
./build\db.o:db.cpp:(.text+0x1e89): undefined reference to `DbEnv::set_errfile(_
iobuf*)'
./build\db.o:db.cpp:(.text+0x1eb3): undefined reference to `DbEnv::set_flags(uns
igned int, int)'
./build\db.o:db.cpp:(.text+0x1ecc): undefined reference to `DbEnv::set_flags(uns
igned int, int)'
./build\db.o:db.cpp:(.text+0x1ee5): undefined reference to `DbEnv::log_set_confi
g(unsigned int, int)'
./build\db.o:db.cpp:(.text+0x1f09): undefined reference to `DbEnv::open(char con
st*, unsigned int, int)'
./build\db.o:db.cpp:(.text+0x1fcc): undefined reference to `DbEnv::strerror(int)
'
./build\db.o:db.cpp:(.text+0x23f3): undefined reference to `Db::Db(DbEnv*, unsig
ned int)'
./build\db.o:db.cpp:(.text+0x2540): undefined reference to `DbMpoolFile::set_fla
gs(unsigned int, int)'
./build\db.o:db.cpp:(.text+0x280b): undefined reference to `DbEnv::set_cachesize
(unsigned int, unsigned int, int)'
./build\db.o:db.cpp:(.text+0x281c): undefined reference to `DbEnv::set_lg_bsize(
unsigned int)'
./build\db.o:db.cpp:(.text+0x282d): undefined reference to `DbEnv::set_lg_max(un
signed int)'
./build\db.o:db.cpp:(.text+0x283e): undefined reference to `DbEnv::set_lk_max_lo
cks(unsigned int)'
./build\db.o:db.cpp:(.text+0x284f): undefined reference to `DbEnv::set_lk_max_ob
jects(unsigned int)'
./build\db.o:db.cpp:(.text+0x2868): undefined reference to `DbEnv::set_flags(uns
igned int, int)'
./build\db.o:db.cpp:(.text+0x2881): undefined reference to `DbEnv::log_set_confi
g(unsigned int, int)'
./build\db.o:db.cpp:(.text+0x28a2): undefined reference to `DbEnv::open(char con
st*, unsigned int, int)'
./build\db.o:db.cpp:(.text+0x2ab2): undefined reference to `Db::Db(DbEnv*, unsig
ned int)'
./build\db.o:db.cpp:(.text+0x2ada): undefined reference to `Db::verify(char cons
t*, char const*, std::ostream*, unsigned int)'
./build\db.o:db.cpp:(.text+0x2b2c): undefined reference to `Db::~Db()'
./build\db.o:db.cpp:(.text+0x2bf2): undefined reference to `Db::~Db()'
./build\db.o:db.cpp:(.text+0x2df8): undefined reference to `Db::Db(DbEnv*, unsig
ned int)'
./build\db.o:db.cpp:(.text+0x2e24): undefined reference to `Db::verify(char cons
t*, char const*, std::ostream*, unsigned int)'
./build\db.o:db.cpp:(.text+0x2e48): undefined reference to `Db::~Db()'
./build\db.o:db.cpp:(.text+0x3266): undefined reference to `Db::~Db()'
./build\db.o:db.cpp:(.text+0x33ad): undefined reference to `DbTxn::abort()'
./build\db.o:db.cpp:(.text+0x3472): undefined reference to `DbEnv::txn_checkpoin
t(unsigned int, unsigned int, unsigned int)'
./build\db.o:db.cpp:(.text+0x3637): undefined reference to `DbEnv::txn_checkpoin
t(unsigned int, unsigned int, unsigned int)'
./build\db.o:db.cpp:(.text+0x3657): undefined reference to `DbEnv::lsn_reset(cha
r const*, unsigned int)'
./build\db.o:db.cpp:(.text+0x36e4): undefined reference to `DbEnv::dbremove(DbTx
n*, char const*, char const*, unsigned int)'
./build\db.o:db.cpp:(.text+0x396e): undefined reference to `Db::Db(DbEnv*, unsig
ned int)'
./build\db.o:db.cpp:(.text+0x3af1): undefined reference to `Dbt::Dbt()'
./build\db.o:db.cpp:(.text+0x3af9): undefined reference to `Dbt::Dbt()'
./build\db.o:db.cpp:(.text+0x3b27): undefined reference to `Dbc::get(Dbt*, Dbt*,
 unsigned int)'
./build\db.o:db.cpp:(.text+0x3c24): undefined reference to `Dbt::~Dbt()'
./build\db.o:db.cpp:(.text+0x3c2f): undefined reference to `Dbt::~Dbt()'
./build\db.o:db.cpp:(.text+0x3dae): undefined reference to `Dbt::Dbt(void*, unsi
gned int)'
./build\db.o:db.cpp:(.text+0x3ddb): undefined reference to `Dbt::Dbt(void*, unsi
gned int)'
./build\db.o:db.cpp:(.text+0x3e1f): undefined reference to `Dbt::~Dbt()'
./build\db.o:db.cpp:(.text+0x3e2a): undefined reference to `Dbt::~Dbt()'
./build\db.o:db.cpp:(.text+0x3f37): undefined reference to `Dbc::close()'
./build\db.o:db.cpp:(.text+0x4030): undefined reference to `Db::Db(DbEnv*, unsig
ned int)'
./build\db.o:db.cpp:(.text+0x4052): undefined reference to `Db::remove(char cons
t*, char const*, unsigned int)'
./build\db.o:db.cpp:(.text+0x406e): undefined reference to `Db::Db(DbEnv*, unsig
ned int)'
./build\db.o:db.cpp:(.text+0x409b): undefined reference to `Db::rename(char cons
t*, char const*, char const*, unsigned int)'
./build\db.o:db.cpp:(.text+0x40b1): undefined reference to `Db::~Db()'
./build\db.o:db.cpp:(.text+0x40bc): undefined reference to `Db::~Db()'
./build\db.o:db.cpp:(.text+0x40eb): undefined reference to `Dbc::close()'
./build\db.o:db.cpp:(.text+0x41d4): undefined reference to `Dbt::~Dbt()'
./build\db.o:db.cpp:(.text+0x41e3): undefined reference to `Dbt::~Dbt()'
./build\db.o:db.cpp:(.text+0x423a): undefined reference to `Dbt::~Dbt()'
./build\db.o:db.cpp:(.text+0x424c): undefined reference to `Dbt::~Dbt()'
./build\db.o:db.cpp:(.text+0x42a1): undefined reference to `Db::~Db()'
./build\db.o:db.cpp:(.text+0x42ac): undefined reference to `Db::~Db()'
./build\db.o:db.cpp:(.text+0x43f9): undefined reference to `DbEnv::txn_checkpoin
t(unsigned int, unsigned int, unsigned int)'
./build\db.o:db.cpp:(.text+0x44ba): undefined reference to `DbEnv::lsn_reset(cha
r const*, unsigned int)'
./build\db.o:db.cpp:(.text+0x4550): undefined reference to `DbEnv::log_archive(c
har***, unsigned int)'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bi
n/ld.exe: ./build\db.o: bad reloc address 0x6c4 in section `.gcc_except_table'
collect2.exe: error: ld returned 1 exit status
Makefile.Release:290: recipe for target 'release\HoboNickels-qt.exe' failed
mingw32-make: *** [release\HoboNickels-qt.exe] Error 1


EDIT I found an error in my qt.pro file where I had deleted two lines. This removed the problem.

Also it is worth mentioning that the instructions to build boost on this thread caused troubles later on - I had to go back and build boost and add --with-regex and that the Berkely database did not come with libdb_cxx.a - so I had to build a prior version of the database and has to place libdb_cxx.a into i686-w64-mingw32/4.8.2/ folder in order to get passed cxx errors.
sr. member
Activity: 336
Merit: 250
Have a look at your png_CFLAGS: -I../libgpng-1.6.9/.libs

To many errors and way to many typo's..  need a break it seems. Back to fight another day tomorrow. It still wont compile but it is clear now that ill look at it again myself first with some fresh eyes tomorrow Smiley

But thanks for helping and quick response to both of you.

Look at the following line:
Code:
gcc.exe: error: ../libpng-1.6.9/.libs/libpng16a: No such file or directory
That is the problem. Shouldn't libpng16a be libpng16.a?

Also, please do not use pictures. Just copy the output and format is as a code block. Much easier to copy from  Wink.

Will do so next time. Will also remove any info not usefull for others tomorrow. Thanks.
full member
Activity: 131
Merit: 108
Have a look at your png_CFLAGS: -I../libgpng-1.6.9/.libs
sr. member
Activity: 336
Merit: 250

Look at the following line:
Code:
gcc.exe: error: ../libpng-1.6.9/.libs/libpng16a: No such file or directory
That is the problem. Shouldn't libpng16a be libpng16.a?

Yeah it should. Figured that out around same time your were typing prob. But thanks. Altough now im getting erros on the make.... sigh.... to be continued! =)
newbie
Activity: 25
Merit: 0
newbie
Activity: 25
Merit: 0
step3 got an error:

$ ./autogen.sh
./autogen.sh: line 5: autoreconf: command not found

and the configure,return:

sh: ./configure: No such file or directory



Have you installed the following packages correctly?

Quote
msys-base-bin
msys-autoconf-bin
msys-automake-bin
msys-libtool-bin
newbie
Activity: 25
Merit: 0
Hi Ron,

After being set on a trail by your ar tv output, I finally found the sinister thing that was causing all the trouble, which no sane soul could have figured out (yes I'm insane). In the file that is generating the platform specific parameters for the building of leveldb (build_detect_platform), I found the following line that searches for the files to be compiled:

Code:
PORTABLE_FILES=`find $DIRS $PRUNE_TEST -o $PRUNE_BENCH -o $PRUNE_TOOL -o -name '*.cc' -print | sort | sed "s,^$PREFIX/,," | tr "\n" " "`

I immediately realized that Windows too has a find.exe and that the PATH variable on Windows starts with the system directories, like system32 where find.exe is located. Putting my MSYS bin directory ahead of the system32 directory solved it. I was now able to compile and archive all necessary files and get similar output as you for ar tv. After that, bitcoind compiled with no problems.

Thanks a lot Ron for your help here, and I hope to see you soon in some other thread  Smiley!

Jori.
sr. member
Activity: 260
Merit: 251
Quote
Quote
...
Hello Jori,

A lot of "digital water" has flowed under the makefile "bridge" since nitrogenetics message # 1 in this forum! See
https://bitcointalksearch.org/topic/m.1587734
He has updated that message many times since the original March 05, 2013 message.  I saved the original and still refer to it. Wink  And since it has been updated, the comments back and forth about it, in this forum, may not seem to make sense, since they (the comments) refer to an original message # 1 that you cannot see. Sad

But there are timeless comments (ahem!) on the art of compiling-linking software that should guide one to a working .exe file.  See messages # 45 (page 3), 68 & 75 (page 4), 85 (page 5), 102 (page 6) and bypassing all the bending over backwards that gcc qmake and makefile must do to run on or target Windows, message # 550 & 552 (page 28).  These last two answer all the issues I posed in message # 85 on July 13, 2013.  It's a fait accompli since I have now built working versions of 3 other *coind.exe's and bitcoind.exe (YACoind.exe, Auroracoind.exe and Maxcoind.exe) all on MSVC++ Express all using the same four static multi-threaded libraries: Boost 1.53, OpenSSL 1.0.1g (!), Berkeley DB 4.8.30 and levelDB 1.13.  It's pretty much build it (the libraries) and forget it.  Also it's very easy to swap out a library.  For example swapping out OpenSSL 1.0.1g for 1.0.1e or 1.0.1c was pretty much a no brainer.  Same for flavors of Boost.  Is 1.54 or 1.55 better than 1.53? Is level DB 1.16 better than 1.15, 1.13, 1.12 as far as bitcoin is concerned?  On Windows? 

Getting off the soapbox and high horse now... and going back to the nose to the grindstone, salt mine, dungeon...  Actually, to making the "how to build the libraries" video series for MSVC++.  Imagine a video game walk through Grin  GUI manipulation is much easier to understand by seeing rather than reading "how to".

Ron

Hi Ron,

OP = Original Poster and I was referring to nitrogenetics original message (post #1).

I really appreciate your time and help, but I did not find anything similar to the problems I'm having (i.e. libleveldb.a and libmemenv.a are available but do not get linked).

One thing I thought of yesterday: maybe the files were compiled and archived successfully, but do not contain all necessary content. It could be that while making leveldb, some essential files for bitcoin were skipped. Running ar tv libmemenv.a and ar tv libleveldb.a reveals:

Code:
rw-rw-rw- 0/0 432255 Apr 15 16:56 2014 memenv.o

and

Code:
rw-rw-rw- 0/0  21322 Apr 15 16:56 2014 port_win.o

respectively. Could you verify if you have similar output?

Thanks in advance,
Jori.
Hello Jori,

When I last built levelDB for gcc bitcoin building, it was last July it seems and my output is:
Code:
...c\leveldb  9:42:14.73 >ar tv libmemenv.a
rw-rw-rw- 0/0  33085 Jul 01 16:04 2013 memenv.o

...c\leveldb  9:42:44.03 >ar tv libleveldb.a
rw-rw-rw- 0/0   4119 Jul 01 16:04 2013 builder.o
rw-rw-rw- 0/0  26496 Jul 01 16:04 2013 c.o
rw-rw-rw- 0/0 104625 Mar 12 13:14 2014 db_impl.o
rw-rw-rw- 0/0  10257 Jul 01 16:04 2013 db_iter.o
rw-rw-rw- 0/0  10402 Jul 01 16:04 2013 dbformat.o
rw-rw-rw- 0/0   6155 Jul 01 16:04 2013 filename.o
rw-rw-rw- 0/0   6827 Jul 01 16:04 2013 log_reader.o
rw-rw-rw- 0/0   3044 Jul 01 16:04 2013 log_writer.o
rw-rw-rw- 0/0  15096 Jul 01 16:04 2013 memtable.o
rw-rw-rw- 0/0  45012 Jul 01 16:04 2013 repair.o
rw-rw-rw- 0/0   5934 Mar 11 11:57 2014 table_cache.o
rw-rw-rw- 0/0  21177 Jul 01 16:04 2013 version_edit.o
rw-rw-rw- 0/0  97689 Jul 01 16:04 2013 version_set.o
rw-rw-rw- 0/0   7759 Jul 01 16:04 2013 write_batch.o
rw-rw-rw- 0/0  15021 Jul 01 16:04 2013 block.o
rw-rw-rw- 0/0   3788 Jul 01 16:04 2013 block_builder.o
rw-rw-rw- 0/0   6070 Jul 01 16:04 2013 filter_block.o
rw-rw-rw- 0/0   4500 Jul 01 16:04 2013 format.o
rw-rw-rw- 0/0   4944 Jul 01 16:04 2013 iterator.o
rw-rw-rw- 0/0   6462 Jul 01 16:04 2013 merger.o
rw-rw-rw- 0/0   9652 Jul 01 16:04 2013 table.o
rw-rw-rw- 0/0  11333 Jul 01 16:04 2013 table_builder.o
rw-rw-rw- 0/0   7157 Jul 01 16:04 2013 two_level_iterator.o
rw-rw-rw- 0/0   2724 Jul 01 16:04 2013 arena.o
rw-rw-rw- 0/0   3500 Jul 01 16:04 2013 bloom.o
rw-rw-rw- 0/0   7497 Jul 01 16:04 2013 cache.o
rw-rw-rw- 0/0   3422 Jul 01 16:04 2013 coding.o
rw-rw-rw- 0/0   4748 Jul 01 16:04 2013 comparator.o
rw-rw-rw- 0/0   5503 Jul 01 16:04 2013 crc32c.o
rw-rw-rw- 0/0  20556 Jul 01 16:04 2013 env.o
rw-rw-rw- 0/0    288 Jul 01 16:04 2013 env_posix.o
rw-rw-rw- 0/0  48635 Jul 01 16:04 2013 env_win.o
rw-rw-rw- 0/0   1540 Jul 01 16:04 2013 filter_policy.o
rw-rw-rw- 0/0    770 Jul 01 16:04 2013 hash.o
rw-rw-rw- 0/0   4853 Jul 01 16:04 2013 histogram.o
rw-rw-rw- 0/0   2545 Jul 01 16:04 2013 logging.o
rw-rw-rw- 0/0    772 Jul 01 16:04 2013 options.o
rw-rw-rw- 0/0   2511 Jul 01 16:04 2013 status.o
rw-rw-rw- 0/0   4087 Jul 01 16:04 2013 port_win.o

"Alas, poor Jori! I knew him, levelDB; a library of infinite jest..."
So I would say that something is amiss with your levelDB library build.

Ron
newbie
Activity: 43
Merit: 0
step3 got an error:

$ ./autogen.sh
./autogen.sh: line 5: autoreconf: command not found

and the configure,return:

sh: ./configure: No such file or directory

newbie
Activity: 25
Merit: 0
Quote
Quote
...
Hello Jori,

A lot of "digital water" has flowed under the makefile "bridge" since nitrogenetics message # 1 in this forum! See
https://bitcointalksearch.org/topic/m.1587734
He has updated that message many times since the original March 05, 2013 message.  I saved the original and still refer to it. Wink  And since it has been updated, the comments back and forth about it, in this forum, may not seem to make sense, since they (the comments) refer to an original message # 1 that you cannot see. Sad

But there are timeless comments (ahem!) on the art of compiling-linking software that should guide one to a working .exe file.  See messages # 45 (page 3), 68 & 75 (page 4), 85 (page 5), 102 (page 6) and bypassing all the bending over backwards that gcc qmake and makefile must do to run on or target Windows, message # 550 & 552 (page 28).  These last two answer all the issues I posed in message # 85 on July 13, 2013.  It's a fait accompli since I have now built working versions of 3 other *coind.exe's and bitcoind.exe (YACoind.exe, Auroracoind.exe and Maxcoind.exe) all on MSVC++ Express all using the same four static multi-threaded libraries: Boost 1.53, OpenSSL 1.0.1g (!), Berkeley DB 4.8.30 and levelDB 1.13.  It's pretty much build it (the libraries) and forget it.  Also it's very easy to swap out a library.  For example swapping out OpenSSL 1.0.1g for 1.0.1e or 1.0.1c was pretty much a no brainer.  Same for flavors of Boost.  Is 1.54 or 1.55 better than 1.53? Is level DB 1.16 better than 1.15, 1.13, 1.12 as far as bitcoin is concerned?  On Windows? 

Getting off the soapbox and high horse now... and going back to the nose to the grindstone, salt mine, dungeon...  Actually, to making the "how to build the libraries" video series for MSVC++.  Imagine a video game walk through Grin  GUI manipulation is much easier to understand by seeing rather than reading "how to".

Ron

Hi Ron,

OP = Original Poster and I was referring to nitrogenetics original message (post #1).

I really appreciate your time and help, but I did not find anything similar to the problems I'm having (i.e. libleveldb.a and libmemenv.a are available but do not get linked).

One thing I thought of yesterday: maybe the files were compiled and archived successfully, but do not contain all necessary content. It could be that while making leveldb, some essential files for bitcoin were skipped. Running ar tv libmemenv.a and ar tv libleveldb.a reveals:

Code:
rw-rw-rw- 0/0 432255 Apr 15 16:56 2014 memenv.o

and

Code:
rw-rw-rw- 0/0  21322 Apr 15 16:56 2014 port_win.o

respectively. Could you verify if you have similar output?

Thanks in advance,
Jori.
newbie
Activity: 43
Merit: 0
I have got an error like this in step2.6:
configure: error: zlib not installed.

who can tell me where can find and how to install zlib.
sr. member
Activity: 260
Merit: 251
...
You get points for not being on drive c Grin

Ron
Haha, that my post, so thanks for the points.

It is impossible that gcc is not able to find the library, because I explicitly linked it in the specs file.
Nothing is impossible in computer science!
Quote
I'm not following OP's
Who's OP and where are his/her instructions?
Quote
instructions to the letter because they are confusing and lack detail (I do admire the initiative, but I'm not going to run any command or install every program just because someone on the internet says so).
Bravo.  Me too.
Quote
There are also some errors in the post (you do not need to install perl for example, because it comes already with every MSYS or Git install).
Apparantly not all perl's are alike, at least as far as Qt or perhaps qmake are concerned!?  Seems like way too much install baggage required to do a lowly compile for Windows
Quote
I also wonder why he is talking about a makefile.mingw and how to patch it, because I can't find it.
makefile.mingw is(was) the makefile used to create bitcoind.exe before the changeover to autogen, which happened between versions 0.8.6 & 0.9.0
Quote
All help is appreciated.

Jori.
Hello Jori,

A lot of "digital water" has flowed under the makefile "bridge" since nitrogenetics message # 1 in this forum! See
https://bitcointalksearch.org/topic/m.1587734
He has updated that message many times since the original March 05, 2013 message.  I saved the original and still refer to it. Wink  And since it has been updated, the comments back and forth about it, in this forum, may not seem to make sense, since they (the comments) refer to an original message # 1 that you cannot see. Sad

But there are timeless comments (ahem!) on the art of compiling-linking software that should guide one to a working .exe file.  See messages # 45 (page 3), 68 & 75 (page 4), 85 (page 5), 102 (page 6) and bypassing all the bending over backwards that gcc qmake and makefile must do to run on or target Windows, message # 550 & 552 (page 28).  These last two answer all the issues I posed in message # 85 on July 13, 2013.  It's a fait accompli since I have now built working versions of 3 other *coind.exe's and bitcoind.exe (YACoind.exe, Auroracoind.exe and Maxcoind.exe) all on MSVC++ Express all using the same four static multi-threaded libraries: Boost 1.53, OpenSSL 1.0.1g (!), Berkeley DB 4.8.30 and levelDB 1.13.  It's pretty much build it (the libraries) and forget it.  Also it's very easy to swap out a library.  For example swapping out OpenSSL 1.0.1g for 1.0.1e or 1.0.1c was pretty much a no brainer.  Same for flavors of Boost.  Is 1.54 or 1.55 better than 1.53? Is level DB 1.16 better than 1.15, 1.13, 1.12 as far as bitcoin is concerned?  On Windows? 

Getting off the soapbox and high horse now... and going back to the nose to the grindstone, salt mine, dungeon...  Actually, to making the "how to build the libraries" video series for MSVC++.  Imagine a video game walk through Grin  GUI manipulation is much easier to understand by seeing rather than reading "how to".

Ron

newbie
Activity: 25
Merit: 0
Traverse to: $BOOSTDIR/tools/build/v2/engine/build.bat

What do you mean exactly?
newbie
Activity: 25
Merit: 0

Hello operezm,

It looks like the linker-loader in gcc, is not finding the library libleveldb.a  So even though you built it, did gcc see a line like
-L"$(CURDIR)/leveldb" \ where $(CURDIR) is correct at the moment of linking?  I just took that line from nitrogenetics message #1 here
https://bitcointalksearch.org/topic/building-headless-bitcoin-and-bitcoin-qt-on-windows-149479
in this forum, in the section Additional notes for Bitcoin 0.8.6

You get points for not being on drive c Grin

Ron

Haha, that my post, so thanks for the points.

It is impossible that gcc is not able to find the library, because I explicitly linked it in the specs file.

I'm not following OP's instructions to the letter because they are confusing and lack detail (I do admire the initiative, but I'm not going to run any command or install every program just because someone on the internet says so). There are also some errors in the post (you do not need to install perl for example, because it comes already with every MSYS or Git install).

I also wonder why he is talking about a makefile.mingw and how to patch it, because I can't find it.

All help is appreciated.

Jori.
newbie
Activity: 5
Merit: 0
@operezm, I still haven't figured it out. Adding the library and include folders of leveldb in the GCC specs file did not help either.

Could anyone explain the error format to me? It seems confusing.

Hi Jori,

I ended up deploying a fresh Win7 Pro 32bit Virtual Machine, followed the OP instructions to the letter and I was able to link it properly this time. 

sr. member
Activity: 260
Merit: 251
I followed this guide loosely and successfully compiled OpenSSL, BDB and Boost (compiling for the headless version, so no QT, protoc, libpng or qrencode needed). Then I set the appropriate include and library files in the gcc specs file, so that they could be found and ran autogen.sh and configure. All went well and a makefile was generated in the root directory, which I ran. It compiled all modules successfully and then tried to build bitcoind (I believe), outputting:
Code:
Making all in src
make[1]: Entering directory `/i/code/bitcoin_git/bitcoin/src'
make  all-recursive ...
This failed however with a host of errors (I included the head only, but I think the problem can be derived from this, as the other errors are very alike):
Code:
libbitcoin_server.a(main.o): In function `CLevelDBBatch':
i:\code\bitcoin_git\bitcoin\src/leveldbwrapper.h:25: undefined reference to `leveldb::WriteBatch::WriteBatch()'
...
libbitcoin_server.a(txdb.o): In function `~CLevelDBBatch':
i:\code\bitcoin_git\bitcoin\src/leveldbwrapper.h:25: undefined reference to `leveldb::WriteBatch::~WriteBatch()'
...
I checked if libleveldb.a and libmemenv.a were available, and they were (located at .../src/leveldb).

Could anyone point me in the right direction?
I followed the instructions to the letter and I'm having this same problem when linking bitcoind.exe.  Does anyone know what I'm missing here?

Hello operezm,

It looks like the linker-loader in gcc, is not finding the library libleveldb.a  So even though you built it, did gcc see a line like
-L"$(CURDIR)/leveldb" \ where $(CURDIR) is correct at the moment of linking?  I just took that line from nitrogenetics message #1 here
https://bitcointalksearch.org/topic/building-headless-bitcoin-and-bitcoin-qt-on-windows-149479
in this forum, in the section Additional notes for Bitcoin 0.8.6

You get points for not being on drive c Grin

Ron
newbie
Activity: 25
Merit: 0
@operezm, I still haven't figured it out. Adding the library and include folders of leveldb in the GCC specs file did not help either.

Could anyone explain the error format to me? It seems confusing.
newbie
Activity: 5
Merit: 0
I followed this guide loosely and successfully compiled OpenSSL, BDB and Boost (compiling for the headless version, so no QT, protoc, libpng or qrencode needed). Then I set the appropriate include and library files in the gcc specs file, so that they could be found and ran autogen.sh and configure. All went well and a makefile was generated in the root directory, which I ran. It compiled all modules successfully and then tried to build bitcoind (I believe), outputting:

Code:
Making all in src
make[1]: Entering directory `/i/code/bitcoin_git/bitcoin/src'
make  all-recursive
make[2]: Entering directory `/i/code/bitcoin_git/bitcoin/src'
Making all in .
make[3]: Entering directory `/i/code/bitcoin_git/bitcoin/src'
  CXXLD  bitcoind.exe

This failed however with a host of errors (I included the head only, but I think the problem can be derived from this, as the other errors are very alike):

Code:
libbitcoin_server.a(main.o): In function `CLevelDBBatch':
i:\code\bitcoin_git\bitcoin\src/leveldbwrapper.h:25: undefined reference to `leveldb::WriteBatch::WriteBatch()'
libbitcoin_server.a(main.o): In function `~CLevelDBBatch':
i:\code\bitcoin_git\bitcoin\src/leveldbwrapper.h:25: undefined reference to `leveldb::WriteBatch::~WriteBatch()'
i:\code\bitcoin_git\bitcoin\src/leveldbwrapper.h:25: undefined reference to `leveldb::WriteBatch::~WriteBatch()'
libbitcoin_server.a(leveldbwrapper.o): In function `Z11HandleErrorRKN7leveldb6StatusE':
i:\code\bitcoin_git\bitcoin\src/leveldbwrapper.cpp:18: undefined reference to `leveldb::Status::ToString() const'
libbitcoin_server.a(leveldbwrapper.o): In function `ZN15CLevelDBWrapperC2ERKN5boost10filesystem4pathEjbb':
i:\code\bitcoin_git\bitcoin\src/leveldbwrapper.cpp:38: undefined reference to `leveldb::Options::Options()'
libbitcoin_server.a(leveldbwrapper.o): In function `GetOptions':
i:\code\bitcoin_git\bitcoin\src/leveldbwrapper.cpp:29: undefined reference to `leveldb::Options::Options()'
i:\code\bitcoin_git\bitcoin\src/leveldbwrapper.cpp:30: undefined reference to `leveldb::NewLRUCache(unsigned int)'
i:\code\bitcoin_git\bitcoin\src/leveldbwrapper.cpp:32: undefined reference to `leveldb::NewBloomFilterPolicy(int)'
libbitcoin_server.a(leveldbwrapper.o): In function `ZN15CLevelDBWrapperC2ERKN5boost10filesystem4pathEjbb':
i:\code\bitcoin_git\bitcoin\src/leveldbwrapper.cpp:52: undefined reference to `leveldb::DestroyDB(std::string const&, leveldb::Options const&)'
i:\code\bitcoin_git\bitcoin\src/leveldbwrapper.cpp:57: undefined reference to `leveldb::DB::Open(leveldb::Options const&, std::string const&, leveldb::DB**)'
i:\code\bitcoin_git\bitcoin\src/leveldbwrapper.cpp:47: undefined reference to `leveldb::Env::Default()'
libbitcoin_server.a(txdb.o): In function `CLevelDBBatch':
i:\code\bitcoin_git\bitcoin\src/leveldbwrapper.h:25: undefined reference to `leveldb::WriteBatch::WriteBatch()'
libbitcoin_server.a(txdb.o): In function `Write':
i:\code\bitcoin_git\bitcoin\src/leveldbwrapper.h:44: undefined reference to `leveldb::WriteBatch::Put(leveldb::Slice const&, leveldb::Slice const&)'
libbitcoin_server.a(txdb.o): In function `~CLevelDBBatch':
i:\code\bitcoin_git\bitcoin\src/leveldbwrapper.h:25: undefined reference to `leveldb::WriteBatch::~WriteBatch()'
i:\code\bitcoin_git\bitcoin\src/leveldbwrapper.h:25: undefined reference to `leveldb::WriteBatch::~WriteBatch()'
...
...
...

I checked if libleveldb.a and libmemenv.a were available, and they were (located at .../src/leveldb).

Could anyone point me in the right direction?

I followed the instructions to the letter and I'm having this same problem when linking bitcoind.exe.  Does anyone know what I'm missing here?
Pages:
Jump to: