Error: static assertion failed: atomic is not lock-free for the given type T

I get the following building on RPI4, Debian OS, any suggestions? Thank you very much.


[ 54%] Built target drivers__imu__invensense__icm20948_i2c_passthrough
[ 54%] Building CXX object src/drivers/imu/invensense/icm20948/CMakeFiles/drivers__imu__invensense__icm20948.dir/ICM20948.cpp.o
In file included from /home/ardupilot/firmware/platforms/common/include/px4_platform_common/atomic_bitset.h:36,
from /home/ardupilot/firmware/platforms/common/uORB/uORBDeviceMaster.hpp:54,
from /home/ardupilot/firmware/platforms/common/uORB/uORBDeviceNode.hpp:37,
from /home/ardupilot/firmware/platforms/common/uORB/PublicationMulti.hpp:44,
from /home/ardupilot/firmware/src/lib/drivers/accelerometer/PX4Accelerometer.hpp:39,
from /home/ardupilot/firmware/src/drivers/imu/invensense/icm20948/ICM20948.hpp:46,
from /home/ardupilot/firmware/src/drivers/imu/invensense/icm20948/ICM20948.cpp:34:
/home/ardupilot/firmware/platforms/common/include/px4_platform_common/atomic.h: In instantiation of ‘class px4::atomic’:
/home/ardupilot/firmware/src/drivers/imu/invensense/icm20948/ICM20948.hpp:172:51: required from here
/home/ardupilot/firmware/platforms/common/include/px4_platform_common/atomic.h:76:41: error: static assertion failed: atomic is not lock-free for the given type T
76 | static_assert(__atomic_always_lock_free(sizeof(T), 0), “atomic is not lock-free for the given type T”);
| ~~~~~~~~~~~~~^~
compilation terminated due to -Wfatal-errors.
make[2]: *** [src/drivers/imu/invensense/icm20948/CMakeFiles/drivers__imu__invensense__icm20948.dir/build.make:82: src/drivers/imu/invensense/icm20948/CMakeFiles/drivers__imu__invense
nse__icm20948.dir/ICM20948.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:8398: src/drivers/imu/invensense/icm20948/CMakeFiles/drivers__imu__invensense__icm20948.dir/all] Error 2
make: *** [Makefile:171: all] Error 2