fuzziqersoftware / phosg

C++ helpers for some common tasks
18 stars 17 forks source link

Can't build phosg on FreeBSD 14.0 #31

Open nolrinale opened 10 months ago

nolrinale commented 10 months ago

In a fresh FreeBSD install , attempted to make phosg got these error messages:

root@bsd:~/scratchpad/phosg # make
[  2%] Building CXX object CMakeFiles/phosg.dir/src/Arguments.cc.o
In file included from /root/scratchpad/phosg/src/Arguments.cc:1:
In file included from /root/scratchpad/phosg/src/Arguments.hh:8:
In file included from /root/scratchpad/phosg/src/Strings.hh:14:
/root/scratchpad/phosg/src/Encoding.hh:90:24: error: static declaration of '__builtin_bswap16' follows non-static declaration
static inline uint16_t bswap16(uint16_t a) {
                       ^
/usr/include/sys/endian.h:65:20: note: expanded from macro 'bswap16'
#define bswap16(x)      __bswap16(x)
                        ^
/usr/include/sys/_endian.h:83:22: note: expanded from macro '__bswap16'
#define __bswap16(x)    __builtin_bswap16(x)
                        ^
/root/scratchpad/phosg/src/Encoding.hh:90:24: note: '__builtin_bswap16' is a builtin with type 'int64_t' (aka 'long')
/usr/include/sys/endian.h:65:20: note: expanded from macro 'bswap16'
#define bswap16(x)      __bswap16(x)
                        ^
/usr/include/sys/_endian.h:83:22: note: expanded from macro '__bswap16'
#define __bswap16(x)    __builtin_bswap16(x)
                        ^
In file included from /root/scratchpad/phosg/src/Arguments.cc:1:
In file included from /root/scratchpad/phosg/src/Arguments.hh:8:
In file included from /root/scratchpad/phosg/src/Strings.hh:14:
/root/scratchpad/phosg/src/Encoding.hh:109:24: error: static declaration of '__builtin_bswap32' follows non-static declaration
static inline uint32_t bswap32(uint32_t a) {
                       ^
/usr/include/sys/endian.h:66:20: note: expanded from macro 'bswap32'
#define bswap32(x)      __bswap32(x)
                        ^
/usr/include/sys/_endian.h:84:22: note: expanded from macro '__bswap32'
#define __bswap32(x)    __builtin_bswap32(x)
                        ^
/root/scratchpad/phosg/src/Encoding.hh:109:24: note: '__builtin_bswap32' is a builtin with type 'unsigned int'
/usr/include/sys/endian.h:66:20: note: expanded from macro 'bswap32'
#define bswap32(x)      __bswap32(x)
                        ^
/usr/include/sys/_endian.h:84:22: note: expanded from macro '__bswap32'
#define __bswap32(x)    __builtin_bswap32(x)
                        ^
In file included from /root/scratchpad/phosg/src/Arguments.cc:1:
In file included from /root/scratchpad/phosg/src/Arguments.hh:8:
In file included from /root/scratchpad/phosg/src/Strings.hh:14:
/root/scratchpad/phosg/src/Encoding.hh:133:24: error: static declaration of '__builtin_bswap64' follows non-static declaration
static inline uint64_t bswap64(uint64_t a) {
                       ^
/usr/include/sys/endian.h:67:20: note: expanded from macro 'bswap64'
#define bswap64(x)      __bswap64(x)
                        ^
/usr/include/sys/_endian.h:85:22: note: expanded from macro '__bswap64'
#define __bswap64(x)    __builtin_bswap64(x)
                        ^
/root/scratchpad/phosg/src/Encoding.hh:133:24: note: '__builtin_bswap64' is a builtin with type 'unsigned long'
/usr/include/sys/endian.h:67:20: note: expanded from macro 'bswap64'
#define bswap64(x)      __bswap64(x)
                        ^
/usr/include/sys/_endian.h:85:22: note: expanded from macro '__bswap64'
#define __bswap64(x)    __builtin_bswap64(x)
                        ^
3 errors generated.
*** Error code 1

Stop.
make[2]: stopped in /root/scratchpad/phosg
*** Error code 1

Stop.
make[1]: stopped in /root/scratchpad/phosg
*** Error code 1