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

Symbol not found: _libpostal_address_parser_response_destroy on macos M1 #70

Open
somesh636 opened this issue Apr 5, 2021 · 8 comments

Comments

@somesh636
Copy link

I am getting this error on macos M1 core and I have tried to compile the source code to regenerate the .so files. However, I am unable to resolve this issue. The detail of the error is as below.

from postal import _parser ImportError: dlopen(/Users/someshgupta/opt/anaconda3/envs/fd_analysis/lib/python3.6/site-packages/postal/_parser.cpython-36m-darwin.so, 2): Symbol not found: _libpostal_address_parser_response_destroy Referenced from: /Users/someshgupta/opt/anaconda3/envs/fd_analysis/lib/python3.6/site-packages/postal/_parser.cpython-36m-darwin.so Expected in: flat namespace in /Users/someshgupta/opt/anaconda3/envs/fd_analysis/lib/python3.6/site-packages/postal/_parser.cpython-36m-darwin.so

Is there a way to resolve this issue?

@rjurney
Copy link

rjurney commented Sep 20, 2021

+1

@lorenzodemiri
Copy link

Hi guys, have you found a way to solve this issue?

@JochenFromm
Copy link

In my case the only thing that helped on a new M1 MacBook was to switch from Python version 3.6 or 3.8 (which apparently do not work) to 3.9 or 3.10. See openvenues/libpostal#585

@proxhavasi
Copy link

+1

@JochenFromm
Copy link

JochenFromm commented Jul 17, 2024

I met the problem again on an M1 MacBook and this time it only helped to create an x68 environment. Otherwise nothing helped, even if the terminal is already in an i386 mode using Rosetta it is apparently not enough for newer Conda versions. Conda can create x86 environments on Mac Arm as described here

conda create -n my_x86_env -y
conda activate my_x86_env
conda config --env --set subdir osx-64
conda install python=3.11

@rjurney
Copy link

rjurney commented Jul 18, 2024

Have you built libpostal for OS X? I've found that make distclean and rebuilding with SSE off can help this kind of issue. Also, the new Senzing model works much better.

git clone https://github.com/openvenues/libpostal.git
cd libpostal
make distclean
./bootstrap.sh
# Disable SSE2 so it will work on Apple ARM processors (optional)
./configure –datadir=/tmp –disable-sse2 MODEL=senzing
make -j6
make install

@JochenFromm
Copy link

yes, but without the senzing model parameter and with -j4 instead of -j6

@rjurney
Copy link

rjurney commented Jul 18, 2024

Be sure to run make distclean before rebuilding.

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

5 participants