Not able to build workspace containing PX4 autopilot package

I have installed the PX4 Autopilot package and placed it in a workspace named “test_ws”. While building the workspace, the following error appears.

sharonrichushaji@sharonrichushaji-aspire-r5-471t:~/test_ws$ catkin build

Profile: default
Extending: [cached] /opt/ros/melodic
Workspace: /home/sharonrichushaji/test_ws

Build Space: [exists] /home/sharonrichushaji/test_ws/build
Devel Space: [exists] /home/sharonrichushaji/test_ws/devel
Install Space: [unused] /home/sharonrichushaji/test_ws/install
Log Space: [exists] /home/sharonrichushaji/test_ws/logs
Source Space: [exists] /home/sharonrichushaji/test_ws/src
DESTDIR: [unused] None

Devel Space Layout: linked
Install Space Layout: None

Additional CMake Args: None
Additional Make Args: None
Additional catkin Make Args: None
Internal Make Job Server: True
Cache Job Environments: False

Whitelisted Packages: None
Blacklisted Packages: None

Workspace configuration appears valid.

[build] Found ‘1’ packages in 0.0 seconds.
[build] Package table is up to date.
Starting >>> px4

Errors << px4:make /home/sharonrichushaji/test_ws/logs/px4/build.make.001.log
make[2]: *** [src/lib/mixer/MultirotorMixer/mixer_multirotor.generated.h] Error 1
make[1]: *** [src/lib/mixer/MultirotorMixer/CMakeFiles/mixer_gen.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
make[2]: *** [uORB/topics/uORBTopics.hpp] Error 1
make[1]: *** [msg/CMakeFiles/uorb_headers.dir/all] Error 2
make[2]: *** [src/lib/mixer/MultirotorMixer/mixer_multirotor_6dof.generated.h] Error 1
make[1]: *** [src/lib/mixer/MultirotorMixer/CMakeFiles/mixer_gen_6dof.dir/all] Error 2
make: *** [all] Error 2
cd /home/sharonrichushaji/test_ws/build/px4; catkin build --get-env px4 | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd -

Failed << px4:make [ Exited with code 2 ]
Failed <<< px4 [ 2.4 seconds ]
[build] Summary: 0 of 1 packages succeeded.
[build] Ignored: None.
[build] Warnings: None.
[build] Abandoned: None.
[build] Failed: 1 packages failed.
[build] Runtime: 2.4 seconds total.

How do I solve this build failure?