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

Fix libprotobuf error File already exists in database #192

Open
phildow opened this issue May 12, 2020 · 0 comments
Open

Fix libprotobuf error File already exists in database #192

phildow opened this issue May 12, 2020 · 0 comments
Assignees
Milestone

Comments

@phildow
Copy link
Contributor

phildow commented May 12, 2020

For applications that use the TensorFlow backend it is not possible for the Test targets to have a host application. Which means that tests can target application code. Not good.

With default setting we see the following error when trying to build a Test target:

[libprotobuf ERROR google/protobuf/descriptor_database.cc:58] 
File already exists in database: tensorflow/contrib/boosted_trees/proto/learner.proto

[libprotobuf FATAL google/protobuf/descriptor.cc:1358]
CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size):

The only solution is to set the Host Application to None for the test target

This leads to a second problem where symbols cannot be found during test target linking, which can only be solved by modifying the test target block in the Podfile to comment out:

# inherit! :search_paths

I believe this is a problem with coocapods linking the library twice, once into the host application and the second time into the test target.

@phildow phildow added this to the v1.x milestone May 13, 2020
@phildow phildow self-assigned this Jun 10, 2020
This was referenced Jun 12, 2020
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

1 participant