[CRIU] [PATCH] make: protobuf -- Rework build procedure
Ruslan Kuprieiev
kupruser at gmail.com
Wed Jan 21 11:10:51 PST 2015
On 01/21/2015 09:03 PM, Pavel Emelyanov wrote:
> On 01/21/2015 09:52 PM, Ruslan Kuprieiev wrote:
>> Yes, we use custom field options to mark fields that need to be treated in a
>> special way when converting to json and back. Currently we only use hex option,
>> which tells CRIT to represent a field as a hex string, instead of decimal integer,
>> because json doesn't support hex notation for integers.
>>
>> Unfortunately, I couldn't find a way to make protoc-c compile everything properly
>> without this link.
> The protoc-c accepts several -I options. You can include the system directory
> with it, like this
>
> # protoc-c -I/usr/include/ -I. protobuf/opts.proto --c_out .
>
> will compile the opts.proto w/o the link.
Thats true, that is exactly what I did in pycriu/images/Makefile when
compiling
with protoc. But with protoc-c it will be a bit messier, as .proto,
.pb-c.c and .pb-c.h
need to be located in the same dir, and I'm not sure that compiled(by
gcc or by protoc-c)
*.o, *.c, *.h files should be littering /usr/include.
And it will still require protobuf-devel package.
> Thanks,
> Pavel
>
More information about the CRIU
mailing list