Bitcoin Forum
May 29, 2024, 05:40:06 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: bitcoin 0.11 on openindiana  (Read 685 times)
spiccioli (OP)
Legendary
*
Offline Offline

Activity: 1378
Merit: 1003

nec sine labore


View Profile
October 22, 2015, 06:09:55 PM
 #1

Hi,

I've been able to build bitcoind on Solaris/OpenSolaris/OpenIndiana for the last couple of years with just minor changes and some googling; most of the times the  lack of the "std::" namespace in front of each map<> was the problem.

I'm not proficient in C++, so I have to say that I don't understand most of its source code  Roll Eyes

Today I've tried to build branch 0.11 on latest OpenIndiana (Hipster.201510) with GCC 4.8.5 and I've just stumbled on my first problem with C++

In src/serialize.h I get

Code:
  CXX    libbitcoinconsensus_la-ecwrapper.lo
In file included from ecwrapper.cpp:7:0:
serialize.h: In function 'unsigned int GetSerializeSize(int8_t, int, int)':
serialize.h:190:21: error: redefinition of 'unsigned int GetSerializeSize(int8_t, int, int)'
 inline unsigned int GetSerializeSize(int8_t a,    int, int=0) { return 1; }
                     ^
serialize.h:189:21: error: 'unsigned int GetSerializeSize(char, int, int)' previously defined here
 inline unsigned int GetSerializeSize(char a,      int, int=0) { return 1; }

The same error on lines 201/202 and 213/214, so given the comment present on lines 201 and 213 (and the fact that int8_t and char should be the same here) I've just commented out those lines like this

Code:
//inline unsigned int GetSerializeSize(char a,      int, int=0) { return 1; }
inline unsigned int GetSerializeSize(int8_t a,    int, int=0) { return 1; }
inline unsigned int GetSerializeSize(uint8_t a,   int, int=0) { return 1; }
....

//template<typename Stream> inline void Serialize(Stream& s, char a,         int, int=0) { ser_writedata8(s, a); } // TODO Get rid of bare char
template<typename Stream> inline void Serialize(Stream& s, int8_t a,       int, int=0) { ser_writedata8(s, a); }
template<typename Stream> inline void Serialize(Stream& s, uint8_t a,      int, int=0) { ser_writedata8(s, a); }
...

and I'm now able to go past this error.

Question: is this something due to my GCC version or what?

spiccioli
spiccioli (OP)
Legendary
*
Offline Offline

Activity: 1378
Merit: 1003

nec sine labore


View Profile
October 26, 2015, 08:29:48 PM
 #2

Ok,

I can confirm, it builds OK and starts syncing without errors.

I'll deploy it on my node next week and report if problems arise.

spiccioli


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!