presstab

Building From Source

38 posts in this topic

Wells it took a whole 20 minutes to get ./hobonickelsd going in Ubuntu 13.10

ubuntu@ip:/hbn-master/src$ sudo ./hobonickelsd
ubuntu@ip:/hbn-master/src$ HoboNickels server starting
ubuntu@:/hbn-master/src$ sudo ./hobonickelsd getinfo
{
    "version" : "v1.3.8.0-gda0cbf9-hobo",
    "protocolversion" : 70004,
    "blocks" : 27411,
    "timeoffset" : -3,
    "moneysupply" : 137052.00400000,
    "connections" : 16,
    "wallets" : 1,
    "walletversion" : 60001,
    "proxy" : "",
    "ip" : 
    "difficulty" : 0.30045388,
    "testnet" : false,
    "paytxfee" : 0.00100000,
    "mininput" : 0.00100000,
    "errors" : ""
}
 

 

Now going to try and get the gui to build

Share this post


Link to post
Share on other sites

I was able to get the HoboNickels executable to build properly.  Since I only have SSH with this linux server it doesn't do me a whole lot of good. Does anyone know if it is possible to compile the source from linux but have it build a windows exe?

Share this post


Link to post
Share on other sites

Yes this is called cross compiling. And I think btc might be doing this specifically to fix an issue with creating a 64 bit windows client. I have not played with cross compiling. But I may have to in the future.

Share this post


Link to post
Share on other sites

Working on compiling from windows right now rather than cross compiling.  I am getting stuck at this error:

C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bi
n/ld.exe: cannot find -lboost_system-mgw46-mt-sd-1_54
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bi
n/ld.exe: cannot find -lboost_filesystem-mgw46-mt-sd-1_54
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bi
n/ld.exe: cannot find -lboost_program_options-mgw46-mt-sd-1_54
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bi
n/ld.exe: cannot find -lboost_thread-mgw46-mt-sd-1_54
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bi
n/ld.exe: cannot find -lboost_regex-mgw46-mt-sd-1_54
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bi
n/ld.exe: cannot find -ldb_cxx
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bi
n/ld.exe: cannot find -lboost_regex-mgw48-mt-s-1_55
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

Think it might be from an outdated line in HoboNickels-qt.pro - line 16
LIBS += -lboost_system-mgw46-mt-sd-1_54 -lboost_filesystem-mgw46-mt-sd-1_54 -lboost_program_options-mgw46-mt-sd-1_54 -lboost_thread-mgw46-mt-sd-1_54 -lboost_regex-mgw46-mt-sd-1_54

 

I am going to try changing the 54's to 55's and seeing if that fixes the problem.

 

Edit - same problem but with 55's instead of 54's... see if i can find much on google - I am guessing that boost wasn't installed correctly.

Share this post


Link to post
Share on other sites

Alright, got passed part of that problem - the mgw46-mt-sd-1_54 should be replaced with mgw48-mt-s-1_55 in each of those occurrences. 

 

Which brings me to the newest errors to work on

 

C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bi
n/ld.exe: cannot find -ldb_cxx
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bi
n/ld.exe: cannot find -lboost_regex-mgw48-mt-s-1_55
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

Alright so I tried the mingw makefile for the daemon to see if I could get around these errors. Here is where I am getting stuck on that makefile

 

db.a C:/HoboNickels-master/src/leveldb/libmemenv.a
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bi
n/ld.exe: cannot find -ldb_cxx
collect2.exe: error: ld returned 1 exit status
makefile.mingw:128: recipe for target 'HoboNickelsd.exe' failed
mingw32-make: *** [HoboNickelsd.exe] Error 1

Share this post


Link to post
Share on other sites

Alright so I tried the mingw makefile for the daemon to see if I could get around these errors. Here is where I am getting stuck on that makefile

 

db.a C:/HoboNickels-master/src/leveldb/libmemenv.a
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bi
n/ld.exe: cannot find -ldb_cxx
collect2.exe: error: ld returned 1 exit status
makefile.mingw:128: recipe for target 'HoboNickelsd.exe' failed
mingw32-make: *** [HoboNickelsd.exe] Error 1

 

 

Ok so it seems like for some reason the berkely database version I was using did not come with libdb_cxx.a in it. It seems like makefile.mingw is way out of date - I can tell by the libs that it uses - maybe cxx is changed for the current version. Anyways I compiled an older version and moved cxx into the i686-w64-mingw32/4.8.2/ folder and it got passed that part of the compile now.  I am not quite sure whether or not this will cause any errors though.

 

As for the "cannot find -lboost_regex-mgw48-mt-s-1_55" error. I used the instructions from https://bitcointalk.org/index.php?topic=149479.0 to build boost. These instructions did not build regex.  So when building boost this needs to be added "--with-regex" and then you will see the correct regex file in /deps/boost_1_55_0/stage/lib

 

 

So I am happy I was able to move passed those errors, but of course that only brings me to the newest set of errors to troubleshoot:

C:/hbn2/HoboNickels-master/src/leveldb/libleveldb.a(env_win.o):env_win.cc:(.text+0x1392): undefined reference to `_imp__PathFileExistsW@4'
C:/hbn2/HoboNickels-master/src/leveldb/libleveldb.a(env_win.o):env_win.cc:(.text
+0x2fdd): undefined reference to `_imp__PathFileExistsW@4'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bi
n/ld.exe: C:/hbn2/HoboNickels-master/src/leveldb/libleveldb.a(env_win.o): bad re
loc address 0x6 in section `.text.startup'
collect2.exe: error: ld returned 1 exit status
makefile.mingw:129: recipe for target 'HoboNickelsd.exe' failed
mingw32-make: *** [HoboNickelsd.exe] Error 1

And the new problems on the QT

 

./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

Share this post


Link to post
Share on other sites

Alright got it to compile - I had deleted two lines from the qt.pro that caused the previous problems. Also other problems were being caused by using the wrong version of gcc.  Now I believe I have on of the libs correctly built and the right version.

 

I have the exe, but it does not run. Now to figure out why.  My changes to the qt.pro are here https://github.com/presstab/HoboNickels/commit/9e10834d33a08182180ab94cc907ca199b3816e7#diff-ebfcfa46e7082d02fa93ea2e11dafac9

Share this post


Link to post
Share on other sites

Hmm I am going to have to do some thinking on this one. The boost system is built with mingw so I am guessing that means recompiling boost with a different compiler. Nitrogenetics told me that he had successfully built HoboNickels. I will see if I can get some pointers and if all else fails, I will have to compile with something else. Also I have seen that with some coins it is possible to cross compile from gitian.

Share this post


Link to post
Share on other sites

I have 2 sets of instructions I can show you. One for QT5. an the other for QT4. Which are you using?

Share this post


Link to post
Share on other sites

So this just happened..... finally!  With major help from Nitrogenetics.

oK8NJNc.jpg

 

I did have to use 1.4.0.0 because the latest commits weren't working. I will add them one at a time and keep messing around with the code. Happy day for me.

 

EDIT - Got everything working now up to 1.4.0.1 - haven't added the latest two commits but those don't seem very significant.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.