Closed SolitudeSF closed 3 years ago
Hmm your compiler doesn't seem to know the __has_builtin
macro, what compiler are you using and on what OS are you if I may ask?
linux, gcc 9.3.0
hmm yeah it might not know the __has_builtin
macro, and it might not like that my instruction handlers are __fastcall
either, not sure if that's a windows only thing
fastcall is windows only. with clang 11 __has_builtin
doesn't error, but still there are plenty of erros not counting fastcall.
i was able to build Frontend after adding missing #include <cstddef>
in Frontend/interface.h
here are the rest of errors https://dpaste.com/BD5HHCBJR.txt
I have set up WSL and got a lot of the errors to go away (on gcc and clang), there might be some problems with SDL still, but you can try again to see if it builds now
I have heard from others on linux that it builds now, so I'm gonna close this issue
Build fails with ~200 various errors in almost every file.
Details
In file included from /home/solitude/git/DSHBA/src/Core/ARM7TDMI/../Mem/../IO/../PPU/../Scheduler/scheduler.h:6, from /home/solitude/git/DSHBA/src/Core/ARM7TDMI/../Mem/../IO/../PPU/PPU.h:4, from /home/solitude/git/DSHBA/src/Core/ARM7TDMI/../Mem/../IO/MMIO.h:8, from /home/solitude/git/DSHBA/src/Core/ARM7TDMI/../Mem/Mem.h:3, from /home/solitude/git/DSHBA/src/Core/ARM7TDMI/ARM7TDMI.h:5, from /home/solitude/git/DSHBA/src/Core/ARM7TDMI/ARM7TDMI.cpp:1: /home/solitude/git/DSHBA/include/helpers.h:46:18: error: missing binary operator before token "(" 46 | #if __has_builtin(__builtin_bitreverse8) | ^ In file included from /home/solitude/git/DSHBA/src/Core/Mem/../IO/../PPU/../Scheduler/scheduler.h:6, from /home/solitude/git/DSHBA/src/Core/Mem/../IO/../PPU/PPU.h:4, from /home/solitude/git/DSHBA/src/Core/Mem/../IO/MMIO.h:8, from /home/solitude/git/DSHBA/src/Core/Mem/Mem.h:3, from /home/solitude/git/DSHBA/src/Core/Mem/Mem.cpp:1: /home/solitude/git/DSHBA/include/helpers.h:46:18: error: missing binary operator before token "(" 46 | #if __has_builtin(__builtin_bitreverse8) | ^ In file included from /home/solitude/git/DSHBA/src/Core/PPU/../Scheduler/scheduler.h:6, from /home/solitude/git/DSHBA/src/Core/PPU/PPU.h:4, from /home/solitude/git/DSHBA/src/Core/PPU/PPU.cpp:1: /home/solitude/git/DSHBA/include/helpers.h:46:18: error: missing binary operator before token "(" 46 | #if __has_builtin(__builtin_bitreverse8) | ^ /home/solitude/git/DSHBA/include/helpers.h:59:18: error: missing binary operator before token "(" 59 | #if __has_builtin(__builtin_popcount) | ^ In file included from /home/solitude/git/DSHBA/src/Core/IO/../PPU/../Scheduler/scheduler.h:6, from /home/solitude/git/DSHBA/src/Core/IO/../PPU/PPU.h:4, from /home/solitude/git/DSHBA/src/Core/IO/MMIO.h:8, from /home/solitude/git/DSHBA/src/Core/IO/MMIO.cpp:1: /home/solitude/git/DSHBA/include/helpers.h:46:18: error: missing binary operator before token "(" 46 | #if __has_builtin(__builtin_bitreverse8) | ^ /home/solitude/git/DSHBA/include/helpers.h:59:18: error: missing binary operator before token "(" 59 | #if __has_builtin(__builtin_popcount) | ^ /home/solitude/git/DSHBA/include/helpers.h:59:18: error: missing binary operator before token "(" 59 | #if __has_builtin(__builtin_popcount) | ^ /home/solitude/git/DSHBA/include/helpers.h:75:18: error: missing binary operator before token "(" 75 | #if __has_builtin(__builtin_clz) | ^ /home/solitude/git/DSHBA/include/helpers.h:59:18: error: missing binary operator before token "(" 59 | #if __has_builtin(__builtin_popcount) | ^ /home/solitude/git/DSHBA/include/helpers.h:75:18: error: missing binary operator before token "(" 75 | #if __has_builtin(__builtin_clz) | ^ /home/solitude/git/DSHBA/include/helpers.h:75:18: error: missing binary operator before token "(" 75 | #if __has_builtin(__builtin_clz) | ^ /home/solitude/git/DSHBA/include/helpers.h:75:18: error: missing binary operator before token "(" 75 | #if __has_builtin(__builtin_clz) | ^ /home/solitude/git/DSHBA/include/helpers.h:113:20: error: missing binary operator before token "(" 113 | #if __is_identifier(__builtin_expect) || __has_builtin(__builtin_expect) | ^ /home/solitude/git/DSHBA/include/helpers.h:113:20: error: missing binary operator before token "(" 113 | #if __is_identifier(__builtin_expect) || __has_builtin(__builtin_expect) | ^ /home/solitude/git/DSHBA/include/helpers.h:113:20: error: missing binary operator before token "(" 113 | #if __is_identifier(__builtin_expect) || __has_builtin(__builtin_expect) | ^ /home/solitude/git/DSHBA/include/helpers.h:121:18: error: missing binary operator before token "(" 121 | #if __has_builtin(__builtin_unreachable) | ^ /home/solitude/git/DSHBA/include/helpers.h:121:18: error: missing binary operator before token "(" 121 | #if __has_builtin(__builtin_unreachable) | ^ /home/solitude/git/DSHBA/include/helpers.h:113:20: error: missing binary operator before token "(" 113 | #if __is_identifier(__builtin_expect) || __has_builtin(__builtin_expect) | ^ /home/solitude/git/DSHBA/include/helpers.h:127:18: error: missing binary operator before token "(" 127 | #if __has_builtin(__builtin_assume) | ^ /home/solitude/git/DSHBA/include/helpers.h:121:18: error: missing binary operator before token "(" 121 | #if __has_builtin(__builtin_unreachable) | ^ /home/solitude/git/DSHBA/include/helpers.h:127:18: error: missing binary operator before token "(" 127 | #if __has_builtin(__builtin_assume) | ^ /home/solitude/git/DSHBA/include/helpers.h:121:18: error: missing binary operator before token "(" 121 | #if __has_builtin(__builtin_unreachable) | ^ /home/solitude/git/DSHBA/include/helpers.h:127:18: error: missing binary operator before token "(" 127 | #if __has_builtin(__builtin_assume) | ^ /home/solitude/git/DSHBA/include/helpers.h:133:18: error: missing binary operator before token "(" 133 | #if __has_builtin(__builtin_assume_aligned) | ^ /home/solitude/git/DSHBA/include/helpers.h:133:18: error: missing binary operator before token "(" 133 | #if __has_builtin(__builtin_assume_aligned) | ^ /home/solitude/git/DSHBA/include/helpers.h:127:18: error: missing binary operator before token "(" 127 | #if __has_builtin(__builtin_assume) | ^ /home/solitude/git/DSHBA/include/helpers.h:133:18: error: missing binary operator before token "(" 133 | #if __has_builtin(__builtin_assume_aligned) | ^ /home/solitude/git/DSHBA/include/helpers.h:133:18: error: missing binary operator before token "(" 133 | #if __has_builtin(__builtin_assume_aligned) | ^ /home/solitude/git/DSHBA/include/helpers.h:154: warning: "LITTLE_ENDIAN" redefined 154 | #define LITTLE_ENDIAN | /home/solitude/git/DSHBA/include/helpers.h:154: warning: "LITTLE_ENDIAN" redefined 154 | #define LITTLE_ENDIAN | /home/solitude/git/DSHBA/include/helpers.h:154: warning: "LITTLE_ENDIAN" redefined 154 | #define LITTLE_ENDIAN | /home/solitude/git/DSHBA/include/helpers.h:154: warning: "LITTLE_ENDIAN" redefined 154 | #define LITTLE_ENDIAN | In file included from /usr/include/sys/types.h:176, from /usr/include/stdlib.h:394, from /usr/include/c++/9.3/cstdlib:75, from /usr/include/c++/9.3/stdlib.h:36, from /home/solitude/git/DSHBA/include/log.h:5, from /home/solitude/git/DSHBA/src/Core/ARM7TDMI/../Mem/../IO/../Mem/MemoryHelpers.h:4, from /home/solitude/git/DSHBA/src/Core/ARM7TDMI/../Mem/../IO/MMIO.h:7, from /home/solitude/git/DSHBA/src/Core/ARM7TDMI/../Mem/Mem.h:3, from /home/solitude/git/DSHBA/src/Core/ARM7TDMI/ARM7TDMI.h:5, from /home/solitude/git/DSHBA/src/Core/ARM7TDMI/ARM7TDMI.cpp:1: /usr/include/endian.h:45: note: this is the location of the previous definition 45 | # define LITTLE_ENDIAN __LITTLE_ENDIAN | In file included from /usr/include/sys/types.h:176, from /usr/include/stdlib.h:394, from /usr/include/c++/9.3/cstdlib:75, from /usr/include/c++/9.3/stdlib.h:36, from /home/solitude/git/DSHBA/include/log.h:5, from /home/solitude/git/DSHBA/src/Core/Mem/../IO/../Mem/MemoryHelpers.h:4, from /home/solitude/git/DSHBA/src/Core/Mem/../IO/MMIO.h:7, from /home/solitude/git/DSHBA/src/Core/Mem/Mem.h:3, from /home/solitude/git/DSHBA/src/Core/Mem/Mem.cpp:1: /usr/include/endian.h:45: note: this is the location of the previous definition 45 | # define LITTLE_ENDIAN __LITTLE_ENDIAN | In file included from /usr/include/sys/types.h:176, from /usr/include/stdlib.h:394, from /usr/include/c++/9.3/cstdlib:75, from /usr/include/c++/9.3/stdlib.h:36, from /home/solitude/git/DSHBA/include/log.h:5, from /home/solitude/git/DSHBA/src/Core/PPU/../Mem/MemoryHelpers.h:4, from /home/solitude/git/DSHBA/src/Core/PPU/PPU.h:3, from /home/solitude/git/DSHBA/src/Core/PPU/PPU.cpp:1: /usr/include/endian.h:45: note: this is the location of the previous definition 45 | # define LITTLE_ENDIAN __LITTLE_ENDIAN | In file included from /usr/include/sys/types.h:176, from /usr/include/stdlib.h:394, from /usr/include/c++/9.3/cstdlib:75, from /usr/include/c++/9.3/stdlib.h:36, from /home/solitude/git/DSHBA/include/log.h:5, from /home/solitude/git/DSHBA/src/Core/IO/../Mem/MemoryHelpers.h:4, from /home/solitude/git/DSHBA/src/Core/IO/MMIO.h:7, from /home/solitude/git/DSHBA/src/Core/IO/MMIO.cpp:1: /usr/include/endian.h:45: note: this is the location of the previous definition 45 | # define LITTLE_ENDIAN __LITTLE_ENDIAN | In file included from /home/solitude/git/DSHBA/src/Core/ARM7TDMI/ARM7TDMI.cpp:1: /home/solitude/git/DSHBA/src/Core/ARM7TDMI/ARM7TDMI.h:308:43: error: missing binary operator before token "(" 308 | #if defined(FAST_ADD_SUB) && __has_builtin(__builtin_addc) | ^ In file included from /home/solitude/git/DSHBA/src/Core/IO/MMIO.cpp:5: /home/solitude/git/DSHBA/src/Core/IO/../ARM7TDMI/ARM7TDMI.h:308:43: error: missing binary operator before token "(" 308 | #if defined(FAST_ADD_SUB) && __has_builtin(__builtin_addc) | ^ /home/solitude/git/DSHBA/src/Core/IO/../ARM7TDMI/ARM7TDMI.h:320:48: error: missing binary operator before token "(" 320 | #if 0 && defined(FAST_ADD_SUB) && __has_builtin(__builtin_sadd_overflow) | ^ /home/solitude/git/DSHBA/src/Core/ARM7TDMI/ARM7TDMI.h:320:48: error: missing binary operator before token "(" 320 | #if 0 && defined(FAST_ADD_SUB) && __has_builtin(__builtin_sadd_overflow) | ^ /home/solitude/git/DSHBA/src/Core/IO/../ARM7TDMI/ARM7TDMI.h:341:43: error: missing binary operator before token "(" 341 | #if defined(FAST_ADD_SUB) && __has_builtin(__builtin_subc) | ^ /home/solitude/git/DSHBA/src/Core/ARM7TDMI/ARM7TDMI.h:341:43: error: missing binary operator before token "(" 341 | #if defined(FAST_ADD_SUB) && __has_builtin(__builtin_subc) | ^ /home/solitude/git/DSHBA/src/Core/IO/../ARM7TDMI/ARM7TDMI.h:354:48: error: missing binary operator before token "(" 354 | #if 0 && defined(FAST_ADD_SUB) && __has_builtin(__builtin_ssub_overflow) | ^ /home/solitude/git/DSHBA/src/Core/ARM7TDMI/ARM7TDMI.h:354:48: error: missing binary operator before token "(" 354 | #if 0 && defined(FAST_ADD_SUB) && __has_builtin(__builtin_ssub_overflow) | ^ [ 21%] Building CXX object src/Frontend/CMakeFiles/Frontend.dir/frontend.cpp.o In file included from /home/solitude/git/DSHBA/src/Core/Mem/../IO/../PPU/../Scheduler/scheduler.h:6, from /home/solitude/git/DSHBA/src/Core/Mem/../IO/../PPU/PPU.h:4, from /home/solitude/git/DSHBA/src/Core/Mem/../IO/MMIO.h:8, from /home/solitude/git/DSHBA/src/Core/Mem/Mem.h:3, from /home/solitude/git/DSHBA/src/Core/Mem/Mem.cpp:1: /home/solitude/git/DSHBA/include/helpers.h: In function 'u32 popcount(u32)': /home/solitude/git/DSHBA/include/helpers.h:64:12: error: '__popcnt' was not declared in this scope; did you mean '__popcntq'? 64 | return __popcnt(x); | ^~~~~~~~ | __popcntq /home/solitude/git/DSHBA/include/helpers.h: In function 'u32 ctlz(u32)': /home/solitude/git/DSHBA/include/helpers.h:80:12: error: '__lzcnt' was not declared in this scope; did you mean '__lzcnt64'? 80 | return __lzcnt(x); | ^~~~~~~ | __lzcnt64 In file included from /home/solitude/git/DSHBA/src/Core/IO/../PPU/../Scheduler/scheduler.h:6, from /home/solitude/git/DSHBA/src/Core/IO/../PPU/PPU.h:4, from /home/solitude/git/DSHBA/src/Core/IO/MMIO.h:8, from /home/solitude/git/DSHBA/src/Core/IO/MMIO.cpp:1: /home/solitude/git/DSHBA/include/helpers.h: In function 'u32 popcount(u32)': /home/solitude/git/DSHBA/include/helpers.h:64:12: error: '__popcnt' was not declared in this scope; did you mean '__popcntq'? 64 | return __popcnt(x); | ^~~~~~~~ | __popcntq In file included from /home/solitude/git/DSHBA/src/Core/ARM7TDMI/../Mem/../IO/../PPU/../Scheduler/scheduler.h:6, from /home/solitude/git/DSHBA/src/Core/ARM7TDMI/../Mem/../IO/../PPU/PPU.h:4, from /home/solitude/git/DSHBA/src/Core/ARM7TDMI/../Mem/../IO/MMIO.h:8, from /home/solitude/git/DSHBA/src/Core/ARM7TDMI/../Mem/Mem.h:3, from /home/solitude/git/DSHBA/src/Core/ARM7TDMI/ARM7TDMI.h:5, from /home/solitude/git/DSHBA/src/Core/ARM7TDMI/ARM7TDMI.cpp:1: /home/solitude/git/DSHBA/include/helpers.h: In function 'u32 popcount(u32)': /home/solitude/git/DSHBA/include/helpers.h:64:12: error: '__popcnt' was not declared in this scope; did you mean '__popcntq'? 64 | return __popcnt(x); | ^~~~~~~~ | __popcntq /home/solitude/git/DSHBA/include/helpers.h: In function 'u32 ctlz(u32)': /home/solitude/git/DSHBA/include/helpers.h:80:12: error: '__lzcnt' was not declared in this scope; did you mean '__lzcnt64'? 80 | return __lzcnt(x); | ^~~~~~~ | __lzcnt64 /home/solitude/git/DSHBA/include/helpers.h: In function 'u32 ctlz(u32)': /home/solitude/git/DSHBA/include/helpers.h:80:12: error: '__lzcnt' was not declared in this scope; did you mean '__lzcnt64'? 80 | return __lzcnt(x); | ^~~~~~~ | __lzcnt64 In file included from /home/solitude/git/DSHBA/src/Core/PPU/../Scheduler/scheduler.h:6, from /home/solitude/git/DSHBA/src/Core/PPU/PPU.h:4, from /home/solitude/git/DSHBA/src/Core/PPU/PPU.cpp:1: /home/solitude/git/DSHBA/include/helpers.h: In function 'u32 popcount(u32)': /home/solitude/git/DSHBA/include/helpers.h:64:12: error: '__popcnt' was not declared in this scope; did you mean '__popcntq'? 64 | return __popcnt(x); | ^~~~~~~~ | __popcntq /home/solitude/git/DSHBA/include/helpers.h: In function 'u32 ctlz(u32)': /home/solitude/git/DSHBA/include/helpers.h:80:12: error: '__lzcnt' was not declared in this scope; did you mean '__lzcnt64'? 80 | return __lzcnt(x); | ^~~~~~~ | __lzcnt64 In file included from /home/solitude/git/DSHBA/src/Core/Mem/../IO/../PPU/PPU.h:4, from /home/solitude/git/DSHBA/src/Core/Mem/../IO/MMIO.h:8, from /home/solitude/git/DSHBA/src/Core/Mem/Mem.h:3, from /home/solitude/git/DSHBA/src/Core/Mem/Mem.cpp:1: /home/solitude/git/DSHBA/src/Core/Mem/../IO/../PPU/../Scheduler/scheduler.h: At global scope: /home/solitude/git/DSHBA/src/Core/Mem/../IO/../PPU/../Scheduler/scheduler.h:73:8: warning: 's_scheduler' has a field 's_scheduler::queue' whose type uses the anonymous namespace [-Wsubobject-linkage] 73 | struct s_scheduler { | ^~~~~~~~~~~ /home/solitude/git/DSHBA/src/Core/Mem/../IO/../PPU/../Scheduler/scheduler.h: In member function 'void s_scheduler::AddEvent(s_event*)': /home/solitude/git/DSHBA/src/Core/Mem/../IO/../PPU/../Scheduler/scheduler.h:114:19: error: 'min' was not declared in this scope; did you mean 'std::min'? 114 | top = min(top, event->time); | ^~~ | std::min In file included from /usr/include/c++/9.3/string:52, from /usr/include/c++/9.3/stdexcept:39, from /usr/include/c++/9.3/array:39, from /usr/include/c++/9.3/tuple:39, from /usr/include/c++/9.3/functional:54, from /home/solitude/git/DSHBA/src/Core/Mem/../IO/../PPU/../Scheduler/scheduler.h:8, from /home/solitude/git/DSHBA/src/Core/Mem/../IO/../PPU/PPU.h:4, from /home/solitude/git/DSHBA/src/Core/Mem/../IO/MMIO.h:8, from /home/solitude/git/DSHBA/src/Core/Mem/Mem.h:3, from /home/solitude/git/DSHBA/src/Core/Mem/Mem.cpp:1: /usr/include/c++/9.3/bits/stl_algo.h:3450:5: note: 'std::min' declared here 3450 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ In file included from /home/solitude/git/DSHBA/src/Core/Mem/../IO/../PPU/PPU.h:4, from /home/solitude/git/DSHBA/src/Core/Mem/../IO/MMIO.h:8, from /home/solitude/git/DSHBA/src/Core/Mem/Mem.h:3, from /home/solitude/git/DSHBA/src/Core/Mem/Mem.cpp:1: /home/solitude/git/DSHBA/src/Core/Mem/../IO/../PPU/../Scheduler/scheduler.h: In member function 'void s_scheduler::AddEventAfter(s_event*, u64)': /home/solitude/git/DSHBA/src/Core/Mem/../IO/../PPU/../Scheduler/scheduler.h:123:19: error: 'min' was not declared in this scope; did you mean 'std::min'? 123 | top = min(top, event->time); | ^~~ | std::min In file included from /usr/include/c++/9.3/string:52, from /usr/include/c++/9.3/stdexcept:39, from /usr/include/c++/9.3/array:39, from /usr/include/c++/9.3/tuple:39, from /usr/include/c++/9.3/functional:54, from /home/solitude/git/DSHBA/src/Core/Mem/../IO/../PPU/../Scheduler/scheduler.h:8, from /home/solitude/git/DSHBA/src/Core/Mem/../IO/../PPU/PPU.h:4, from /home/solitude/git/DSHBA/src/Core/Mem/../IO/MMIO.h:8, from /home/solitude/git/DSHBA/src/Core/Mem/Mem.h:3, from /home/solitude/git/DSHBA/src/Core/Mem/Mem.cpp:1: /usr/include/c++/9.3/bits/stl_algo.h:3450:5: note: 'std::min' declared here 3450 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ In file included from /home/solitude/git/DSHBA/src/Core/Mem/../IO/../APU/APU.h:5, from /home/solitude/git/DSHBA/src/Core/Mem/../IO/MMIO.h:9, from /home/solitude/git/DSHBA/src/Core/Mem/Mem.h:3, from /home/solitude/git/DSHBA/src/Core/Mem/Mem.cpp:1: /home/solitude/git/DSHBA/src/Core/Mem/../IO/../APU/Channels/Wave.h: In member function 'void Wave::SwitchBanks(u8)': /home/solitude/git/DSHBA/src/Core/Mem/../IO/../APU/Channels/Wave.h:40:13: error: 'memcpy' was not declared in this scope 40 | memcpy(Bank, WaveRAM_ptr, 16); // temp buffer new values | ^~~~~~ /home/solitude/git/DSHBA/src/Core/Mem/../IO/../APU/Channels/Wave.h:8:1: note: 'memcpy' is defined in header '