Build problem
hooger opened this issue · 2 comments
I try to compile the library on desktop first and if it works, than see what happens if I fire it up on a PinePhone.
So far I managed to get cmake generate the Makefile on Debian 10. I had to use the upstream libusbgx library (from https://github.com/libusbgx/libusbgx), because I couldn't build the one linked in the readme.
After cmake ..
I run make
and I see the following:
>> make
[ 1%] Built target backward
[ 1%] Built target backward_object
[ 2%] Built target dhparam
AAServer/CMakeFiles/AAServer.dir/build.make:81: *** target pattern contains no '%'. Stop.
make[1]: *** [CMakeFiles/Makefile2:283: AAServer/CMakeFiles/AAServer.dir/all] Error 2
make: *** [Makefile:150: all] Error 2
The line AAServer/CMakeFiles/AAServer.dir/build.make:81
is
AAServer/MediaStreamType.pb.h: AAServer/protobuf::protoc
Any idea where it went south?
Looks to me like missing protobuf compiler. Do you have protoc?
As for libusbgx - I probably should mention the official one in readme as well.
Indeed, the problem was solved by installing protobuf-compiler package. Then I saw this:
error: ‘__u16’ does not name a type; did you mean ‘__y1l’?
const __u16 *shortView = (const __u16 *)(msg.data());
^~~~~
__y1l
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:193,
from /usr/include/stdlib.h:394,
from /usr/include/c++/8/cstdlib:75,
from /usr/include/boost/config/platform/linux.hpp:15,
from /usr/include/boost/config.hpp:57,
from /usr/include/boost/signals2/deconstruct.hpp:27,
from /usr/include/boost/signals2.hpp:15,
from /home/horvathg/build/AACS/AAServer/include/ChannelHandler.h:6,
from /home/horvathg/build/AACS/AAServer/include/VideoChannelHandler.h:5,
from /home/horvathg/build/AACS/AAServer/src/VideoChannelHandler.cpp:3:
/home/horvathg/build/AACS/AAServer/src/VideoChannelHandler.cpp:301:36: error: ‘shortView’ was not declared in this scope
auto messageType = be16_to_cpu(shortView[0]);
in the following files:
AAServer/src/ChannelHandler.cpp
AAServer/src/VideoChannerlHandler.cpp
AAServer/src/InputChannerlHandler.cpp
Adding#include <linux/types.h>
solved these issues.
I created #8 to push mentioned changed.