$ gcc --version
gcc (GCC) 12.0.1 20220214 (Red Hat 12.0.1-0)
$ g++ --version
g++ (GCC) 12.0.1 20220214 (Red Hat 12.0.1-0)
Compilation log
$ mkdir build && cd build
$ cmake .. -DCMAKE_BUILD_TYPE=Release -DTEAKRA_TEST_ASSETS_DIR="$HOME/assets" -DTEAKRA_RUN_TESTS=ON
-- The CXX compiler identification is GNU 12.0.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Will run Teakra accuracy tests
-- Downloading required samples...
...
-- [download 100% complete]
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tle/Work/teakra/build
$ $ cmake --build . -- -j"$(nproc)"
[ 2%] Building CXX object src/CMakeFiles/teakra.dir/btdmp.cpp.o
[ 8%] Building CXX object src/CMakeFiles/teakra.dir/dma.cpp.o
[ 8%] Building CXX object src/CMakeFiles/teakra.dir/disassembler.cpp.o
[ 10%] Building CXX object src/CMakeFiles/teakra.dir/mmio.cpp.o
[ 16%] Building CXX object src/CMakeFiles/teakra.dir/apbp.cpp.o
[ 16%] Building CXX object src/CMakeFiles/teakra.dir/ahbm.cpp.o
[ 18%] Building CXX object src/CMakeFiles/teakra.dir/timer.cpp.o
[ 21%] Building CXX object src/CMakeFiles/teakra.dir/memory_interface.cpp.o
[ 24%] Building CXX object src/CMakeFiles/teakra.dir/teakra.cpp.o
[ 29%] Building CXX object src/CMakeFiles/teakra.dir/test_generator.cpp.o
[ 29%] Building CXX object src/CMakeFiles/teakra.dir/parser.cpp.o
[ 32%] Building CXX object src/CMakeFiles/teakra.dir/processor.cpp.o
In file included from /home/tle/Work/teakra/src/processor.cpp:1:
/home/tle/Work/teakra/src/interpreter.h: In member function ‘void Teakra::Interpreter::CodebookSearch(u16, u16, u16, CbsCond)’:
/home/tle/Work/teakra/src/interpreter.h:2788:23: error: ‘exchange’ is not a member of ‘std’
2788 | u16 x0 = std::exchange(regs.x[0], regs.y[0]);
| ^~~~~~~~
compilation terminated due to -Wfatal-errors.
gmake[2]: *** [src/CMakeFiles/teakra.dir/build.make:202: src/CMakeFiles/teakra.dir/processor.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
In file included from /usr/include/c++/12/functional:59,
from /home/tle/Work/teakra/src/mmio.cpp:1:
In destructor ‘std::_Function_base::~_Function_base()’,
inlined from ‘std::function<void(short unsigned int)>::~function()’ at /usr/include/c++/12/bits/std_function.h:334:11,
inlined from ‘Teakra::MMIORegion::MMIORegion(Teakra::MemoryInterfaceUnit&, Teakra::ICU&, Teakra::Apbp&, Teakra::Apbp&, std::array<Teakra::Timer, 2>&, Teakra::Dma&, Teakra::Ahbm&, std::array<Teakra::Btdmp, 2>&)’ at /home/tle/Work/teakra/src/mmio.cpp:350:1:
/usr/include/c++/12/bits/std_function.h:243:11: error: ‘*(std::_Function_base*)((char*)&<unnamed>[1] + offsetof(const Teakra::BitFieldSlot, Teakra::BitFieldSlot::set.std::function<void(short unsigned int)>::<unnamed>.std::_Maybe_unary_or_binary_function<void, short unsigned int>::<unnamed>)).std::_Function_base::_M_manager’ may be used uninitialized [-Werror=maybe-uninitialized]
243 | if (_M_manager)
| ^~~~~~~~~~
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors
gmake[2]: *** [src/CMakeFiles/teakra.dir/build.make:174: src/CMakeFiles/teakra.dir/mmio.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:261: src/CMakeFiles/teakra.dir/all] Error 2
gmake: *** [Makefile:101: all] Error 2
...
[ 89%] Linking CXX executable dsp1_reader
[ 89%] Built target dsp1_reader
[ 91%] Linking CXX executable makedsp1
In file included from /usr/include/signal.h:328,
from /home/tle/Work/teakra/externals/catch/catch.hpp:5473,
from /home/tle/Work/teakra/tests/main.cpp:2:
/home/tle/Work/teakra/externals/catch/catch.hpp:8164:58: error: call to non-‘constexpr’ function ‘long int sysconf(int)’
8164 | constexpr static std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
| ^~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
gmake[2]: *** [tests/CMakeFiles/teakra_tests.dir/build.make:118: tests/CMakeFiles/teakra_tests.dir/main.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
System info
Compilation log