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

apsw build fails #3057

Open
1 task
RobertFlatt opened this issue Aug 24, 2024 · 1 comment
Open
1 task

apsw build fails #3057

RobertFlatt opened this issue Aug 24, 2024 · 1 comment

Comments

@RobertFlatt
Copy link
Contributor

Checklist

  • [ x] the issue is indeed a bug and not a support request
  • [x ] issue doesn't already exist: https://github.com/kivy/python-for-android/issues
  • I have a short, runnable example that reproduces the issue
  • [ x] I reproduced the problem with the latest development version (p4a.branch = develop)
  • [ x] I used the grave accent (aka backticks) to format code or logs when appropriated

Logs

[DEBUG]:        building 'apsw' extension
[DEBUG]:        creating build
[DEBUG]:        creating build/temp.linux-x86_64-cpython-311
[DEBUG]:        creating build/temp.linux-x86_64-cpython-311/src
[DEBUG]:        /home/bobf/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -I/home/bobf/ex/rtest/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include -I/home/bobf/ex/rtest/.buildozer/android/platform/build-arm64-v8a/build/other_builds/sqlite3/arm64-v8a__ndk_target_21/sqlite3 -DANDROID -I/home/bobf/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I/home/bobf/ex/rtest/.buildozer/android/platform/build-arm64-v8a/build/python-installs/myapp/arm64-v8a/include/python3.1 -fPIC -DEXPERIMENTAL=1 -DNDEBUG=1 -DAPSW_FORK_CHECKER=1 -DSQLITE_ENABLE_FTS4=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -Isrc -I/home/bobf/ex/rtest/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include -I/home/bobf/ex/rtest/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build -c src/apsw.c -o build/temp.linux-x86_64-cpython-311/src/apsw.o
[DEBUG]:        In file included from src/apsw.c:123:
[DEBUG]:        src/traceback.c:88:4: error: too few arguments to function call, expected 17, have 15
[DEBUG]:           );
[DEBUG]:           ^
[DEBUG]:        /home/bobf/ex/rtest/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/cpython/code.h:148:28: note: 'PyCode_New' declared here
[DEBUG]:        PyAPI_FUNC(PyCodeObject *) PyCode_New(
[DEBUG]:                                   ^
[DEBUG]:        In file included from src/apsw.c:123:
[DEBUG]:        src/traceback.c:101:8: error: incomplete definition of type 'struct _frame'
[DEBUG]:          frame->f_lineno=lineno;
[DEBUG]:          ~~~~~^

@rogerbinns
Copy link

(I am the APSW developer.)

traceback.c is used to produce augmented tracebacks where C code and values are included in tracebacks to help with debugging. This is done by synthesizing a stack frame during exceptions as done by AddTraceBackHere() in traceback,c. You can #if 0 / #endif the function body and everything will work except the C frames will not show up.

The reason you are seeing the compilation failure is because the CPython internal code for stack frames changed in Python 3.11, and you are using an 8 year old version of APSW. It was fixed in APSW in early 2022. You are using a version of SQLite from 2021.

I would recommend updating to the latest SQLite and APSW, or comment out the function to stay on existing versions. CPython's API keeps changing with each release and APSW changes with them.

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

2 participants