Title: protobuf ? previous implicit declaration ? Error message Post by: wbchenlan99 on September 16, 2016, 02:42:58 AM 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 >> 8) | ((x & 0x00ff) << 8); ^ ./compat/byteswap.h:21:25: error: use of undeclared identifier 'x' return (x >> 8) | ((x & 0x00ff) << 8); ^ ./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 Title: Re: protobuf ? previous implicit declaration ? Error message Post by: achow101 on September 16, 2016, 02:48:48 AM Are all the dependencies up to date? Did you do make clean first to clean up any old build stuff?
Title: Re: protobuf ? previous implicit declaration ? Error message Post by: wbchenlan99 on September 16, 2016, 02:53:42 AM yes, I remove all brew libs, reinstall all Dependencies again and download new bitcoin sources from github.com/bitcoin.
Title: Re: protobuf ? previous implicit declaration ? Error message Post by: achow101 on September 16, 2016, 02:59:51 AM 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.
|