Protobuf-c-1.5.2

#### Beyond Linux® From Scratch (systemd Edition) - Version r13.0-1303

### Chapter 9. General Libraries

- Prev

  Protobuf-35.1

- Next

  Qca-2.3.10

- Up
- Home

# Protobuf-c-1.5.2

## Introduction to Protobuf-c

The Protobuf-c package contains an implementation of the Google Protocol Buffers data serialization format in C.

### Note

This package is known to build and work properly using an LFS 13.1 platform.

### Package Information

- Download (HTTP): https://github.com/protobuf-c/protobuf-c/releases/download/v1.5.2/protobuf-c-1.5.2.tar.gz

- Download MD5 sum: 0612ee47cccaaf4ad1c4f0c8bdc13abf

- Download size: 520 KB

- Estimated disk space required: 56 MB

- Estimated build time: 0.6 SBU (with tests)

### Additional Downloads

- Required patch: https://www.linuxfromscratch.org/patches/blfs/svn/protobuf-c-1.5.2-protobuf34_fix-1.patch

### Protobuf-c Dependencies

#### Required

Protobuf-35.1

#### Optional

Doxygen-1.18.0

## Installation of Protobuf-c

First fix issues caused by protobuf-34 and later:

    patch -Np1 -i ../protobuf-c-1.5.2-protobuf34_fix-1.patch

Install Protobuf-c by running the following commands:

    CXXFLAGS="${CXXFLAGS:--O2 -g} -std=c++20" \
    ./configure --prefix=/usr --disable-static &&
    make

To test the results, issue: make check.

Now, as the `root` user:

    make install

## Command Explanations

`CXXFLAGS="${CXXFLAGS:--O2 -g} -std=c++20"`: Override the default C++ standard (C++ 2017) of this package, as the headers from protobuf-35 and later require C++ 2020 features.

`--disable-static`: This switch prevents installation of static versions of the libraries.

## Contents

Installed Programs: protoc-gen-c and protoc-c (symlinked to protoc-gen-c)
Installed Libraries: libprotobuf-c.so
Installed Directories: /usr/include/google and /usr/include/protobuf-c

### Short Descriptions

protoc-c | generates C descriptor code from a .proto file
`libprotobuf-c.so` | contains a C implementation of the Google Protocol Buffers data serialization format

- Prev

  Protobuf-35.1

- Next

  Qca-2.3.10

- Up
- Home