Bitcoin Forum
May 01, 2024, 03:55:50 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: protobuf ? previous implicit declaration ? Error message  (Read 1057 times)
wbchenlan99 (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
September 16, 2016, 02:42:58 AM
 #1

When I upgraded my MAC OSX/10.11.6 &  xcode/version 8.0 and complied bitcoin sources, I got error message as follows:

 CXX      qt/qt_libbitcoinqt_a-askpassphrasedialog.o
In file included from qt/askpassphrasedialog.cpp:13:
In file included from ./qt/walletmodel.h:8:
In file included from ./qt/paymentrequestplus.h:10:
In file included from ./base58.h:17:
In file included from ./chainparams.h:10:
In file included from ./consensus/params.h:9:
In file included from ./uint256.h:15:
In file included from ./crypto/common.h:14:
In file included from ./compat/endian.h:14:
./compat/byteswap.h:19:17: error: C++ requires a type specifier for all declarations
inline uint16_t bswap_16(uint16_t x)
                ^
/usr/local/Cellar/protobuf/3.0.2/include/google/protobuf/stubs/port.h:298:21: note: expanded from macro 'bswap_16'
#define bswap_16(x) OSSwapInt16(x)
                    ^
/usr/include/libkern/OSByteOrder.h:54:24: note: expanded from macro 'OSSwapInt16'
#define OSSwapInt16(x)  __DARWIN_OSSwapInt16(x)
                        ^
/usr/include/libkern/_OSByteOrder.h:72:19: note: expanded from macro '__DARWIN_OSSwapInt16'
    ((__uint16_t)(__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt16(x) : _OSSwapInt16(x)))
                  ^
In file included from qt/askpassphrasedialog.cpp:13:
In file included from ./qt/walletmodel.h:8:
In file included from ./qt/paymentrequestplus.h:10:
In file included from ./base58.h:17:
In file included from ./chainparams.h:10:
In file included from ./consensus/params.h:9:
In file included from ./uint256.h:15:
In file included from ./crypto/common.h:14:
In file included from ./compat/endian.h:14:
./compat/byteswap.h:19:17: error: expected ')'
/usr/local/Cellar/protobuf/3.0.2/include/google/protobuf/stubs/port.h:298:21: note: expanded from macro 'bswap_16'
#define bswap_16(x) OSSwapInt16(x)
                    ^
/usr/include/libkern/OSByteOrder.h:54:24: note: expanded from macro 'OSSwapInt16'
#define OSSwapInt16(x)  __DARWIN_OSSwapInt16(x)
                        ^
/usr/include/libkern/_OSByteOrder.h:72:43: note: expanded from macro '__DARWIN_OSSwapInt16'
    ((__uint16_t)(__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt16(x) : _OSSwapInt16(x)))
                                          ^
./compat/byteswap.h:19:17: note: to match this '('
/usr/local/Cellar/protobuf/3.0.2/include/google/protobuf/stubs/port.h:298:21: note: expanded from macro 'bswap_16'
#define bswap_16(x) OSSwapInt16(x)
                    ^
/usr/include/libkern/OSByteOrder.h:54:24: note: expanded from macro 'OSSwapInt16'
#define OSSwapInt16(x)  __DARWIN_OSSwapInt16(x)
                        ^
/usr/include/libkern/_OSByteOrder.h:72:18: note: expanded from macro '__DARWIN_OSSwapInt16'
    ((__uint16_t)(__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt16(x) : _OSSwapInt16(x)))
                 ^
In file included from qt/askpassphrasedialog.cpp:13:
In file included from ./qt/walletmodel.h:8:
In file included from ./qt/paymentrequestplus.h:10:
In file included from ./base58.h:17:
In file included from ./chainparams.h:10:
In file included from ./consensus/params.h:9:
In file included from ./uint256.h:15:
In file included from ./crypto/common.h:14:
In file included from ./compat/endian.h:14:
./compat/byteswap.h:21:13: error: use of undeclared identifier 'x'
    return (x >> Cool | ((x & 0x00ff) << Cool;
            ^
./compat/byteswap.h:21:25: error: use of undeclared identifier 'x'
    return (x >> Cool | ((x & 0x00ff) << Cool;
                        ^
./compat/byteswap.h:26:17: error: expected ')'
inline uint32_t bswap_32(uint32_t x)
                ^
/usr/local/Cellar/protobuf/3.0.2/include/google/protobuf/stubs/port.h:299:21: note: expanded from macro 'bswap_32'
#define bswap_32(x) OSSwapInt32(x)
                    ^
/usr/include/libkern/OSByteOrder.h:55:24: note: expanded from macro 'OSSwapInt32'
#define OSSwapInt32(x)  __DARWIN_OSSwapInt32(x)
                        ^
/usr/include/libkern/_OSByteOrder.h:75:30: note: expanded from macro '__DARWIN_OSSwapInt32'
    (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt32(x) : _OSSwapInt32(x))
                             ^
./compat/byteswap.h:26:17: note: to match this '('
/usr/local/Cellar/protobuf/3.0.2/include/google/protobuf/stubs/port.h:299:21: note: expanded from macro 'bswap_32'
#define bswap_32(x) OSSwapInt32(x)
                    ^
/usr/include/libkern/OSByteOrder.h:55:24: note: expanded from macro 'OSSwapInt32'
#define OSSwapInt32(x)  __DARWIN_OSSwapInt32(x)
                        ^
/usr/include/libkern/_OSByteOrder.h:75:5: note: expanded from macro '__DARWIN_OSSwapInt32'
    (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt32(x) : _OSSwapInt32(x))
    ^
In file included from qt/askpassphrasedialog.cpp:13:
In file included from ./qt/walletmodel.h:8:
In file included from ./qt/paymentrequestplus.h:10:
In file included from ./base58.h:17:
In file included from ./chainparams.h:10:
In file included from ./consensus/params.h:9:
In file included from ./uint256.h:15:
In file included from ./crypto/common.h:14:
In file included from ./compat/endian.h:14:
./compat/byteswap.h:26:17: error: functions that differ only in their return type cannot be overloaded
inline uint32_t bswap_32(uint32_t x)
                ^
/usr/local/Cellar/protobuf/3.0.2/include/google/protobuf/stubs/port.h:299:21: note: expanded from macro 'bswap_32'
#define bswap_32(x) OSSwapInt32(x)
                    ^
/usr/include/libkern/OSByteOrder.h:55:24: note: expanded from macro 'OSSwapInt32'
#define OSSwapInt32(x)  __DARWIN_OSSwapInt32(x)
                        ^
/usr/include/libkern/_OSByteOrder.h:75:6: note: expanded from macro '__DARWIN_OSSwapInt32'
    (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt32(x) : _OSSwapInt32(x))
     ^
/usr/local/Cellar/protobuf/3.0.2/include/google/protobuf/stubs/port.h:337:47: note: previous implicit declaration is here
  static uint16 FromHost16(uint16 x) { return bswap_16(x); }
                                              ^
/usr/local/Cellar/protobuf/3.0.2/include/google/protobuf/stubs/port.h:298:21: note: expanded from macro 'bswap_16'
#define bswap_16(x) OSSwapInt16(x)
                    ^
/usr/include/libkern/OSByteOrder.h:54:24: note: expanded from macro 'OSSwapInt16'
#define OSSwapInt16(x)  __DARWIN_OSSwapInt16(x)
                        ^
/usr/include/libkern/_OSByteOrder.h:72:19: note: expanded from macro '__DARWIN_OSSwapInt16'
    ((__uint16_t)(__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt16(x) : _OSSwapInt16(x)))
                  ^
In file included from qt/askpassphrasedialog.cpp:13:
In file included from ./qt/walletmodel.h:8:
In file included from ./qt/paymentrequestplus.h:10:
In file included from ./base58.h:17:
In file included from ./chainparams.h:10:
In file included from ./consensus/params.h:9:
In file included from ./uint256.h:15:
In file included from ./crypto/common.h:14:
In file included from ./compat/endian.h:14:
./compat/byteswap.h:34:17: error: expected ')'
inline uint64_t bswap_64(uint64_t x)
                ^
/usr/local/Cellar/protobuf/3.0.2/include/google/protobuf/stubs/port.h:300:21: note: expanded from macro 'bswap_64'
#define bswap_64(x) OSSwapInt64(x)
                    ^
/usr/include/libkern/OSByteOrder.h:56:24: note: expanded from macro 'OSSwapInt64'
#define OSSwapInt64(x)  __DARWIN_OSSwapInt64(x)
                        ^
/usr/include/libkern/_OSByteOrder.h:78:30: note: expanded from macro '__DARWIN_OSSwapInt64'
    (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
                             ^
./compat/byteswap.h:34:17: note: to match this '('
/usr/local/Cellar/protobuf/3.0.2/include/google/protobuf/stubs/port.h:300:21: note: expanded from macro 'bswap_64'
#define bswap_64(x) OSSwapInt64(x)
                    ^
/usr/include/libkern/OSByteOrder.h:56:24: note: expanded from macro 'OSSwapInt64'
#define OSSwapInt64(x)  __DARWIN_OSSwapInt64(x)
                        ^
/usr/include/libkern/_OSByteOrder.h:78:5: note: expanded from macro '__DARWIN_OSSwapInt64'
    (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
    ^
In file included from qt/askpassphrasedialog.cpp:13:
In file included from ./qt/walletmodel.h:8:
In file included from ./qt/paymentrequestplus.h:10:
In file included from ./base58.h:17:
In file included from ./chainparams.h:10:
In file included from ./consensus/params.h:9:
In file included from ./uint256.h:15:
In file included from ./crypto/common.h:14:
In file included from ./compat/endian.h:14:
./compat/byteswap.h:34:17: error: functions that differ only in their return type cannot be overloaded
inline uint64_t bswap_64(uint64_t x)
                ^
/usr/local/Cellar/protobuf/3.0.2/include/google/protobuf/stubs/port.h:300:21: note: expanded from macro 'bswap_64'
#define bswap_64(x) OSSwapInt64(x)
                    ^
/usr/include/libkern/OSByteOrder.h:56:24: note: expanded from macro 'OSSwapInt64'
#define OSSwapInt64(x)  __DARWIN_OSSwapInt64(x)
                        ^
/usr/include/libkern/_OSByteOrder.h:78:6: note: expanded from macro '__DARWIN_OSSwapInt64'
    (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
     ^
/usr/local/Cellar/protobuf/3.0.2/include/google/protobuf/stubs/port.h:337:47: note: previous implicit declaration is here
  static uint16 FromHost16(uint16 x) { return bswap_16(x); }
                                              ^
/usr/local/Cellar/protobuf/3.0.2/include/google/protobuf/stubs/port.h:298:21: note: expanded from macro 'bswap_16'
#define bswap_16(x) OSSwapInt16(x)
                    ^
/usr/include/libkern/OSByteOrder.h:54:24: note: expanded from macro 'OSSwapInt16'
#define OSSwapInt16(x)  __DARWIN_OSSwapInt16(x)
                        ^
/usr/include/libkern/_OSByteOrder.h:72:19: note: expanded from macro '__DARWIN_OSSwapInt16'
    ((__uint16_t)(__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt16(x) : _OSSwapInt16(x)))
                  ^
8 errors generated.
make[1]: *** [qt/qt_libbitcoinqt_a-askpassphrasedialog.o] Error 1
make: *** [all-recursive] Error 1
1714578950
Hero Member
*
Offline Offline

Posts: 1714578950

View Profile Personal Message (Offline)

Ignore
1714578950
Reply with quote  #2

1714578950
Report to moderator
1714578950
Hero Member
*
Offline Offline

Posts: 1714578950

View Profile Personal Message (Offline)

Ignore
1714578950
Reply with quote  #2

1714578950
Report to moderator
1714578950
Hero Member
*
Offline Offline

Posts: 1714578950

View Profile Personal Message (Offline)

Ignore
1714578950
Reply with quote  #2

1714578950
Report to moderator
Be very wary of relying on JavaScript for security on crypto sites. The site can change the JavaScript at any time unless you take unusual precautions, and browsers are not generally known for their airtight security.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714578950
Hero Member
*
Offline Offline

Posts: 1714578950

View Profile Personal Message (Offline)

Ignore
1714578950
Reply with quote  #2

1714578950
Report to moderator
1714578950
Hero Member
*
Offline Offline

Posts: 1714578950

View Profile Personal Message (Offline)

Ignore
1714578950
Reply with quote  #2

1714578950
Report to moderator
1714578950
Hero Member
*
Offline Offline

Posts: 1714578950

View Profile Personal Message (Offline)

Ignore
1714578950
Reply with quote  #2

1714578950
Report to moderator
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3374
Merit: 6571


Just writing some code


View Profile WWW
September 16, 2016, 02:48:48 AM
 #2

Are all the dependencies up to date? Did you do make clean first to clean up any old build stuff?

wbchenlan99 (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
September 16, 2016, 02:53:42 AM
 #3

yes, I remove all brew libs, reinstall all Dependencies again and download new bitcoin sources from github.com/bitcoin.

achow101
Moderator
Legendary
*
Offline Offline

Activity: 3374
Merit: 6571


Just writing some code


View Profile WWW
September 16, 2016, 02:59:51 AM
 #4

Well unfortunately I am not familiar with the Mac build process. I suggest that you go to https://github.com/bitcoin/bitcoin/issues and see if anyone else has had the same issue. If not, submit a new issue. I also recommend that you go to the #bitcoin-core-dev channel and ask them about this. The developers do not frequent this forum anymore so you aren't likely to get any support related to build issues here.

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!