PX4 / PX4-Flow

Firmware for PX4FLOW board
236 stars 340 forks source link

Error in build #128

Closed rushilkhurana closed 4 years ago

rushilkhurana commented 4 years ago

I have a PX4FLOW Smart Camera Sensor Board. I was following the build instructions at https://docs.px4.io/v1.9.0/en/sensor/px4flow.html#build

I was able to successfully install the PX4 toolchain. Then to build this code,

I cloned the directory, and followed the instructions. I was able to successfully do make archives. However, when I run 'make', I get the following error:

In file included from /Users/sylar/PX4/Flow/src/lib/uavcan/libuavcan/include/uavcan/node/node.hpp:14:0,
                 from /Users/sylar/PX4/Flow/src/lib/uavcan/libuavcan/include/uavcan/uavcan.hpp:14,
                 from /Users/sylar/PX4/Flow/src/lib/uavcan/libuavcan_drivers/stm32/driver/include/uavcan_stm32/uavcan_stm32.hpp:7,
                 from /Users/sylar/PX4/Flow/src/modules/uavcannode/uavcannode_main.hpp:37,
                 from /Users/sylar/PX4/Flow/src/modules/uavcannode/uavcannode_main.cpp:39:
/Users/sylar/PX4/Flow/src/lib/uavcan/libuavcan/include/uavcan/protocol/node_status_provider.hpp:14:10: fatal error: uavcan/protocol/NodeStatus.hpp: No such file or directory
 #include <uavcan/protocol/NodeStatus.hpp>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [uavcannode_main.cpp.o] Error 1
make[1]: *** [/Users/sylar/PX4/Flow/Build/px4flow-v2_default.build//Users/sylar/PX4/Flow/src/modules/uavcannode/module.pre.o] Error 2
make: *** [/Users/sylar/PX4/Flow/Build/px4flow-v2_default.build/firmware.px4] Error 2

I am on MAC OSX Catalina.

Any ideas on how to fix this?

radnvlad commented 4 years ago

Hmm, I'm not too familiar with this build system but I'm going to take a crack at this.

rushilkhurana commented 4 years ago

I have a working directory until-

/Users/sylar/PX4/Flow/Build/px4flow-v2_default.build/Users/sylar/PX4/Flow/src/modules/uavcannode/dsdlc_generated/uavcan

It has only two files:

CoarseOrientation.hpp Timestamp.hpp

It does not have any folder for protocol which should contain the missing file.

Yes, the directory:

~/Flow/src/lib/uavcan

exists, and it has a bunch of files.

When I do a git status in this folder, I get:

HEAD detached at 4dff5c22 nothing to commit, working tree clean

So, it looks like it did successfully clone.

rushilkhurana commented 4 years ago

I am not sure why it solved the issue, but for future reference- on my setup, I had to download the PX4 Firmware and follow the Clang instructions here: https://dev.px4.io/v1.9.0/en/setup/dev_env_linux_ubuntu.html#clang

In the Clang instructions, I removed the rpi specific paths.

When I built and uploaded the Flow repository afterwards, I did not get the above issue and was able to make all.

Even though this is not a requirement listed for Mac, this is the only way I could get it to successfully work with my setup.

I am having other (possibly related?) issues with the output, and I will open a new issue for that.