$ python Python 3.5.5 (default, Apr 24 2018, 21:05:32) [GCC 6.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import tensorflow >>> import cv2 [libprotobuf ERROR /var/tmp/portage/dev-libs/protobuf-3.6.1.3/work/protobuf-3.6.1.3/src/google/protobuf/descriptor_database.cc:111] Symbol name "tensorflow.AttrValue" conflicts with the existing symbol "tensorflow.AttrValue". [libprotobuf FATAL /var/tmp/portage/dev-libs/protobuf-3.6.1.3/work/protobuf-3.6.1.3/src/google/protobuf/descriptor.cc:1358] CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size): terminate called after throwing an instance of 'google::protobuf::FatalException' what(): CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size): Aborted (same results in python2.7 and python3.6) While I could find very little info on google that seemed pertinent, https://stackoverflow.com/questions/51795326/static-linking-of-protocol-buffers-results-in-conflicts-with-existing-symbols?rq=1 may be relevant, and https://github.com/tensorflow/tensorflow/issues/9525 might be tangentially related.
This https://github.com/tensorflow/tensorflow/pull/19966 seems relevant.
same here. No changes for tensorflow-1.13.1. I've tested protobuf-3.7.1 and 3.6.1.3: no difference between them. That patch, mentioned by Amy Liffey is present (at least in ./tensorflow/BUILD) - but something's going on behind the scenes. :-( HOME\peter@hydra ~/PreyBlocker/Main/TrainAndTest_01 $ ./test.py [libprotobuf ERROR /var/tmp/portage/dev-libs/protobuf-3.7.1/work/protobuf-3.7.1/src/google/protobuf/descriptor_database.cc:111] Symbol name "tensorflow.TensorShapeProto" conflicts with the existing symbol "tensorflow.TensorShapeProto". [libprotobuf FATAL /var/tmp/portage/dev-libs/protobuf-3.7.1/work/protobuf-3.7.1/src/google/protobuf/descriptor.cc:1370] CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size): terminate called after throwing an instance of 'google::protobuf::FatalException' what(): CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size): Aborted
Created attachment 591018 [details, diff] Rename tensorflow namespace patch I found the fix finally: https://github.com/opencv/opencv/pull/10092 https://github.com/opencv/opencv/commit/cb5da8983f911002ba8a316695c634111a62d274 Applying that commit to opencv fixes it for me. The fix is in opencv-3.4.4, so best is just to bump the package, there are several new versions that are not yet in the tree. The patch does not apply as-is, ive attached the fixed patched which works when put in epatch_user
Works for me, thanks!
All versions of opencv lower than 3.4.4 have been removed. Presumably, this bug can be marked as resolved.
I am taking the liberty of closing this, per the prior comment and because tensorflow-1.x is no longer available in the gentoo repo. Hope that's OK.