From 055aabc5a10e819ca3adc92283b6e4dc8c21d10d Mon Sep 17 00:00:00 2001 From: Samuel Sadok Date: Wed, 17 Jun 2020 12:39:01 +0200 Subject: [PATCH 1/2] Make compile work on GCC 10.1 (again) --- Firmware/fibre/cpp/include/fibre/cpp_utils.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Firmware/fibre/cpp/include/fibre/cpp_utils.hpp b/Firmware/fibre/cpp/include/fibre/cpp_utils.hpp index 6a81858d..b09aa400 100644 --- a/Firmware/fibre/cpp/include/fibre/cpp_utils.hpp +++ b/Firmware/fibre/cpp/include/fibre/cpp_utils.hpp @@ -82,6 +82,7 @@ public: #include #include #include +#include /* Backport features from C++14 and C++17 ------------------------------------*/ From 4100fff46a651fbef676bb946f2e5c7957868128 Mon Sep 17 00:00:00 2001 From: Samuel Sadok Date: Mon, 22 Jun 2020 06:00:35 -0700 Subject: [PATCH 2/2] Prevent python from using __pycache__ during build Caching doesn't work well with the tup build system as tup acts offended when a build task writes files outside of tup's root directory. Particularly on Windows this manifests in errors like: tup error: File '[...]/__pycache__/unicode_escape.cpython-38.pyc' was written to, but is not in .tup/db. You probably should specify it as an output The option -B prevents python from using byte code cache. --- Firmware/Tupfile.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Firmware/Tupfile.lua b/Firmware/Tupfile.lua index 35725d80..b67ad651 100644 --- a/Firmware/Tupfile.lua +++ b/Firmware/Tupfile.lua @@ -7,9 +7,9 @@ tup.include('build.lua') -- On some systems this may return a python2 command if Python3 is not installed. function find_python3() success, python_version = run_now("python --version") - if success and string.match(python_version, "Python 3") then return "python" end + if success and string.match(python_version, "Python 3") then return "python -B" end success, python_version = run_now("python3 --version") - if success and string.match(python_version, "Python 3") then return "python3" end + if success and string.match(python_version, "Python 3") then return "python3 -B" end error("Python 3 not found.") end