I ran into a similar issue with the FOC library which appears to have been fixed in the dev branch of that repo
There are several places in the driver library where either Serial or SimpleFOCDebug objects are used without checking the macro or if Serial is defined
Most of the errors are in SimpleFOCDrivers/src/settings/SettingsStorage.cpp but there's one in SimpleFOCDrivers/src/encoders/tle5012b/STM32TLE5012B.cpp