I'm not familiar with R.  But, the error means that you've attempted to load
two different copies of rexp.pb.cc into the same process.  The protobuf
runtime requires that all compiled-in .proto files have unique names.

Note that if you have two files with the same name, but in different
directories, then you should make sure to run protoc from the common parent
directory.  E.g., if you have foo/myproto.proto and bar/myproto.proto, DON'T
do this:

  (cd foo && protoc myproto.proto)
  (cd bar && protoc myproto.proto)

In this case, protoc assigns the same name to both files.

Instead, you should do this:

  protoc foo/myproto.proto
  protoc bar/myproto.proto

Then the directory name becomes part of each file name, making them
different.  Note that you can also use --proto_path to identify the
top-level source directory instead of actually running protoc from it.

========

PS.  I notice you wrote this:

http://lists.r-forge.r-project.org/pipermail/rprotobuf-yada/2009-October/000000.html

There is a missing option (c) here:  Do like option (b), but do NOT copy the
protoc source code.  Instead, simply link against libprotoc, which is one of
the libraries included in the protobuf package -- it provides the
CommandLineInterface class, so all you need to do is write a CodeGenerator
implementation and a main() function.  The .proto language DOES change over
time (we add new features), so you should not try to write your own parser!

In the future I'm hoping to make protoc itself support "plugins"; see this
thread:
http://groups.google.com/group/protobuf/browse_thread/thread/1010da67218d45d2

On Wed, Oct 28, 2009 at 10:12 PM, Fishtank <saptarshi.g...@gmail.com> wrote:

>
> Hello,
> I use R 2.9.2 and have written two packages which use a proto file,
> one proto is a subset of the other.
> When I load both packages(one after the other,though order does not
> matter) loading the second causes the following crash
>
> libprotobuf ERROR google/protobuf/descriptor_database.cc:56] File
> already exists in database: rexp.proto
> libprotobuf FATAL google/protobuf/descriptor.cc:857] CHECK failed:
> generated_database_->Add(encoded_file_descriptor, size):
> Abort trap
>
>
> What does this mean, and is there something I'm doing wrong on my
> side?
> Thank you for your time
> Regards
> Saptarshi
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to