Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SITL compile error in fedora 32 #14351

Closed
jinchengde opened this issue May 12, 2020 · 6 comments
Closed

SITL compile error in fedora 32 #14351

jinchengde opened this issue May 12, 2020 · 6 comments
Assignees

Comments

@jinchengde
Copy link
Contributor

jinchengde commented May 12, 2020

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

@jancoow
Copy link

jancoow commented May 28, 2020

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

@khancyr khancyr self-assigned this Jun 11, 2020
@acxz
Copy link
Contributor

acxz commented Jul 5, 2020

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)

@khancyr
Copy link
Contributor

khancyr commented Aug 10, 2020

closed by #13921

@khancyr khancyr closed this as completed Aug 10, 2020
@rkroshan
Copy link

rkroshan commented Oct 3, 2020

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.

@Thodoris-Evangelakos
Copy link

What if we're not using cygwin? Should we still downgrade to that specific version?

@lirahc
Copy link

lirahc commented Jul 8, 2022

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.

Hello @rkroshan, how I make that in my ubuntu (WsL)

sudo gcc --version 
sudo # ...

And after that I dont know how make this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants