[CRIU] [PATCH] make: protobuf -- Rework build procedure

Pavel Emelyanov xemul at parallels.com
Wed Jan 21 11:14:28 PST 2015


On 01/21/2015 10:10 PM, Ruslan Kuprieiev wrote:
> 
> 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.

I guess it's a problem of protoc-c that it doesn't use "standard" paths
as gcc does.

> And it will still require protobuf-devel package.

Yes, of course.

Thanks,
Pavel



More information about the CRIU mailing list