Bitcoin Forum
May 05, 2024, 10:20:42 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Can't Build r80 from SVN  (Read 11399 times)
lachesis (OP)
Full Member
***
Offline Offline

Activity: 210
Merit: 104


View Profile
June 05, 2010, 01:03:34 AM
 #1

I can't build r80 from the SVN with -O2 in the makefile. I'm running Ubuntu 10.04 LTS 64-bit on an Intel Core 2. If I remove -O2 (switch back to -O0), it builds fine.

The problem seems to be line 15 of net.h. My googling suggests that statement-expressions, some non-standard, GCC-only extension to C++, are not allowed outside of functions at that level of optimization. htons is implemented as a statement-expression for linux. I managed to get it to build by replacing the htos(8333) with 0x8D20, which is 8333 in network byte order. This compiles and runs fine on my Intel processor, but probably wouldn't work on a big endian processor like a PowerPC.

Is anybody else experiencing this bug?

Also, I'm somewhat disappointed. -O2 didn't help me generate hashes any faster. Perhaps I'll try -O3.

Bitcoin Calculator | Scallion | GPG Key | WoT Rating | 1QGacAtYA7E8V3BAiM7sgvLg7PZHk5WnYc
1714947642
Hero Member
*
Offline Offline

Posts: 1714947642

View Profile Personal Message (Offline)

Ignore
1714947642
Reply with quote  #2

1714947642
Report to moderator
1714947642
Hero Member
*
Offline Offline

Posts: 1714947642

View Profile Personal Message (Offline)

Ignore
1714947642
Reply with quote  #2

1714947642
Report to moderator
"If you don't want people to know you're a scumbag then don't be a scumbag." -- margaritahuyan
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714947642
Hero Member
*
Offline Offline

Posts: 1714947642

View Profile Personal Message (Offline)

Ignore
1714947642
Reply with quote  #2

1714947642
Report to moderator
1714947642
Hero Member
*
Offline Offline

Posts: 1714947642

View Profile Personal Message (Offline)

Ignore
1714947642
Reply with quote  #2

1714947642
Report to moderator
1714947642
Hero Member
*
Offline Offline

Posts: 1714947642

View Profile Personal Message (Offline)

Ignore
1714947642
Reply with quote  #2

1714947642
Report to moderator
laszlo
Full Member
***
Offline Offline

Activity: 199
Merit: 2072


View Profile
June 05, 2010, 03:12:48 AM
 #2

You did the right thing.. none of it works on big endian anyway.

BC: 157fRrqAKrDyGHr1Bx3yDxeMv8Rh45aUet
D҉ataWraith
Member
**
Offline Offline

Activity: 60
Merit: 10



View Profile
June 05, 2010, 04:36:11 PM
 #3

Is anybody else experiencing this bug?

Also, I'm somewhat disappointed. -O2 didn't help me generate hashes any faster. Perhaps I'll try -O3.

Yeah, I had the same problem.

BtW: If you look at the makefile, sha.{h,cpp} are already compiled -O3; using a higher optimization level for the remainder of the program is probably not going to help much.

1NvcPV6xi6yqo5yg8aWSkNdasPSAsGtt1m
laszlo
Full Member
***
Offline Offline

Activity: 199
Merit: 2072


View Profile
June 05, 2010, 06:32:13 PM
 #4

-O2 is generally the preferred optimization for gcc, -O3 can produce larger code which is slower, but you should experiment around with it.. it also seems to depend on the time of day or the phases of the moon for me at least, some days I'm getting a lot more hashes per second.

BC: 157fRrqAKrDyGHr1Bx3yDxeMv8Rh45aUet
Xunie
Full Member
***
Offline Offline

Activity: 132
Merit: 101



View Profile
June 05, 2010, 07:05:24 PM
 #5

Please note that revision 77 is buildable (by default) and 78 isn't I believe.

And can you next time wait for your answer in IRC?
I mean, you asked your question twice, we're just not in the room 24/7! Wink

Ignore this: 734d417914faa443d74e8205f639dfb0f79fdc44988ecae44db31e5636525afe

Caffeinism -- a toxic condition caused by excessive ingestion of coffee and other caffeine-containing beverage.
lachesis (OP)
Full Member
***
Offline Offline

Activity: 210
Merit: 104


View Profile
June 05, 2010, 07:40:54 PM
 #6

I'm not in the room 24/7 either. I decided to go off IRC and to the forums so I wouldn't need to wait around all day.

I need to learn some more C++. There are a lot of things that would improve bitcoin like encrypted wallet files, built-in performance monitoring, RPC extension, etc. Is there any system for submitting patches for inclusion in the SVN and/or default builds?

I don't mean to come accross as confrontational. I love Bitcoin and just want to help improve it.

Bitcoin Calculator | Scallion | GPG Key | WoT Rating | 1QGacAtYA7E8V3BAiM7sgvLg7PZHk5WnYc
laszlo
Full Member
***
Offline Offline

Activity: 199
Merit: 2072


View Profile
June 06, 2010, 06:55:31 PM
 #7

Some notes on how to build the linux client.  I used a 64 bit system but the process is almost identical for i386 linux.

http://heliacal.net/~solar/bitcoin/bitcoin-linuxbuild.pdf


BC: 157fRrqAKrDyGHr1Bx3yDxeMv8Rh45aUet
lachesis (OP)
Full Member
***
Offline Offline

Activity: 210
Merit: 104


View Profile
June 06, 2010, 10:57:43 PM
 #8

Some notes on how to build the linux client.  I used a 64 bit system but the process is almost identical for i386 linux.
That's my process as well, although I apply a variety of patches to things before hand. And I have boost and I think libdb from Ubuntu's repos.

Bitcoin Calculator | Scallion | GPG Key | WoT Rating | 1QGacAtYA7E8V3BAiM7sgvLg7PZHk5WnYc
satoshi
Founder
Sr. Member
*
qt
Offline Offline

Activity: 364
Merit: 6723


View Profile
June 14, 2010, 10:40:14 PM
 #9

Sorry, I didn't test compile on linux the last few revisions.

Reverted makefile.unix.
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!