<!--- Remove sections that do not apply -->
Describe the issue
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
Is the issue reproducible? yes
List steps to reproduce below:
I did
- Remove all homebrew; reinstall homebrew;
- brew all updated Dependencies>
- download new bitcoin sources from github.com/bitcoin
- did "make" and error shown
Machine specs: CPU, RAM, Disk space & OS (Windows, OS X, Linux)
MAC OSX 10.11.6 Xcode 8.0 $gcc version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 8.0.0 (clang-800.0.38) Target: x86_64-apple-darwin15.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$ g++ version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 8.0.0 (clang-800.0.38) Target: x86_64-apple-darwin15.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin