Jump to content

Building From Source

Started By presstab , Apr 03 2014 05:52 PM

  • Please log in to reply
37 replies to this topic

#16

presstab
  • presstab
  • HyperStake Developer
  • DEVELOPER
  • PipPipPip
  • 376 posts
  • 22 topics
    • Time Online: 16d 10h 13m 20s

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


  • 0

Cryptocointalk.com doesn't endorse any ads. Warning: ads my be illegal or untrustworthy in your jurisdiction. Advertising Here.

#17

presstab
  • presstab
  • HyperStake Developer
  • DEVELOPER
  • PipPipPip
  • 376 posts
  • 22 topics
    • Time Online: 16d 10h 13m 20s

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?


  • 0

#18

Tranz
  • Tranz
  • Hobonickels Developer
  • CODING DEVELOPER
  • PipPipPipPip
  • 872 posts
  • 34 topics
    • Time Online: 24d 3h 50m 45s

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.


  • 0

#19

presstab
  • presstab
  • HyperStake Developer
  • DEVELOPER
  • PipPipPip
  • 376 posts
  • 22 topics
    • Time Online: 16d 10h 13m 20s

Well my next item I will be googling is cross compiling then. I will let you know if I make any progress with it.

 

I think I am going to give it a try with M Cross Environment http://stackoverflow.com/questions/10934683/how-do-i-configure-qt-for-cross-compilation-from-linux-to-windows-target/13211922#13211922


  • 0

#20

presstab
  • presstab
  • HyperStake Developer
  • DEVELOPER
  • PipPipPip
  • 376 posts
  • 22 topics
    • Time Online: 16d 10h 13m 20s

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.


  • 0

#21

presstab
  • presstab
  • HyperStake Developer
  • DEVELOPER
  • PipPipPip
  • 376 posts
  • 22 topics
    • Time Online: 16d 10h 13m 20s

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

  • 0

#22

presstab
  • presstab
  • HyperStake Developer
  • DEVELOPER
  • PipPipPip
  • 376 posts
  • 22 topics
    • Time Online: 16d 10h 13m 20s

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

  • 0

#23

presstab
  • presstab
  • HyperStake Developer
  • DEVELOPER
  • PipPipPip
  • 376 posts
  • 22 topics
    • Time Online: 16d 10h 13m 20s

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


  • 0

#24

Tranz
  • Tranz
  • Hobonickels Developer
  • CODING DEVELOPER
  • PipPipPipPip
  • 872 posts
  • 34 topics
    • Time Online: 24d 3h 50m 45s

I have not been able to get a stable exe using the 64 bit compiler. I have to use mingw 32 bit.


  • 1

#25

presstab
  • presstab
  • HyperStake Developer
  • DEVELOPER
  • PipPipPip
  • 376 posts
  • 22 topics
    • Time Online: 16d 10h 13m 20s

Good to know. I am going to try and get everything going on a 32 bit virtual box and see how it goes. 


  • 0

#26

Tranz
  • Tranz
  • Hobonickels Developer
  • CODING DEVELOPER
  • PipPipPipPip
  • 872 posts
  • 34 topics
    • Time Online: 24d 3h 50m 45s

I never had to change my box, I just used a different compiler and I was good.


  • 0

#27

presstab
  • presstab
  • HyperStake Developer
  • DEVELOPER
  • PipPipPip
  • 376 posts
  • 22 topics
    • Time Online: 16d 10h 13m 20s

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.


  • 0

#28

Tranz
  • Tranz
  • Hobonickels Developer
  • CODING DEVELOPER
  • PipPipPipPip
  • 872 posts
  • 34 topics
    • Time Online: 24d 3h 50m 45s

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


  • 0

#29

presstab
  • presstab
  • HyperStake Developer
  • DEVELOPER
  • PipPipPip
  • 376 posts
  • 22 topics
    • Time Online: 16d 10h 13m 20s

I am using qt5, I would love to look at the instruction set.


  • 0

#30

presstab
  • presstab
  • HyperStake Developer
  • DEVELOPER
  • PipPipPip
  • 376 posts
  • 22 topics
    • Time Online: 16d 10h 13m 20s

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.


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users