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

Python Protobuf library + Anaconda + cpp_implementation + Mac OS X Yosemite not working #647

Closed
BradNeuberg opened this issue Jul 28, 2015 · 2 comments

Comments

@BradNeuberg
Copy link

I am unable to get the Python-based protobuf library with the cpp_implementation optimization working against Anaconda (https://store.continuum.io/cshop/anaconda/).

I've ensured I don't have another installation of the protobuf libraries somewhere on my system. I can successfully build the protobuf library. "python setup.py build --cpp_implementation" also successfully runs.

However, when I run "python setup.py test --cpp_implementation" I get the following error:

Traceback (most recent call last):
File "setup.py", line 200, in
"Protocol Buffers are Google's data interchange format.",
File "/Users/bradneuberg/anaconda/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/Users/bradneuberg/anaconda/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/Users/bradneuberg/anaconda/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Users/bradneuberg/anaconda/lib/python2.7/site-packages/setuptools-18.0.1-py2.7.egg/setuptools/command/test.py", line 142, in run
File "/Users/bradneuberg/anaconda/lib/python2.7/site-packages/setuptools-18.0.1-py2.7.egg/setuptools/command/test.py", line 122, in with_project_on_sys_path
File "/Users/bradneuberg/anaconda/lib/python2.7/site-packages/setuptools-18.0.1-py2.7.egg/setuptools/command/test.py", line 163, in run_tests
File "/Users/bradneuberg/anaconda/lib/python2.7/unittest/main.py", line 94, in init
self.parseArgs(argv)
File "/Users/bradneuberg/anaconda/lib/python2.7/unittest/main.py", line 149, in parseArgs
self.createTests()
File "/Users/bradneuberg/anaconda/lib/python2.7/unittest/main.py", line 158, in createTests
self.module)
File "/Users/bradneuberg/anaconda/lib/python2.7/unittest/loader.py", line 130, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "/Users/bradneuberg/anaconda/lib/python2.7/unittest/loader.py", line 115, in loadTestsFromName
test = obj()
File "/usr/local/protobuf-2.6.1/python/setup.py", line 89, in MakeTestSuite
import google.protobuf.pyext.descriptor_cpp2_test as descriptor_cpp2_test
File "/usr/local/protobuf-2.6.1/python/google/protobuf/pyext/descriptor_cpp2_test.py", line 47, in
from google.protobuf.internal.descriptor_test import *
File "/usr/local/protobuf-2.6.1/python/google/protobuf/internal/descriptor_test.py", line 38, in
from google.protobuf import unittest_custom_options_pb2
File "/usr/local/protobuf-2.6.1/python/google/protobuf/unittest_custom_options_pb2.py", line 7, in
from google.protobuf import descriptor as _descriptor
File "/usr/local/protobuf-2.6.1/python/google/protobuf/descriptor.py", line 50, in
from google.protobuf.pyext import _message
ImportError: dlopen(/usr/local/protobuf-2.6.1/python/google/protobuf/pyext/_message.so, 2): Symbol not found: __ZNK6google8protobuf10TextFormat17FieldValuePrinter10PrintBytesERKSs
Referenced from: /usr/local/protobuf-2.6.1/python/google/protobuf/pyext/_message.so
Expected in: dynamic lookup

Full output of all my build steps and the final error in this gist: https://gist.github.com/BradNeuberg/01ff8633549e382f305b

The strange thing is I can get everything working if I use the Mac OS X system python (Python 2.7.6), but not Anaconda.

My environment:
Anaconda/Python: Python 2.7.10 :: Anaconda 2.1.0 (x86_64)
Mac OS X 10.10.4 (Yosemite)
Protobuf download (not git checkout) 2.6.1

GCC details:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.4.0
Thread model: posix

Xcode command line tools installed (but not the full Xcode), version 6.4

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Jan 21, 2016

Sorry but we haven't used (or tested against) Annaconda before. If you are able to figure out the issue, feel free to send us a pull request.

@anandolee
Copy link
Contributor

Closing it for no response. Feel free to reopen if it is still an issue

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

No branches or pull requests

3 participants