Skip to content

p4a psycopg recipe error: expression is not assignable #2967

Description

@ssaravanan384900712

Hello folks, im new to python-for-android ,

Im trying to build psycopg2 for android using

p4a create --requirements psycopg2 --arch arm64-v8a --arch armeabi-v7a --arch x86_64 --sdk-dir $ANDROID_SDK_ROOT --ndk-dir $ANDROID_SDK_ROOT/ndk/$NDK_VERSION --dist-name mydist-psycopg2-only

But i get this error

/home/saravanans/Android/Sdk/ndk/25.2.9519653/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/saravanans/.local/share/python-for-android/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include -DANDROID -I/home/saravanans/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I/home/saravanans/.local/share/python-for-android/build/python-installs/mydist-psycopg2-only/arm64-v8a/include/python3.1 -fPIC -DPSYCOPG_VERSION=2.8.5 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=140010 -DHAVE_LO64=1 -I/home/saravanans/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/Include -I/home/saravanans/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/native-build -I. -I/usr/include/postgresql -I/usr/include/postgresql/14/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-3.11/psycopg/psycopgmodule.o -Wdeclaration-after-statement
psycopg/psycopgmodule.c:921:36: error: expression is not assignable
        Py_TYPE(typetable[i].type) = &PyType_Type;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
psycopg/psycopgmodule.c:953:30: error: expression is not assignable
    Py_TYPE(&pydatetimeType) = &PyType_Type;
    ~~~~~~~~~~~~~~~~~~~~~~~~ ^
psycopg/psycopgmodule.c:1085:28: error: expression is not assignable
    Py_TYPE(&typecastType) = &PyType_Type;
    ~~~~~~~~~~~~~~~~~~~~~~ ^
psycopg/psycopgmodule.c:1088:25: error: expression is not assignable
    Py_TYPE(&chunkType) = &PyType_Type;
    ~~~~~~~~~~~~~~~~~~~ ^
psycopg/psycopgmodule.c:1091:25: error: expression is not assignable
    Py_TYPE(&errorType) = &PyType_Type;
    ~~~~~~~~~~~~~~~~~~~ ^
5 errors generated.
error: command '/home/saravanans/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/clang' failed with exit code 1
  STDERR:

$ cython --version
Cython version 3.0.8

Im on ubuntu 22.04

could you please help?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions