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 - sqlite_vss.load(conn) fail without any error message #105

Open
yandod opened this issue Oct 23, 2023 · 2 comments
Open

Python - sqlite_vss.load(conn) fail without any error message #105

yandod opened this issue Oct 23, 2023 · 2 comments

Comments

@yandod
Copy link

yandod commented Oct 23, 2023

I am trying python bindings on Docker on M1 mac with amd64 image.
If anyone can hint next step for debugging, I would greatly appreciate it.

I do suspect side effect of emulation for now.

  • Host OS

    • Mac OS Venture 13.5.2 (M1)
  • Docker Desktop v4.24.0

    • with Use Rosetta for x86/amd64 emulation on Apple Silicon
  • test code

import sqlite3
import sqlite_vss

print(sqlite_vss.vss_loadable_path())
print('initilizing SQLite...')
conn = sqlite3.connect('test.db')
conn.enable_load_extension(True)
print('initilizing VSS...')
sqlite_vss.load(conn)
#conn.load_extension(sqlite_vss.vss_loadable_path())
print(conn.execute('select vss_version()').fetchone()[0])
  • output
python3 /app/debug.py
/usr/local/lib/python3.7/site-packages/sqlite_vss/vss0
initilizing SQLite...
initilizing VSS...
  • Dockerfile and built with docker build --platform linux/amd64
FROM python:3.7

RUN apt-get update && \
    apt-get install -y --no-install-recommends \
        libgomp1 \
        libatlas-base-dev \
        liblapack-dev && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

COPY ./app /app
WORKDIR /app

RUN pip install -r requirements.txt
@yandod
Copy link
Author

yandod commented Oct 24, 2023

tried another shot with disabling "Use Rosetta for emulation" and got this output.

/usr/local/lib/python3.7/site-packages/sqlite_vss/vss0
initilizing SQLite...
initilizing VSS...
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
qemu: uncaught target signal 6 (Aborted) - core dumped

@yandod
Copy link
Author

yandod commented Oct 24, 2023

checked installed packages bellow

 dpkg -s libgomp1 libatlas-base-dev liblapack-dev      
Package: libgomp1
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 312
Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
Architecture: amd64
Multi-Arch: same
Source: gcc-12
Version: 12.2.0-14
Depends: gcc-12-base (= 12.2.0-14), libc6 (>= 2.34)
Breaks: gcc-4.3 (<< 4.3.6-1), gcc-4.4 (<< 4.4.6-4), gcc-4.5 (<< 4.5.3-2)
Description: GCC OpenMP (GOMP) support library
 GOMP is an implementation of OpenMP for the C, C++, and Fortran compilers
 in the GNU Compiler Collection.
Homepage: http://gcc.gnu.org/

Package: libatlas-base-dev
Status: install ok installed
Priority: optional
Section: libdevel
Installed-Size: 23396
Maintainer: Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>
Architecture: amd64
Multi-Arch: same
Source: atlas
Version: 3.10.3-13
Replaces: libatlas-dev (<< 3.10.3-2), libcblas-dev
Provides: libblas.so, liblapack.so
Depends: libatlas3-base (= 3.10.3-13)
Suggests: libatlas-doc, liblapack-doc
Breaks: libatlas-dev (<< 3.10.3-2), libblas-dev (<< 3.7.1-2~), liblapack-dev (<< 3.7.1-2~), libopenblas-dev (<< 0.2.20+ds-3~)
Conflicts: libcblas-dev
Description: Automatically Tuned Linear Algebra Software, generic static
 ATLAS is an approach for the automatic generation and optimization of
 numerical software. Currently ATLAS supplies optimized versions for the
 complete set of linear algebra kernels known as the Basic Linear Algebra
 Subroutines (BLAS), and a subset of the linear algebra routines in the
 LAPACK library.
 .
 This package includes the headers, the static libraries and symbolic links
 needed for program development.
Homepage: http://math-atlas.sourceforge.net/

Package: liblapack-dev
Status: install ok installed
Priority: optional
Section: libdevel
Installed-Size: 25055
Maintainer: Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>
Architecture: amd64
Multi-Arch: same
Source: lapack
Version: 3.11.0-2
Provides: liblapack.so
Depends: liblapack3 (= 3.11.0-2), libblas-dev | libblas.so
Suggests: liblapack-doc
Description: Library of linear algebra routines 3 - static version
 LAPACK version 3.X is a comprehensive FORTRAN library that does
 linear algebra operations including matrix inversions, least
 squared solutions to linear sets of equations, eigenvector
 analysis, singular value decomposition, etc. It is a very
 comprehensive and reputable package that has found extensive
 use in the scientific community.
 .
 This package contains a static version of the library.

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

1 participant