Changes

392 bytes removed ,  00:41, 26 July 2014
Line 18: Line 18:     
=== 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 ====
 
==== 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 name: <code>protobuf-c-devel</code>. Debian package name: <code>libprotobuf-c0-dev</code>.
+
The easiest approach for most would be to install distribution packages. RPM package names: <code>protobuf-compiler</code>,<code>protobuf-c-devel</code>. Debian package names: <code>protobuf-compiler</code>, <code>libprotobuf-c0-dev</code>.
    
==== Building Protocol Buffers From Source ====
 
==== 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 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, and build once for each target machine to generate <code>libprotobuf-c.so</code>.
+
If you would like to build from source, you can use the following commands to obtain the source code repositories, configure, and build the code.
    +
mkdir deps
 +
cd deps
 
  git svn clone http://protobuf.googlecode.com/svn/trunk protobuf
 
  git svn clone http://protobuf.googlecode.com/svn/trunk protobuf
 
  cd protobuf
 
  cd protobuf
 
  ./autogen.sh
 
  ./autogen.sh
  ./configure --prefix=`pwd`/`uname -m`
+
  ./configure --prefix=`pwd`/../`uname -m`
 
  make
 
  make
 
  make install
 
  make install
  cd ..
+
  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
 
  git svn clone http://protobuf-c.googlecode.com/svn/trunk protobuf-c
 
  cd protobuf-c
 
  cd protobuf-c
  ./autogen.sh
+
  ./autogen.sh --prefix=`pwd`/../`uname -m` --disable-protoc
./configure --prefix=`pwd`/`uname -m` PATH="`pwd`/../protobuf/`uname -m`/bin:$PATH"
   
  make
 
  make
 
  make install
 
  make install
50

edits