Avahi and Protobuf-c packages

60 views
Skip to first unread message

Mustafa Yuce

unread,
Jul 6, 2015, 4:15:02 AM7/6/15
to plan4...@googlegroups.com
It seems Avahi and Protobuf-C packages are used in the vcdc project. How can we install these packages. Is there any link about these packages those we can load to plan44 device. Actually we found this link "https://packages.debian.org/source/sid/avahi" about Avahi. But we couldnt know which package we will download. Could you please help us? 

Lukas Zeller

unread,
Jul 6, 2015, 8:37:09 AM7/6/15
to Mustafa Yuce, plan4...@googlegroups.com
Hi Mustafa,

vdcd does not need avahi (at this time - this might change in a future version though). The vdsm however does need avahi when you build it to run outside of the P44-DSB-X. On the P44-DSB-X you already have a vdsm and a separate daemon (avahi44) running, and only need to build vdcd.

To build the vdcd (and the vdsm if you must), on a P44-DSB-X or on a Linux desktop PC, I really recommend you follow the instructions in "How to build vdsm and vdcd on Linux - in particular Raspian on P44-DSB-X.md", it's in the docs folder and explains all those questions, including installation of avahi (hint, it's just: apt-get install libavahi-client-dev), and all other dependencies like protobuf-c.

Of course, if you get stuck with that how-to document, let me know. Altough I tested the how-to step by step on two fresh machines, and really took care to document every detail, of course I might still have missed something. But it would be most useful to know where in the how-to you experienced a problem, so I can check and possibly improve it.

Best Regards,

Lukas

Mustafa Yuce

unread,
Jul 7, 2015, 4:25:28 AM7/7/15
to plan4...@googlegroups.com, mustaf...@gmail.com
Hi Lukas;

First of all we have encountered a problem about protobuf-c. In vcdc in messages.pb-c.h file there is a section like this;

#if PROTOBUF_C_VERSION_NUMBER < 1000000
# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
#elif 1000002 < PROTOBUF_C_MIN_COMPILER_VERSION
# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
#endif

Here there is no PROTOBUF_C_VERSION_NUMBER variable in header file. We thought it is about version. So we included new protobuf-c.h, protobuf-c.c into our project. And we overcome this issue. May be you have some explanation about this issue. 

Secondly in oladevicecontainer.hpp file there is a section like ;

#include <ola/DmxBuffer.h>

Here it needs ola library. When we look at your "build document" i cant see any information about ola. How can we resolve this issue?

Kind Regards,

Mustafa Yüce.


6 Temmuz 2015 Pazartesi 15:37:09 UTC+3 tarihinde luz yazdı:

Lukas Zeller

unread,
Jul 7, 2015, 9:15:42 AM7/7/15
to Mustafa Yuce, plan4...@googlegroups.com
Hi Mustafa,

> On 07.07.2015, at 10:25, Mustafa Yuce <mustaf...@gmail.com> wrote:
>
> Hi Lukas;
>
> First of all we have encountered a problem about protobuf-c. In vcdc in messages.pb-c.h file there is a section like this;
>
> #if PROTOBUF_C_VERSION_NUMBER < 1000000
> # error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
> #elif 1000002 < PROTOBUF_C_MIN_COMPILER_VERSION
> # error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
> #endif
>
> Here there is no PROTOBUF_C_VERSION_NUMBER variable in header file. We thought it is about version. So we included new protobuf-c.h, protobuf-c.c into our project. And we overcome this issue. May be you have some explanation about this issue.

This is probably because the git repo includes the generated protobuf files (in src/pbuf/gen), to allow building vdcd on platforms which do not have the protobuf c compiler. These generated files depend on the protoc version installed on the build platform, which might not be the same on my build platform as on yours.

When you build according to the howto, there's a "make clean" step which deletes these files, so the actual make will regenerate them matching the build platform's protoc version.

I'm can't tell you how to integrate the protoc build steps into your project, but maybe looking at Makefile.am, lines 10..28 will help, that's how these files are built.

> Secondly in oladevicecontainer.hpp file there is a section like ;
>
> #include <ola/DmxBuffer.h>
>
> Here it needs ola library. When we look at your "build document" i cant see any information about ola. How can we resolve this issue?

If you build as described in the how-to, OLA will not be required.

The makefile contains two targets for vdcd, one called "vdcd" and the other called "olavdcd". Only the latter needs OLA. The former does not even contain the oladevicecontainer.hpp file, so it builds without any OLA support installed. And any regular make build will only build "vdcd".

But as you don't seem to use the makefile, you need to manually pick (or rather - NOT pick) the right files; OLA is not the only depenendcy you'll run into if you just try to compile everything.

So exclude from /src/deviceclasses at least "demo", "ledchain", "ola" and "upnphack".

Best Regards,

Lukas Zeller

Reply all
Reply to author
Forward
0 new messages