unum-cloud / usearch

Fast Open-Source Search & Clustering engine Ɨ for Vectors & šŸ”œ Strings Ɨ in C++, C, Python, JavaScript, Rust, Java, Objective-C, Swift, C#, GoLang, and Wolfram šŸ”
https://unum-cloud.github.io/usearch/
Apache License 2.0
2.27k stars 143 forks source link

Bug: segmentation fault loading usearch.sqlite extension on macOS M2 #371

Closed simonw closed 7 months ago

simonw commented 8 months ago

Describe the bug

I got error zsh: segmentation fault python trying to run conn.load_extension(usearch.sqlite) on macOS (M2).

Steps to reproduce

I ran python -m pip install usearch and then this:

>>> import usearch
>>> usearch.sqlite
'/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/site-packages/usearch/compiled.cpython-310-darwin.so'
>>> 
>>> import sqlite3
>>> import usearch
>>> 
>>> conn = sqlite3.connect(":memory:")
>>> conn.enable_load_extension(True)
>>> conn.load_extension(usearch.sqlite)

I got the error:

zsh: segmentation fault  python

Expected behavior

No segmentation fault.

USearch version

2.9.2

Operating System

macOS Sonoma 14.1.1 (23B81) on 64GB Apple M2 Max

Hardware architecture

Arm

Which interface are you using?

Python bindings

Contact Details

No response

Is there an existing issue for this?

Code of Conduct

ashvardanian commented 8 months ago

Interesting! Will look into it today, @simonw šŸ¤—

ashvardanian commented 7 months ago

The installation seems to work now. I've tested Python and director approach on an Arm Mac and on x86 Linux.

Screenshot 2024-04-01 at 16 30 09

PS: Relates to #376 #373. @simonw and @raydelvecchio, does it work for you now?