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

#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)." #3008

Open
hanchenglong001 opened this issue Apr 23, 2024 · 0 comments

Comments

@hanchenglong001
Copy link

/home/user/.local/share/python-for-android/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include/pyport.h:601:2: error: "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
^
/home/user/.local/share/python-for-android/build/bootstrap_builds/empty/jni/application/src/start.c:17:10: fatal error: 'bootstrap_name.h' file not found
#include "bootstrap_name.h"
^~~~~~~~~~~~~~~~~~
2 errors generated.
make: *** [/home/user/.android/android-ndk/build/core/build-binary.mk:422: /home/user/.local/share/python-for-android/build/bootstrap_builds/empty/obj/local/arm64-v8a/objs-debug/main/start.o] Error 1

STDERR:

Traceback (most recent call last):
File "/home/user/app/testapps/setup_vispy.py", line 22, in
setup(
File "/home/user/app/venv/lib/python3.10/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.10/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.10/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/user/app/pythonforandroid/bdistapk.py", line 82, in run
main()
File "/home/user/app/pythonforandroid/entrypoints.py", line 18, in main
ToolchainCL()
File "/home/user/app/pythonforandroid/toolchain.py", line 685, in init
getattr(self, command)(args)
File "/home/user/app/pythonforandroid/toolchain.py", line 104, in wrapper_func
build_dist_from_args(ctx, dist, args)
File "/home/user/app/pythonforandroid/toolchain.py", line 163, in build_dist_from_args
build_recipes(build_order, python_modules, ctx,
File "/home/user/app/pythonforandroid/build.py", line 504, in build_recipes
recipe.build_arch(arch)
File "/home/user/app/pythonforandroid/recipes/sdl2/init.py", line 32, in build_arch
shprint(
File "/home/user/app/pythonforandroid/logger.py", line 167, in shprint
for line in output:
File "/home/user/app/venv/lib/python3.10/site-packages/sh.py", line 915, in next
self.wait()
File "/home/user/app/venv/lib/python3.10/site-packages/sh.py", line 845, in wait
self.handle_command_exit_code(exit_code)
File "/home/user/app/venv/lib/python3.10/site-packages/sh.py", line 869, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_2:

RAN: /home/user/.android/android-ndk/ndk-build V=1 NDK_DEBUG=1

STDOUT:
Android NDK: Found platform level in /home/user/.local/share/python-for-android/build/bootstrap_builds/empty/project.properties. Setting APP_PLATFORM to android-27.
Android NDK: WARNING:/home/user/.local/share/python-for-android/build/bootstrap_builds/empty/jni/application/src/Android.mk:main: non-system libraries in linker flags: -lpython3.11
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
/home/user/.android/android-ndk/build/core/build-binary.mk:586: Android NDK: Module main depends on undefined modules: python_shared
Android NDK: WARNING:/home/user/.local/share/python-for-android/build/bootstrap_builds/empty/jni/application/src/Android.mk:main: non-system libraries in linker flags: -lpython3.11
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
/home/user/.android/android-ndk/build/core/build-binary.mk:586: Android NDK: Module main depends on undefined modules: python_shared
Android NDK: WARNING:/home/user/.local/share/python-for-android/build/bootstrap_builds/empty/jni/application/src/Android.mk:main: non-system libraries in linker flags: -lpython3.11
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
/home/user/.android/android-ndk/build/core/build-binary.mk:586: Android NDK: Module main depends on undefined modules: python_shared
Android NDK: WARNING:/home/user/.local/share/python-for-android/build/bootstrap_builds/empty/jni/application/src/Android.mk:main: non-system libraries in linker flags: -lpython3.11
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
/home/user/.android/android-ndk/build/core/build-binary.mk:586: Android NDK: Module main depends on undefined modules: python_shared
rm -f /home/user/.local/share/python-for-android/build/bootstrap_builds/empty/libs/arm64-v8a/* /home/user/.local/share/python-for-android/build/bootstrap_builds/empty/libs/armeabi-v7a/* /home/user/.local/share/python-for-android/build/bootstrap_builds/empty/libs/x86/* /home/user/.local/share/python-for-android/build/bootstrap_builds/empty/libs/x86_64/*
[arm64-v8a] Install : libSDL2.so => libs/arm64-v8a/libSDL2.so
install -p /home/user/.local/share/python-for-android/build/bootstrap_builds/empty/obj/local/arm64-v8a/libSDL2.so /home/user/.local/share/python-for-android/build/bootstrap_builds/empty/libs/arm64-v8a/libSDL2.so
[arm64-v8a] Install : libSDL2_image.so => libs/arm64-v8a/libSDL2_image.so
install -p /home/user/.local/share/python-for-android/build/bootstrap_builds/empty/obj/local/arm64-v8a/libSDL2_image.so /home/user/.local/share/python-for-android/build/bootstrap_builds/empty/libs/arm64-v8a/libSDL2_image.so
[arm64-v8a] Install : libSDL2_mixer.so => libs/arm64-v8a/libSDL2_mixer.so
install -p /home/user/.local/share/python-for-android/build/bootstrap_builds/empty/obj/local/arm64-v8a/libSDL2_mixer.so /home/user/.local/share/python-for-android/build/bootstrap_builds/empty/libs/arm64-v8a/libSDL2_mixer.so
[arm64-v8a] Install : libSDL2_ttf.so => libs/arm64-v8a/libSDL2_ttf.so
install -p /home/user/.local/share/python-for-android/build/bootstrap_builds/empty/obj/local/arm64-v8a/libSDL2_ttf.so /home/user/.local/share/python-for-android/build/bootstrap_builds/empty/libs/arm64-v8a/libSDL2_ttf.so
[arm64-v8a] Compile : main <= SDL_android_main.c
rm -f /home/user/.local/share/python-for-android/build/bootstrap_builds/empty/obj/local/arm64-v8a/objs-debug/main///SDL/src/main/android/SDL_android_main.o
/usr/bin/ccache /home/user/.android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -MMD -MP -MF /home/user/.local/share/python-for-android/build/bootstrap_builds/empty/obj/local/arm64-v8a/objs-debug/main///SDL/src/main/android/SDL_android_main.o.d -target aarch64-none-linux-android27 -fdata-sections -ffunction-sections -fstack-protector-strong -funwind-tables -no-canonical-prefixes --sysroot /home/user/.android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot -g -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -D_FORTIFY_SOURCE=2 -fpic -O0 -UNDEBUG -fno-limit-debug-info -I/home/user/.local/share/python-for-android/build/bootstrap_builds/empty/jni/application/src/../../SDL/include -I/home/user/.local/share/python-for-android/build/bootstrap_builds/empty/jni/SDL/include -I/home/user/.android/android-ndk/sources/android/cpufeatures -I/home/user/.local/share/python-for-android/build/bootstrap_builds/empty/jni/application/src -DANDROID -I/home/user/.local/share/python-for-android/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include -Wformat -Werror=format-security -c /home/user/.local/share/python-for-android/build/bootstrap_builds/empty/jni/application/src/../../SDL/src/main/android/SDL_android_main.c -o /home/user/.local/share/python-for-android/build/bootstrap_builds/empty/obj/local/arm64-v8a/objs-debug/main///SDL/src/main/android/SDL_android_main.o
[arm64-v8a] Compile : main <= start.c
rm -f /home/user/.local/share/python-for-android/build/bootstrap_builds/empty/obj/local/arm64-v8a/objs-debug/main/start.o
/usr/bin/ccache /home/user/.android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -MMD -MP -MF /home/user/.local/share/python-for-android/build/bootstrap_builds/empty/obj/local/arm64-v8a/objs-debug/main/start.o.d -target aarch64-none-linux-android27 -fdata-sections -ffunction-sections -fstack-protector-strong -funwind-tables -no-canonical-prefixes --sysroot /home/user/.android/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot -g -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -D_FORTIFY_SOURCE=2 -fpic -O0 -UNDEBUG -fno-limit-debug-info -I/home/user/.local/share/python-for-android/build/bootstrap_builds/empty/jni/application/src/../../SDL/include -I/home/user/.local/share/python-for-android/build/bootstrap_builds/empty/jni/SDL/include -I/home/user/.android/android-ndk/sources/android/cpufeatures -I/home/user/.local/share/python-for-android/build/bootstrap_builds/empty/jni/application/src -DANDROID -I/home/user/.local/share/python-for-android/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include -Wformat -Werror=format-security -c /home/user/.local/share/python-for-android/build/bootstrap_builds/empty/jni/application/src/start.c -o /home/user/.local/share/python-for-android/build/bootstrap_builds/empty/obj/local/arm64-v8a/objs-debug/main/start.o
In file included from /home/user/.local/share/python-for-android/build/bootstrap_builds/empty/jni/application/src/start.c:3:
In file included from /home/user/.local/share/python-for-android/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include/Python.h:38:
/home/user/.local/share/python-for-android/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include/pyport.h:601:2: error: "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
^
/home/user/.local/share/python-for-android/build/bootstrap_builds/empty/jni/application/src/start.c:17:10: fatal error: 'bootstrap_name.h' file not found
#include "bootstrap_name.h"
^~~~~~~~~~~~~~~~~~
2 errors generated.
make: *** [/home/user/.android/android-ndk/build/core/build-binary.mk:422: /home/user/.local/share/python-for-android/build/bootstrap_builds/empty/obj/local/arm64-v8a/objs-debug/main/start.o] Error 1

STDERR:

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