Ardupilot: SITL compile error in fedora 32

Created on 12 May 2020  Â·  4Comments  Â·  Source: ArduPilot/ardupilot

Bug report

fedora 32 use gcc version 10 and I have compile error for sitl

Issue details

../../libraries/AP_NavEKF2/AP_NavEKF2_MagFusion.cpp: In member function ‘void NavEKF2_core::FuseMagnetometer()’:
../../libraries/AP_NavEKF2/AP_NavEKF2_MagFusion.cpp:694:44: error: ‘H_MAG[16]’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  694 |             KH[i][j] = Kfusion[i] * H_MAG[j];
      |                                     ~~~~~~~^
compilation terminated due to -Wfatal-errors.
cc1plus: some warnings being treated as errors

Waf: Leaving directory `/home/jinchengde/Code/ArduPilot/ardupilot/build/sitl'
Build failed
 -> task in 'objs/AP_NavEKF2' failed (exit status 1): 
    {task 140494858164592: cxx AP_NavEKF2_MagFusion.cpp -> AP_NavEKF2_MagFusion.cpp.0.o}
 (run with -v to display more information)

_Please describe the problem_

Version

gcc version 10.1.1 20200507 (Red Hat 10.1.1-1) (GCC)

Platform
[ *] All
[ ] AntennaTracker
[ ] Copter
[ ] Plane
[ ] Rover
[ ] Submarine

BUG EKF

Most helpful comment

The problem is happening due to the latest update of GCC 10.2.0 . Downgrade the packages of gcc-core, gcc-g++ and libgcc to 9.3.0-2 in cygwin environment . Then the problem will be resolved.

All 4 comments

Neither works on arch. Neither does the docker image work.

I can confirm this bug exists on Arch as well with latest copter release.

EDIT: Just tested with master and this bug does not show up. It seems to be resolved, I believe this issue can be closed now. @khancyr (pref w/ a new release with the fix, since it is build breaking)

The problem is happening due to the latest update of GCC 10.2.0 . Downgrade the packages of gcc-core, gcc-g++ and libgcc to 9.3.0-2 in cygwin environment . Then the problem will be resolved.

Was this page helpful?
0 / 5 - 0 ratings