After upgrading a Mac Mini 2014 (Intel) with Mojave to Monterey 12.1 with XCode 13.2.1 directly (not having upgraded to Catalina or Big Sur), SITL, which had been run during years, fails to execute.
After a first run which compiles 869 modules, on a second run:
% ./sim_vehicle.py -v ArduCopter -f quad
SIM_VEHICLE: Start
SIM_VEHICLE: Killing tasks
SIM_VEHICLE: Starting up at SITL location
SIM_VEHICLE: WAF build
SIM_VEHICLE: Configure waf
SIM_VEHICLE: “/Users/xxx/Documents_outofthecloud/Desarrollo/Pythonadas/ardupilot/modules/waf/waf-light” “configure” “–board” “sitl”
*Setting top to : /Users/xxx/Documents_outofthecloud/Desarrollo/Pythonadas/ardupilot *
*Setting out to : /Users/xxx/Documents_outofthecloud/Desarrollo/Pythonadas/ardupilot/build *
*Autoconfiguration : enabled *
*Setting board to : sitl *
*Using toolchain : native *
*Checking for ‘g++’ (C++ compiler) : not found *
*Checking for ‘clang++’ (C++ compiler) : /usr/bin/clang++ *
*Checking for ‘gcc’ (C compiler) : not found *
*Checking for ‘clang’ (C compiler) : /usr/bin/clang *
*Checking for c flags ‘-MMD’ : yes *
*Checking for cxx flags ‘-MMD’ : yes *
*CXX Compiler : clang++ 13.0.0 *
*Checking for feenableexcept : no *
Disabling SLP for clang++
*Checking for HAVE_CMATH_ISFINITE : yes *
*Checking for HAVE_CMATH_ISINF : yes *
*Checking for HAVE_CMATH_ISNAN : yes *
*Checking for NEED_CMATH_ISFINITE_STD_NAMESPACE : yes *
*Checking for NEED_CMATH_ISINF_STD_NAMESPACE : yes *
*Checking for NEED_CMATH_ISNAN_STD_NAMESPACE : yes *
*Checking for header endian.h : not found *
*Checking for header byteswap.h : not found *
*Checking for HAVE_MEMRCHR : no *
*Configured VSCode Intellisense: : no *
*Checking for program ‘python’ : /usr/local/opt/python@3.9/bin/python3.9 *
*Checking for python version >= 2.7.0 : 3.9.9 *
*Checking for program ‘python’ : /usr/local/opt/python@3.9/bin/python3.9 *
*Checking for python version >= 2.7.0 : 3.9.9 *
*Source is git repository : yes *
*Update submodules : yes *
*Checking for program ‘git’ : /usr/local/bin/git *
*Checking for program ‘size’ : /usr/bin/size *
*Benchmarks : disabled *
*Unit tests : enabled *
*Scripting : enabled *
*Scripting runtime checks : enabled *
*Debug build : disabled *
*Coverage build : disabled *
*SITL 32-bit build : disabled *
*Checking for program ‘rsync’ : /usr/bin/rsync *
‘configure’ finished successfully (2.852s)
SIM_VEHICLE: Building
SIM_VEHICLE: “/Users/xxx/Documents_outofthecloud/Desarrollo/Pythonadas/ardupilot/modules/waf/waf-light” “build” “–target” “bin/arducopter”
Waf: Entering directory /Users/xxx/Documents_outofthecloud/Desarrollo/Pythonadas/ardupilot/build/sitl'* *Embedding file locations.txt:Tools/autotest/locations.txt* *Embedding file models/Callisto.json:Tools/autotest/models/Callisto.json* *Waf: Leaving directory
/Users/xxx/Documents_outofthecloud/Desarrollo/Pythonadas/ardupilot/build/sitl’
BUILD SUMMARY
Build directory: /Users/xxx/Documents_outofthecloud/Desarrollo/Pythonadas/ardupilot/build/sitl
Target Text (B) Data (B) BSS (B) Total Flash Used (B) Free Flash (B)
---------------------------------------------------------------------------------
bin/arducopter 2408448 180224 0 2588672 Not Applicable
Build commands will be stored in build/sitl/compile_commands.json
‘build’ finished successfully (2.897s)
SIM_VEHICLE: Using defaults from (/Users/xxx/Documents_outofthecloud/Desarrollo/Pythonadas/ardupilot/Tools/autotest/default_params/copter.parm)
SIM_VEHICLE: Run ArduCopter
SIM_VEHICLE: “/Users/xxx/Documents_outofthecloud/Desarrollo/Pythonadas/ardupilot/Tools/autotest/run_in_terminal_window.sh” “ArduCopter” “/Users/xxx/Documents_outofthecloud/Desarrollo/Pythonadas/ardupilot/build/sitl/bin/arducopter” “-S” “–model” “+” “–speedup” “1” “–slave” “0” “–defaults” “/Users/xxx/Documents_outofthecloud/Desarrollo/Pythonadas/ardupilot/Tools/autotest/default_params/copter.parm” “-I0”
SIM_VEHICLE: Run MavProxy
SIM_VEHICLE: “mavproxy.py” “–out” “127.0.0.1:14550” “–out” “127.0.0.1:14551” “–master” “tcp:127.0.0.1:5760” “–sitl” “127.0.0.1:5501”
Connect tcp:127.0.0.1:5760 source_system=255
*Log Directory: *
Telemetry log: mav.tlog
Waiting for heartbeat from tcp:127.0.0.1:5760
MAV> online system 1
STABILIZE> Mode STABILIZE
APM: Barometer 1 calibration complete
APM: Barometer 2 calibration complete
Init Gyro**APM: ArduCopter V4.2.0-dev (97fee2d1)
APM: Mac-mini.local
APM: Frame: QUAD/PLUS
Received 1273 parameters (ftp)
Saved 1273 parameters to mav.parm
APM: ArduPilot Ready
APM: AHRS: DCM active
APM: SaveWaypoint LOW
fence present
APM: EKF3 IMU0 buffs IMU=19 OBS=7 OF=17 EN:17 dt=0.0120
APM: EKF3 IMU1 buffs IMU=19 OBS=7 OF=17 EN:17 dt=0.0120
APM: EKF3 IMU0 initialised
APM: EKF3 IMU1 initialised
APM: AHRS: EKF3 active
APM: EKF3 IMU0 tilt alignment complete
APM: EKF3 IMU1 tilt alignment complete
APM: EKF3 IMU0 MAG0 initial yaw alignment complete
APM: EKF3 IMU1 MAG0 initial yaw alignment complete
APM: GPS 1: detected as u-blox at 230400 baud
APM: EKF3 IMU1 origin set
APM: EKF3 IMU0 origin set
APM: EKF3 IMU0 is using GPS
APM: EKF3 IMU1 is using GPS
EOF on TCP socket
Attempting reconnect
[Errno 61] Connection refused sleeping
[Errno 22] Invalid argument sleeping
Attempting reconnect
[Errno 61] Connection refused sleeping
[Errno 22] Invalid argument sleeping
Attempting reconnect
[Errno 61] Connection refused sleeping
[Errno 22] Invalid argument sleeping
On the emerging window:
% /Users/xxx/Documents_outofthecloud/Desarrollo/Pythonadas/ardupilot/build/sitl/bin/arducopter -S --model + --speedup 1 --slave 0 --defaults /Users/xxx/Documents_outofthecloud/Desarrollo/Pythonadas/ardupilot/Tools/autotest/default_params/copter.parm -I0 *
Setting SIM_SPEEDUP=1.000000
Suggested EK3_BCOEF_ = 16.288, EK3_MCOEF = 0.209
Starting sketch ‘ArduCopter’
Starting SITL input
Using Irlock at port : 9005
bind port 5760 for 0
Serial port 0 on TCP port 5760
Waiting for connection …
Connection on serial port 5760
Loaded defaults from /Users/xxx/Documents_outofthecloud/Desarrollo/Pythonadas/ardupilot/Tools/autotest/default_params/copter.parm
bind port 5762 for 2
Serial port 2 on TCP port 5762
bind port 5763 for 3
Serial port 3 on TCP port 5763
Home: -35.363262 149.165237 alt=584.000000m hdg=353.000000
Smoothing reset at 0.001
validate_structures:469: Validating structures
Loaded defaults from /Users/xxx/Documents_outofthecloud/Desarrollo/Pythonadas/ardupilot/Tools/autotest/default_params/copter.parm
ERROR: Floating point exception - aborting
Running: sh dumpstack.sh 5365 >dumpstack.sh_nknown.5365.out 2>&1
Failed
Running: sh dumpcore.sh 5365 >dumpcore.sh_nknown.5365.out 2>&1
Failed
zsh: abort -S --model + --speedup 1 --slave 0 --defaults -I0
xxx@Mac-mini ~ %
Terminal output stops around 25" and then bold lines above appear simultaneously.
install-prereqs-mac.sh has been run again, although compilation is successful.
This happens whether or not incoming connections are permitted, and also on older versions.
ARM compiler:
% arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/opt/gcc-arm-none-eabi-10-2020-q4-major/bin/…/lib/gcc/arm-none-eabi/10.2.1/lto-wrapper
Target: arm-none-eabi
Configured with: /tmp/jenkins-GCC-10-pipeline-48_20201124_1606180639/src/gcc/configure --target=arm-none-eabi --prefix=/tmp/jenkins-GCC-10-pipeline-48_20201124_1606180639/install-native --libexecdir=/tmp/jenkins-GCC-10-pipeline-48_20201124_1606180639/install-native/lib --infodir=/tmp/jenkins-GCC-10-pipeline-48_20201124_1606180639/install-native/share/doc/gcc-arm-none-eabi/info --mandir=/tmp/jenkins-GCC-10-pipeline-48_20201124_1606180639/install-native/share/doc/gcc-arm-none-eabi/man --htmldir=/tmp/jenkins-GCC-10-pipeline-48_20201124_1606180639/install-native/share/doc/gcc-arm-none-eabi/html --pdfdir=/tmp/jenkins-GCC-10-pipeline-48_20201124_1606180639/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --enable-plugins --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/tmp/jenkins-GCC-10-pipeline-48_20201124_1606180639/install-native/arm-none-eabi --build=x86_64-apple-darwin10 --host=x86_64-apple-darwin10 --with-gmp=/tmp/jenkins-GCC-10-pipeline-48_20201124_1606180639/build-native/host-libs/usr --with-mpfr=/tmp/jenkins-GCC-10-pipeline-48_20201124_1606180639/build-native/host-libs/usr --with-mpc=/tmp/jenkins-GCC-10-pipeline-48_20201124_1606180639/build-native/host-libs/usr --with-isl=/tmp/jenkins-GCC-10-pipeline-48_20201124_1606180639/build-native/host-libs/usr --with-libelf=/tmp/jenkins-GCC-10-pipeline-48_20201124_1606180639/build-native/host-libs/usr --with-host-libstdcxx=’-static-libgcc -Wl,-lstdc++ -lm’ --with-pkgversion=‘GNU Arm Embedded Toolchain 10-2020-q4-major’ --with-multilib-list=rmprofile,aprofile
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 10.2.1 20201103 (release) (GNU Arm Embedded Toolchain 10-2020-q4-major)
What can I try?
Someone successful with SITL on Monterey?