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.
Sorry, I didn’t test compile on linux the last few revisions.
15,518 total views, 1 views todayhttps://bitcointalk.org/index.php?topic=163.msg1590#msg1590