imposm-parser icon indicating copy to clipboard operation
imposm-parser copied to clipboard

Install on OSX - installation ok, but running throws - Symbol not found: __ZN6google8protobuf11MessageLite15ParseFromStringERKSs

Open trebor74hr opened this issue 9 years ago • 2 comments

Hi,

I installed on OSX like this:

brew install protobuf
pip install imposm.parser

Everything went fine, but when I tested library, e.g.:

python -c"from imposm.parser.pbf import OSMPBF"

it reported error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: dlopen(/Users/rlujo/env/invh/busni/pybiz/lib/python2.7/site-packages/imposm/parser/pbf/OSMPBF.so, 
  2): Symbol not found: __ZN6google8protobuf11MessageLite15ParseFromStringERKSs
  Referenced from: /Users/rlujo/env/invh/busni/pybiz/lib/python2.7/site-packages/imposm/parser/pbf/OSMPBF.so
  Expected in: flat namespace
 in /Users/rlujo/env/invh/busni/pybiz/lib/python2.7/site-packages/imposm/parser/pbf/OSMPBF.so

I have spent some time on investigation, it seems that there is some problem in linking osmpbf.so and libprotobuf.dylib, the signature of the method ZN6google8protobuf11MessageLite15ParseFromStringERK... is mismatched.

Solution in my case was upgrading XCode from 4.8 to 6.2 and reinstalling protobuf and imposm.parser:

pip uninstall imposm.parser
brew uninstall protobuf
brew install protobuf
pip install imposm.parser

Hope this will help someone.

trebor74hr avatar Oct 09 '15 09:10 trebor74hr

I had the same problem, but this solution didn't fix it for me. I was actually using a conda environment. After many tries I created a new virtualenv, not using conda, that worked for a reason unknown to me. Both were with python.2.7.10.

Gijs-Koot avatar Dec 21 '15 20:12 Gijs-Koot

Try adding CC=gcc-5 CXX=g++-5 before pip install imposm.parser

unvaiso avatar Jun 23 '17 01:06 unvaiso