# Problem with building Px4

**URL:** <https://discuss.px4.io/t/problem-with-building-px4/17209>\
**Category:** PX4 Autopilot\
**Created:** [June 17, 2020, 6:59am UTC](https://discuss.px4.io/t/problem-with-building-px4/17209 "2020-06-17T06:59:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![YuryArnold](https://discuss.px4.io/user_avatar/discuss.px4.io/yuryarnold/32/6717_2.png) [@YuryArnold](https://discuss.px4.io/u/YuryArnold)\
**Post date:** [June 17, 2020, 6:59am UTC](https://discuss.px4.io/t/problem-with-building-px4/17209/1 "2020-06-17T06:59:45Z")

</div>

Hi everyone! I downloaded from git source of px4 autopilot as was described here: [https://dev.px4.io/master/en/setup/building\_px4.html](https://dev.px4.io/master/en/setup/building_px4.html)

After that I want to build it with my board configuration (pixhawk1), before I installed a toolchain for it:  
[https://dev.px4.io/master/en/setup/dev\_env\_linux\_ubuntu.html](https://dev.px4.io/master/en/setup/dev_env_linux_ubuntu.html)  
Toolchain I get with ubuntu.sh

I run " make px4\_fmu-v2\_default "

And when I build it with make, I had This:

…/…/platforms/common/include/px4\_platform\_common/atomic.h:169:34: error: parameter ‘expected’ set but not used [-Werror=unused-but-set-parameter]  
inline bool compare\_exchange(T \*expected, T desired)  
^ ~~~~~~~  
compilation terminated due to -Wfatal-errors.  
cc1plus: all warnings being treated as errors  
[473/735] Building CXX object src/modu…\_commander.dir/mag\_calibration.cpp.obj  
ninja: build stopped: subcommand failed.

What I have to change in make or in cmake, for avoiding it?
