Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

protoc-gen-protobluff throwing an instance of 'std::system_error' #7

Open
b0661 opened this issue Jul 19, 2020 · 2 comments
Open

protoc-gen-protobluff throwing an instance of 'std::system_error' #7

b0661 opened this issue Jul 19, 2020 · 2 comments

Comments

@b0661
Copy link

b0661 commented Jul 19, 2020

Describe the bug

protoc --protobluff_out=. person.proto

creates an error:

terminate called after throwing an instance of 'std::system_error'
  what():  Unknown error -1
--protobluff_out: protoc-gen-protobluff: Plugin killed by signal 6.

To Reproduce

Steps to reproduce the behavior:

  1. Compile and install on Ubuntu
#! /usr/bin/env sh
# Install protobluff to user local

# Ubuntu
sudo apt install git gcc automake libtool protobuf-compiler libprotoc-dev libprotobuf-dev check

# get the sources
git clone https://github.com/squidfunk/protobluff protobluff.git
cd protobluff.git

# configure
./autogen.sh
./configure --prefix ${HOME}/.local

# build & test & install to user dir
make
make test
make install

# remove the git repository
cd ..
rm -rf protobluff.git
  1. Run protoc
protoc --protobluff_out=. person.proto

person.proto:

syntax = "proto2";

message Person {
  message PhoneNumber {
    enum PhoneType {
      MOBILE = 0;
      HOME = 1;
      WORK = 2;
    }
    required string number = 1;
    optional PhoneType type = 2 [default = HOME];
  }
  required string name = 1;
  required int32 id = 2;
  optional string email = 3;
  repeated PhoneNumber phone = 4;
}
  1. See error
terminate called after throwing an instance of 'std::system_error'
  what():  Unknown error -1
--protobluff_out: protoc-gen-protobluff: Plugin killed by signal 6.

Expected behavior

Generate without error.

Impact

showstopper

Logs and console output
N/A

Environment (please complete the following information):

  • OS: Linux, Ubuntu 19.10
  • Toolchain:
    • protoc --version: libprotoc 3.6.1
    • gcc --version: gcc (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008
  • Commit SHA or Version used: master

Additional context
N/A

@squidfunk
Copy link
Owner

squidfunk commented Jul 19, 2020

Thanks for reporting! I currently have no bandwidth to debug this. The GitHub Actions build still seems to work, so it may be related to some library incompatibilities. I'm happy to collaborate on a PR!

@mgrojo
Copy link

mgrojo commented May 5, 2022

In case this helps. I had a similar issue with a protoc-gen plugin for Ada [1], after finding this [2] I fixed adding pthread to the list of linked libraries.

[1] persan/protobuf-ada#1
[2] https://stackoverflow.com/questions/59455147/running-custom-protoc-plugin-on-linux-causes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants