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

Buildozer does not package sdl2 properly when sourcing locally #1843

Closed
CaptainCrusher opened this issue Aug 3, 2024 · 3 comments
Closed
Labels

Comments

@CaptainCrusher
Copy link

When trying to package sdl2 from local files using requirements.source in the buildozer.spec file, buildozer does not package them properly.

sdl2 has a lot of seperate libraries which all need to be in the same folder (named jni). But for each library it tries to add, buildozer deletes the entire folder and creates a new one with the library in it. This deletes all the libraries that were previously in that folder. So when buildozer tries to access them, I get a file not found error.

Here's the important part of the terminal log:

[INFO]: Unpacking sdl2_image for arm64-v8a
[INFO]: P4A_sdl2_image_DIR exists, symlinking instead
[DEBUG]: Remove directory and subdirectory /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni
[DEBUG]: Create directory /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni
[DEBUG]: -> running cp -a /home/chris/buildozer_dependencies/sdl2_image /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni/SDL2_image
[INFO]: Unpacking sdl2_mixer for arm64-v8a
[INFO]: P4A_sdl2_mixer_DIR exists, symlinking instead
[DEBUG]: Remove directory and subdirectory /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni
[DEBUG]: Create directory /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni
[DEBUG]: -> running cp -a /home/chris/buildozer_dependencies/sdl2_mixer /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni/SDL2_mixer
[INFO]: Unpacking sdl2_ttf for arm64-v8a
[INFO]: P4A_sdl2_ttf_DIR exists, symlinking instead
[DEBUG]: Remove directory and subdirectory /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni
[DEBUG]: Create directory /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni
[DEBUG]: -> running cp -a /home/chris/buildozer_dependencies/sdl2_ttf /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni/SDL2_ttf
[INFO]: Unpacking sdl2 for arm64-v8a
[INFO]: P4A_sdl2_DIR exists, symlinking instead
[DEBUG]: Remove directory and subdirectory /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni (emphasis mine)
[DEBUG]: Create directory /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni
[DEBUG]: -> running cp -a /home/chris/buildozer_dependencies/sdl2 /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni/SDL

Later on:
[INFO]: Prebuilding sdl2_image for arm64-v8a
[INFO]: -> directory context /home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni/SDL2_image/external

FileNotFoundError: [Errno 2] No such file or directory: '/home/chris/MyPython/prj/Anagrams/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni/SDL2_image/external'

When I check the jni folder, it only has SDL in it.

There is no such error when sourcing from the internet.

@CaptainCrusher
Copy link
Author

My terminal command is:

buildozer android debug deploy run

@CaptainCrusher
Copy link
Author

I made some modifications to python-for-android, and its working for me now. I am not going to submit a pr because my patch is sketchy.

Copy link

github-actions bot commented Dec 6, 2024

👋 @CaptainCrusher,
Sorry to hear you are having difficulties with Kivy's Buildozer; Kivy unites a number of different technologies, so building apps can be temperamental.
We try to use GitHub issues only to track work for developers to do to fix bugs and add new features to Buildozer. This issue has been closed, because it doesn't describe a bug or new feature request for Buildozer.
There is a mailing list and a Discord channel to support Kivy users debugging their own systems, which should be able to help. They are linked in the ReadMe.
Of course, if it turns out you have stumbled over a bug in Buildozer, we do want to hear about it here. The support channels should be able to help you craft an appropriate bug report.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants