Bitcoin Forum
April 26, 2024, 11:52:34 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [solved] Need help compiling Gavin's bitcoin-miningsim on Ubuntu  (Read 1305 times)
weex (OP)
Legendary
*
Offline Offline

Activity: 1102
Merit: 1014



View Profile
June 14, 2015, 06:03:05 AM
Last edit: June 14, 2015, 07:18:48 AM by weex
 #1

I got https://github.com/gavinandresen/bitcoin_miningsim and then apt-got libboost-dev. I changed the makefile to use g++ and this is what I get.

Code:
$ make
g++ -std=c++11 -I/usr/local/include -L/usr/local/lib -O2 -o mining_simulator main.cpp scheduler.cpp -lboost_program_options-mt -lboost_system-mt -lboost_thread-mt -lboost_chrono-mt
/usr/bin/ld: cannot find -lboost_program_options-mt
/usr/bin/ld: cannot find -lboost_system-mt
/usr/bin/ld: cannot find -lboost_thread-mt
/usr/bin/ld: cannot find -lboost_chrono-mt
collect2: error: ld returned 1 exit status
make: *** [scheduler] Error 1

Where do I go from here?
1714175554
Hero Member
*
Offline Offline

Posts: 1714175554

View Profile Personal Message (Offline)

Ignore
1714175554
Reply with quote  #2

1714175554
Report to moderator
1714175554
Hero Member
*
Offline Offline

Posts: 1714175554

View Profile Personal Message (Offline)

Ignore
1714175554
Reply with quote  #2

1714175554
Report to moderator
1714175554
Hero Member
*
Offline Offline

Posts: 1714175554

View Profile Personal Message (Offline)

Ignore
1714175554
Reply with quote  #2

1714175554
Report to moderator
"Bitcoin: mining our own business since 2009" -- Pieter Wuille
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714175554
Hero Member
*
Offline Offline

Posts: 1714175554

View Profile Personal Message (Offline)

Ignore
1714175554
Reply with quote  #2

1714175554
Report to moderator
weex (OP)
Legendary
*
Offline Offline

Activity: 1102
Merit: 1014



View Profile
June 14, 2015, 07:18:29 AM
 #2

It was simple enough. -mt isn't needed on any of these so after dropping that it compiled fine.
tspacepilot
Legendary
*
Offline Offline

Activity: 1456
Merit: 1076


I may write code in exchange for bitcoins.


View Profile
June 17, 2015, 08:16:13 AM
 #3

It was simple enough. -mt isn't needed on any of these so after dropping that it compiled fine.

Was the "mt' already in the Makefile that you downloaded with the project or was that something that you added?

A tip I just learned when getting ld missing errors is that you can run:

$ ldd -v name_of_library

to see what paths are being searched.  This was helpful for me in compiling a recent application on a system where I had no root rights and had to have all these headers and shared libraries in my userspace.
weex (OP)
Legendary
*
Offline Offline

Activity: 1102
Merit: 1014



View Profile
June 17, 2015, 09:21:32 AM
 #4

The -mt was already in the makefile from Gavin's github repo.
tspacepilot
Legendary
*
Offline Offline

Activity: 1456
Merit: 1076


I may write code in exchange for bitcoins.


View Profile
June 17, 2015, 03:06:39 PM
 #5

The -mt was already in the makefile from Gavin's github repo.

That's very strange, right?  It would seem to mean that Gavin's repo's Makefile is broken, or that he's using a different distribution than you.  But Ubuntu uses the same package names as debian, which I think is pretty standard.  Oftentimes, Makefiles get generated by ./configure or ./autoconf.sh.  Did you run ./configure or ./autoconf after installing libboost?
weex (OP)
Legendary
*
Offline Offline

Activity: 1102
Merit: 1014



View Profile
June 17, 2015, 05:19:19 PM
 #6

The -mt was already in the makefile from Gavin's github repo.

That's very strange, right?  It would seem to mean that Gavin's repo's Makefile is broken, or that he's using a different distribution than you.  But Ubuntu uses the same package names as debian, which I think is pretty standard.  Oftentimes, Makefiles get generated by ./configure or ./autoconf.sh.  Did you run ./configure or ./autoconf after installing libboost?

In the repo, he said "I don't do autotools" and that he was using OS X. The project is pretty minimal so I don't expect lots of handholding in making it easy to run. It turned out not too be that hard.

I find C++ with templating and boost pretty cumbersome to read and I may do a sim in python just so it's easier to explore some of the details. Overall I think his is pretty decent...perhaps being able to explore less reliability in network links, getting into some sort of mempool and fee modeling with some miners making smaller blocks, would be enough incentive to get started on a sim.
tspacepilot
Legendary
*
Offline Offline

Activity: 1456
Merit: 1076


I may write code in exchange for bitcoins.


View Profile
June 17, 2015, 05:41:17 PM
 #7

The -mt was already in the makefile from Gavin's github repo.

That's very strange, right?  It would seem to mean that Gavin's repo's Makefile is broken, or that he's using a different distribution than you.  But Ubuntu uses the same package names as debian, which I think is pretty standard.  Oftentimes, Makefiles get generated by ./configure or ./autoconf.sh.  Did you run ./configure or ./autoconf after installing libboost?

In the repo, he said "I don't do autotools" and that he was using OS X. The project is pretty minimal so I don't expect lots of handholding in making it easy to run. It turned out not too be that hard.

I find C++ with templating and boost pretty cumbersome to read and I may do a sim in python just so it's easier to explore some of the details. Overall I think his is pretty decent...perhaps being able to explore less reliability in network links, getting into some sort of mempool and fee modeling with some miners making smaller blocks, would be enough incentive to get started on a sim.

Cool, using OSX explains the difference in package names.  For some reason, I had just assumed that all of the C++ code from the "serious" developers would be targeting GNU/Linux.  'scuse me.  --TSP
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!