PX4, mavros gives this error while building

Starting  >>> px4                                                              
___________________________
Errors     << px4:make /home/vishal/logs/px4/build.make.010.log                
make[2]: * [uORB/topics/uORBTopics.hpp] Error 1
make[1]: * [msg/CMakeFiles/uorb_headers.dir/all] Error 2
make[1]: * Waiting for unfinished jobs....
make: * [all] Error 2
cd /home/vishal/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                [ 1.7 seconds ]                               
[build] Summary: 0 of 1 packages succeeded.                                    
[build]   Ignored:   None.                                                     
[build]   Warnings:  None.                                                     
[build]   Abandoned: None.                                                     
[build]   Failed:    1 packages failed.                                        
[build] Runtime: 1.8 seconds total.

I encounter the above error when I try to build my workspace sop_ws containing mavros and PX4-Autopilot
Ubuntu 18.04 and ROS melodic
Help is appreicated,
TIA