christianrauch / msp

Implementation of the MultiWii Serial Protocol (MSP) for MultiWii and Cleanflight flight controller
http://www.multiwii.com/wiki/index.php?title=Multiwii_Serial_Protocol
GNU Lesser General Public License v3.0
80 stars 27 forks source link

Error Compiling on RPi Arch #16

Closed emwjacobson closed 6 years ago

emwjacobson commented 6 years ago

After cloning repo I entered the folder and ran the mkdir build && cd build && cmake ..&& make -j and got this response: https://pastebin.com/C0sHTZ1y

I installed this version of asio, and have devtools installed.

Im not sure what to do to resolve this, any help would be appreciated.

EDIT: Im running Arch Linux on a Raspberry Pi 3.

christianrauch commented 6 years ago

The C++11 standard types function, bind, placeholders are missing.This might simply be caused by a missing include of <functional>, since all three types are defined there. I am using gcc 5.4.0, but do not get this error. There might be a difference in how gcc 5and 7 handle the order of includes.

Can you simply try to compile with gcc 5.4? Or alternatively add #include <functional> to the header and send a PR if this solves the problem.

christianrauch commented 6 years ago

I just added this header anyway, since I got the same problem under Ubuntu 18.04. Just update the master branch and build again.

emwjacobson commented 6 years ago

https://github.com/christianrauch/msp/commit/e0136692e0ecbaf8faf340fa3e58eae1e196e3e7 has fixed my problem, thanks!