Skip to content

32 bit arch used for arm64  #159

Description

@lukehinds

I have not been able to nail down why this is yet, but I am finding any time sqlite-vec is pip installed on a arm64 machine, it fails from using the 32 bit library

I built this as a replication of the issue:

https://github.com/lukehinds/sqlite-vec-test/actions/runs/12515467806/job/34913076780#step:6:506

You can see here, this is during the arm64 build stage:

#28 [linux/arm64 stage-1 6/8] RUN file /usr/local/lib/python3.12/site-packages/sqlite_vec/vec0.so
#28 0.108 /usr/local/lib/python3.12/site-packages/sqlite_vec/vec0.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=126100873b8858013bd396b329eccfa35f27acf5, not stripped
#28 DONE 0.1s

#29 [linux/arm64 stage-1 7/8] RUN python -c "import sqlite3; print(sqlite3.sqlite_version)"
#29 0.676 3.40.1
#29 DONE 0.7s

#30 [linux/arm64 stage-1 8/8] RUN python -c "import sqlite3; conn = sqlite3.connect(':memory:'); conn.enable_load_extension(True); conn.load_extension('/usr/local/lib/python3.12/site-packages/sqlite_vec/vec0'); print('sqlite_vec loaded successfully')"
#30 0.361 Traceback (most recent call last):
#30 0.362   File "<string>", line 1, in <module>
#30 0.363 sqlite3.OperationalError: /usr/local/lib/python3.12/site-packages/sqlite_vec/vec0.so: wrong ELF class: ELFCLASS32
#30 ERROR: process "/bin/sh -c python -c \"import sqlite3; conn = sqlite3.connect(':memory:'); conn.enable_load_extension(True); conn.load_extension('/usr/local/lib/python3.12/site-packages/sqlite_vec/vec0'); print('sqlite_vec loaded successfully')\"" did not complete successfully: exit code: 1
------
 > [linux/arm64 stage-1 8/8] RUN python -c "import sqlite3; conn = sqlite3.connect(':memory:'); conn.enable_load_extension(True); conn.load_extension('/usr/local/lib/python3.12/site-packages/sqlite_vec/vec0'); print('sqlite_vec loaded successfully')":
0.361 Traceback (most recent call last):
0.362   File "<string>", line 1, in <module>
0.363 sqlite3.OperationalError: /usr/local/lib/python3.12/site-packages/sqlite_vec/vec0.so: wrong ELF class: ELFCLASS32

I will update when I figure out why this is happening.

Activity

  1. lukehinds commented on Dec 27, 2024

    @lukehinds
    Author

    Right, CI is packing a 32bit lib into the aarch64 wheel

    curl -O https://files.pythonhosted.org/packages/f2/48/dbb2cc4e5bad88c89c7bb296e2d0a8df58aab9edc75853728c361eefc24f/sqlite_vec-0.1.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
    
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  101k  100  101k    0     0  1099k      0 --:--:-- --:--:-- --:--:-- 1150k
    tar zxvf sqlite_vec-0.1.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
    x sqlite_vec/__init__.py
    x sqlite_vec/vec0.so
    x sqlite_vec-0.1.6.dist-info/METADATA
    x sqlite_vec-0.1.6.dist-info/WHEEL
    x sqlite_vec-0.1.6.dist-info/top_level.txt
    x sqlite_vec-0.1.6.dist-info/RECORD
    cd sqlite_vec
    file vec0.so
    vec0.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=126100873b8858013bd396b329eccfa35f27acf5, not stripped
    
    cd sqlite_vec-0.1.6.dist-info/
    
    cat WHEEL
    Wheel-Version: 1.0
    Generator: sqlite-dist 0.0.1-alpha.17
    Root-Is-Purelib: false
    Tag: py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64%
    
  2. added a commit that references this issue on Dec 27, 2024
    ba711c2
  3. lukehinds commented on Dec 28, 2024

    @lukehinds
    Author

    This is a breaking bug @asg017 if you could please review #160

  4. added a commit that references this issue on Dec 28, 2024
  5. tommitytom commented on Jan 5, 2025

    @tommitytom

    I'm having a similar issue with nodejs on windows with yarn, it seems to try to download the linux arm64 build:

    > yarn add sqlite-vec
    ➤ YN0000: · Yarn 4.5.1
    ➤ YN0000: ┌ Resolution step
    ➤ YN0035: │ sqlite-vec-linux-arm64@npm:0.1.6: Package not found
    ➤ YN0035: │   Response Code: 404 (Not Found)
    ➤ YN0035: │   Request Method: GET
    ➤ YN0035: │   Request URL: https://registry.yarnpkg.com/sqlite-vec-linux-arm64
    ➤ YN0000: └ Completed in 0s 777ms
    ➤ YN0000: · Failed with errors in 0s 788ms
    
  6. added a commit that references this issue on Jan 10, 2025
    cc7c29e
  7. tamis-laan commented on Jul 2, 2025

    @tamis-laan

    Same problem here

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions