Has Anyone Used protobuf on ucLinux?

46 views
Skip to first unread message

Doug Lewis

unread,
Mar 14, 2017, 3:56:04 PM3/14/17
to Protocol Buffers
I've been tasked with seeing if we can use protobuf on ucLinux (micro c Linux).  We had previously been using an embedded version of Debian Linux and we had protobuf working very well on it.

The specific issue I am having is as I'm building the protobuf code I get this compile error:

google/protobuf/compiler/subprocess.cc:304: error: 'fork' was not declared in this scope

ucLinux does not support 'fork' but it does have 'vfork'.  I do not relish the idea of modifying the protobuf source code to change any 'fork' calls to 'vfork' and was wondering if anyone else has "ported" protobuf to ucLinux.

Thanks,
Doug

Ilia Mirkin

unread,
Mar 14, 2017, 4:02:30 PM3/14/17
to Doug Lewis, Protocol Buffers
This is in the protobuf compiler. Do you plan on compiling protobuf
proto definitions into source code on your ucLinux platform itself?
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to protobuf+u...@googlegroups.com.
> To post to this group, send email to prot...@googlegroups.com.
> Visit this group at https://groups.google.com/group/protobuf.
> For more options, visit https://groups.google.com/d/optout.

Doug Lewis

unread,
Mar 14, 2017, 4:35:57 PM3/14/17
to Protocol Buffers
My host platform is an Ubuntu Linux box where the protoc compiler will run to generate the C++ code that will be cross compiled to run on the uClinux target.

Doug

Ilia Mirkin

unread,
Mar 14, 2017, 4:41:22 PM3/14/17
to Doug Lewis, Protocol Buffers
So then you don't need the code that's giving you errors - it's part
of protoc. It's been way too many moons since I've looked at the
details for how to only build the lib and not protoc, or even if it's
still possible, but you might find that that's the path of least
resistance.

Doug Lewis

unread,
Mar 14, 2017, 4:50:25 PM3/14/17
to Protocol Buffers
Ah I see that in the full output of the make process now.

Yes all I really need is to get the libraries built with the cross compiler.

Thank you!


Doug

On Tuesday, March 14, 2017 at 2:56:04 PM UTC-5, Doug Lewis wrote:

Ilia Mirkin

unread,
Mar 16, 2017, 11:35:32 AM3/16/17
to Doug Lewis, Protocol Buffers
By the way, you may be interested in the nanopb and protobuf-c
implementations, which likely have fewer dependencies.
Reply all
Reply to author
Forward
0 new messages