Changes

Jump to: navigation, search

Installation

392 bytes removed, 00:41, 26 July 2014
Protocol Buffers with C Bindings
=== Protocol Buffers with C Bindings ===
 
CRIU uses the [http://code.google.com/p/protobuf-c/ C language bindings] of [http://code.google.com/p/protobuf/ Google Protocol Buffers] for serialization. The <code>protoc</code> tool is required at build time and <code>libprotobuf-c.so</code> is required at build time and at run time, assuming dynamic linking.
==== Distribution Packages ====
CRIU uses the C bindings of Google's Protocol Buffers. The easiest approach for most would be to install a distribution packages. RPM package namenames: <code>protobuf-compiler</code>,<code>protobuf-c-devel</code>. Debian package namenames: <code>protobuf-compiler</code>, <code>libprotobuf-c0-dev</code>.
==== Building Protocol Buffers From Source ====
If you would like to build from source instead of using a package, the Protocol Buffer library can be found at http://code.google.com/p/protobuf/, while the Protocol Buffer C bindings can be found at http://code.google.com/p/protobuf-c/. You you can use the following commands to obtain the source code repositories via <code>git</code>. Note that when cross compiling you will need to compile once for your build machine in order to get a <code>protoc</code> binary to use in the build process, configure, and build once for each target machine to generate <code>libprotobuf-c.so</the code>.
mkdir deps
cd deps
git svn clone http://protobuf.googlecode.com/svn/trunk protobuf
cd protobuf
./autogen.sh
./configure --prefix=`pwd`/../`uname -m`
make
make install
cd .. If you are cross compiling, then you will additionally want to build a version for your target architecture. This example targets AArch64.  cd protobuf ./configure --host=aarch64-linux-gnu --prefix=`pwd`/aarch64 --with-protoc=`pwd`/`uname -m`/bin/protoc make make install cd ..
cd deps
git svn clone http://protobuf-c.googlecode.com/svn/trunk protobuf-c
cd protobuf-c
./autogen.sh ./configure --prefix=`pwd`/`uname -m` PATH="`pwd`/../protobuf/`uname -m`/bin:$PATH"--disable-protoc
make
make install
50
edits

Navigation menu