Error compiling PX4 sitl (JSBsim)


I’m compiling PX4 (v 1.12.3) for sitl with JSBsim on macOS 13.0.1 but I got the following error:

fatal error: variable ‘stat_thread’ set but not used [-Wunused-but-set-variable]

at step 343/815; I attach the complete terminal output to help in the solution of the issue.

PX4-SITL-error.pdf (33.2 KB)

I tried to solve the problem and looked for a solution on the internet but without success; any help is appreciated.

My setup is:

  • px4 1.12.3
  • macOS 13.0.1
  • cmake 3.25.0
  • python 3.9.6
  • C and CXX compiler AppleClang
  • JSBsim 1.1.12



Edit: my problem seems similar to this one

but I don’t know how to replicate it.

I think the problem may be solved suppressing the warning in the make file, as suggested in


However, I don’t know where to write this command; can someone help me? @hamishwillee is this your field?


Nope. I use Gazebo in a VM. @JulianOes mean anything to you, or could you suggest someone else to advise?

Anyone can help me on this?