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

AAB support related changes #2467

Merged
merged 16 commits into from
Sep 11, 2021
Merged

AAB support related changes #2467

merged 16 commits into from
Sep 11, 2021

Conversation

misl6
Copy link
Member

@misl6 misl6 commented Jul 4, 2021

Is marked as WIP, cause the main target of this PR is to open a discussion around potential changes, and how to restructure some p4a functions in order to support AAB (See #2084).

Apart from the new (currently useless), aab build option, the current changes are basically doing the following:

  • The old private.mp3 tar file, is now been moved from assets/private.mp3 to lib/xxx/private.so, where "xxx" is the targeted ABI. (This is necessary due to Split custom assets by device ABI? google/bundletool#190)

  • The new lib/xxx/private.so is now unpacked from the getApplicationInfo().nativeLibraryDir reported folder to the same target as before.

  • Now the version check is skipped for obvious reasons. We should re-implement this feature via (as an example) an md5 hash? (Better if We do that at build time, skipping the md5 hash generation during runtime)

Next steps:

  • Discuss the version management issue
  • Optimize the private.soby splitting it in two parts (ABI-specific parts(_python_bundle)) and NON-ABI-specific (that could be shipped into assets like We're already doing))
  • Instead of creating multiple dists for each ABI, create a single dist with multiple _python_bundle so it is easier to build the bundle later.
  • Add the option to build multiple ABIs at the same time.
  • Add the needed code to build the bundle.
  • Test the generated bundle on Play Console and generate ABI-specific apks via bundletool.
  • Drop current apk generation method.
  • Fix issue: If the user builds in debug mode, and later in release mode, it fails due to gdb files in libs/arch folder.

I rarely have some spare time, so help is always appreciated.

@kulothunganug
Copy link
Contributor

kulothunganug commented Jul 5, 2021

Drop apk generation.

Will after these changes p4a can't build apk's?
Am I right?

@inclement
Copy link
Member

Drop apk generation.

It's probably important to keep APK generation, this is still the Android package format and what you'll use for local development, direct sharing with others or (as it stands) upload to stores other than the Play store.

@misl6
Copy link
Member Author

misl6 commented Jul 10, 2021

Updated "Drop apk generation" to "Drop current apk generation method".

I expect to support apk generation via bundletool:

Test the generated bundle on Play Console and generate ABI-specific apks via bundletool.

Some interesting references:

https://developer.android.com/studio/command-line/bundletool#generate_apks
https://developer.android.com/studio/command-line/bundletool#deploy_with_bundletool

@RobertFlatt
Copy link
Contributor

It would be great to get rid of private.mp3 if only because there is a side effect, https://github.com/Android-for-Python/Android-for-Python-Users#uc-browser-interaction

The reason for a .mp3 in aassets was I think to smuggle the Python related files into an apk.
Here the proposal is to smuggle them in a .so file in lib.

We know Google looks into .so files to check for debug information.
We can expect that antivirus checks might be made on executable code.
This may impact smuggling in a .so.

Did anybody test if Google will accept a .so that is not really a .so inside ?

@misl6 misl6 force-pushed the feat/aab-support branch 2 times, most recently from 2557ec8 to 46dd7e8 Compare July 17, 2021 09:19
@misl6 misl6 force-pushed the feat/aab-support branch 3 times, most recently from f94a49f to 3755ab1 Compare July 28, 2021 16:16
@misl6
Copy link
Member Author

misl6 commented Jul 28, 2021

Some updates:

  • Unlike said over here: Split custom assets by device ABI? google/bundletool#190 (comment), the libprefix is needed, otherwise, the file is not uncompressed into the lib folder and is been kept into the architecture-specific apk.
  • Tests are obviously failing. I will look at them later.
  • As a collateral, now We support multi-arch apk.
  • I tested the generated .aabvia bundletool build-apks and bundletool install-apks locally and it works!
  • Only sdl2 bootstrap is now migrated.
  • Some recipes could be broken.
  • I still have to check if the generated .aab passes the Google Play validation.

@misl6
Copy link
Member Author

misl6 commented Jul 31, 2021

Again, some updates:

  • A had an upgrade made via the.aab that this PR generates, for a real-world app, approved for internal testing by Google Play.

Weekend checklist:

  • Fix some commented code.
  • Add support for target API 30 (should be really minor, but it's also a requirement from Google since 1 Aug)
  • Write some documentation & manual testing manual
  • Find out someone else here or on Discord that is able to build the .aab and publish the update on Google Play
  • Fix and improve tests
  • Announce that We're ready to support Android App Bundle.

@misl6 misl6 force-pushed the feat/aab-support branch 4 times, most recently from e3c95b6 to e1e2bd0 Compare July 31, 2021 16:28
@logiclove
Copy link

Since august 3rd, I confirm that I have been able to build AAB (including multiple architectures Arm-v8a & Arm-eabi-b7) with this branch:
https://github.com/misl6/python-for-android/tree/feat/aab-support
GREAT work, Mirko! This makes python-for-android a solid and durable solution for the future.

@logiclove
Copy link

I hope that these changes can soon be integrated in the master branch.

@misl6 misl6 force-pushed the feat/aab-support branch 2 times, most recently from 9bfaf33 to 8df9880 Compare August 8, 2021 14:12
@RobertFlatt
Copy link
Contributor

I tried to use this to build Hello World, I was unable to get a .aab, and had two issues:

  1. After pip3 install git+https://github.com/misl6/python-for-android.git@feat/aab-support the build failed because
    ....pythonforandroid/recipes/python3/patches/reproducible-buildinfo.diff was missing.
    Strangely the zip obtained with a clone does contain this file.
    Easy to work around, but still an issue.

  2. unnamed_dist_2 related errors. I build with p4a aab and .p4a is

--private . 
--package=org.example.myabb
--name="My abb"
--version=0.0.1
--bootstrap=sdl2
--requirements=python3,kivy==2.0.0
--permission=INTERNET
--sdk-dir=/home/bobf/.buildozer/android/platform/android-sdk
--android_api 30
--ndk-dir=/home/bobf/.buildozer/android/platform/android-ndk-r19c
--ndk-api 23
--arch=arm64-v8a
--arch=armeabi-v7a
--release

The build fails with

[INFO]:    Of the existing distributions, the following meet the given requirements:
[INFO]:         unnamed_dist_1: min API 23, includes recipes (hostpython3, libffi, openssl, sdl2_image, sdl2_mixer, sdl2_ttf, sqlite3, python3, sdl2, setuptools, six, pyjnius, android, kivy, certifi), built for archs (arm64-v8a, armeabi-v7a)
[INFO]:    -> directory context /home/bobf/.local/share/python-for-android/build/bootstrap_builds/sdl2
[INFO]:    <- directory context /home/bobf/ex/aab
[INFO]:    -> directory context /home/bobf/.local/share/python-for-android/dists/unnamed_dist_2
Traceback (most recent call last):
  File "/home/bobf/.local/bin/p4a", line 8, in <module>
    sys.exit(main())
  File "/home/bobf/.local/lib/python3.8/site-packages/pythonforandroid/entrypoints.py", line 18, in main
    ToolchainCL()
  File "/home/bobf/.local/lib/python3.8/site-packages/pythonforandroid/toolchain.py", line 728, in __init__
    getattr(self, command)(args)
  File "/home/bobf/.local/lib/python3.8/site-packages/pythonforandroid/toolchain.py", line 152, in wrapper_func
    func(self, args, **kw)
  File "/home/bobf/.local/lib/python3.8/site-packages/pythonforandroid/toolchain.py", line 1163, in aab
    output, build_args = self._build_package(args, package_type='aab')
  File "/home/bobf/.local/lib/python3.8/site-packages/pythonforandroid/toolchain.py", line 1044, in _build_package
    with current_directory(dist.dist_dir):
  File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/home/bobf/.local/lib/python3.8/site-packages/pythonforandroid/util.py", line 22, in current_directory
    chdir(new_dir)
FileNotFoundError: [Errno 2] No such file or directory: '/home/bobf/.local/share/python-for-android/dists/unnamed_dist_2

which is correct:

~/ex/aab>ls /home/bobf/.local/share/python-for-android/dists
unnamed_dist_1

Build again without deleting anything gives:

[INFO]:    # Your distribution was created successfully, exiting.
[INFO]:    Dist can be found at (for now) /home/bobf/.local/share/python-for-android/dists/unnamed_dist_2
[INFO]:    Of the existing distributions, the following meet the given requirements:
[INFO]:         unnamed_dist_1: min API 23, includes recipes (hostpython3, libffi, openssl, sdl2_image, sdl2_mixer, sdl2_ttf, sqlite3, python3, sdl2, setuptools, six, pyjnius, android, kivy, certifi), built for archs (arm64-v8a, armeabi-v7a)
[INFO]:         unnamed_dist_2: min API 23, includes recipes (hostpython3, libffi, openssl, sdl2_image, sdl2_mixer, sdl2_ttf, sqlite3, python3, sdl2, setuptools, six, pyjnius, android, kivy, certifi), built for archs (arm64-v8a, armeabi-v7a)
Traceback (most recent call last):
  File "/home/bobf/.local/bin/p4a", line 8, in <module>
    sys.exit(main())
  File "/home/bobf/.local/lib/python3.8/site-packages/pythonforandroid/entrypoints.py", line 18, in main
    ToolchainCL()
  File "/home/bobf/.local/lib/python3.8/site-packages/pythonforandroid/toolchain.py", line 728, in __init__
    getattr(self, command)(args)
  File "/home/bobf/.local/lib/python3.8/site-packages/pythonforandroid/toolchain.py", line 152, in wrapper_func
    func(self, args, **kw)
  File "/home/bobf/.local/lib/python3.8/site-packages/pythonforandroid/toolchain.py", line 1163, in aab
    output, build_args = self._build_package(args, package_type='aab')
  File "/home/bobf/.local/lib/python3.8/site-packages/pythonforandroid/toolchain.py", line 1038, in _build_package
    dist = self._dist
  File "/home/bobf/.local/lib/python3.8/site-packages/pythonforandroid/toolchain.py", line 974, in _dist
    dist = dist_from_args(ctx, self.args)
  File "/home/bobf/.local/lib/python3.8/site-packages/pythonforandroid/toolchain.py", line 160, in dist_from_args
    return Distribution.get_distribution(
  File "/home/bobf/.local/lib/python3.8/site-packages/pythonforandroid/distribution.py", line 163, in get_distribution
    assert len(possible_dists) < 2
AssertionError

and

~/ex/aab>ls /home/bobf/.local/share/python-for-android/dists
unnamed_dist_1  unnamed_dist_2

Looks like a state machine issue, is there any workaround?

@RobertFlatt
Copy link
Contributor

The previous issues appear fixed, but there is another unnamed_dist_2 issue (p4a clean_all first):

[INFO]:    # Your distribution was created successfully, exiting.
[INFO]:    Dist can be found at (for now) /home/bobf/.local/share/python-for-android/dists/unnamed_dist_1
[INFO]:    Of the existing distributions, the following meet the given requirements:
[INFO]:         unnamed_dist_1: min API 23, includes recipes (hostpython3, libffi, openssl, sdl2_image, sdl2_mixer, sdl2_ttf, sqlite3, python3, sdl2, setuptools, six, pyjnius, android, kivy, certifi), built for archs (arm64-v8a, armeabi-v7a)
[INFO]:    -> directory context /home/bobf/.local/share/python-for-android/build/bootstrap_builds/sdl2
[INFO]:    <- directory context /home/bobf/ex/aab
[INFO]:    -> directory context /home/bobf/.local/share/python-for-android/dists/unnamed_dist_2
Traceback (most recent call last):
  File "/home/bobf/.local/bin/p4a", line 8, in <module>
    sys.exit(main())
  File "/home/bobf/.local/lib/python3.8/site-packages/pythonforandroid/entrypoints.py", line 18, in main
    ToolchainCL()
  File "/home/bobf/.local/lib/python3.8/site-packages/pythonforandroid/toolchain.py", line 728, in __init__
    getattr(self, command)(args)
  File "/home/bobf/.local/lib/python3.8/site-packages/pythonforandroid/toolchain.py", line 152, in wrapper_func
    func(self, args, **kw)
  File "/home/bobf/.local/lib/python3.8/site-packages/pythonforandroid/toolchain.py", line 1163, in aab
    output, build_args = self._build_package(args, package_type='aab')
  File "/home/bobf/.local/lib/python3.8/site-packages/pythonforandroid/toolchain.py", line 1044, in _build_package
    with current_directory(dist.dist_dir):
  File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/home/bobf/.local/lib/python3.8/site-packages/pythonforandroid/util.py", line 22, in current_directory
    chdir(new_dir)
FileNotFoundError: [Errno 2] No such file or directory: '/home/bobf/.local/share/python-for-android/dists/unnamed_dist_2'

Which is correct:

~/ex/aab>ls /home/bobf/.local/share/python-for-android/dists
unnamed_dist_1

The log says the dist was built, I don't know if this means I should expect a .aab , but find /home/bobf/.local/share/python-for-android -name *.aab returns nothing.

@misl6
Copy link
Member Author

misl6 commented Aug 23, 2021

@RobertFlatt I've just updated the PR with a fix that should fix your issue. Thank you for testing.

@RobertFlatt
Copy link
Contributor

Great, --release runs for me. I'm going to play some, currently trying to figure out what I've got!
Any docs?

--debug fails with:

[INFO]:    unnamed_dist_1 has compatible recipes, using this one
[INFO]:    # Copying android package to current directory
[INFO]:    # Android package filename not found in build output. Guessing...
[ERROR]:   Build failed: Couldn't find the built APK

Can you tell me how to run bundletool ?
I see the Google docs https://developer.android.com/studio/command-line/bundletool#generate_apks

But all I can find is bundletool.py, tried python3 bundletool.py ...... but got:

Traceback (most recent call last):
  File "bundletool.py", line 8, in <module>
    from devil import base_error
ModuleNotFoundError: No module named 'devil'

Since devil is a couple of directories up, I assume there is some command somewhere...

I found bundletool.py in Android Studio and in ~/.buildozer but no bundletool

Or maybe I have to install the Java version?

Enhancement request : Execute bundletool in p4a, any user with half a brain will want to test the aab by installing the derived apks on Android. Seems automation (run bundletool and unzip) would be a good thing.

@RobertFlatt
Copy link
Contributor

I'm using Hello World, and the .p4a above.

On the first build the .aab is about 50M. I'm surprised, but that is not new!
On subsequent

p4a clean_all
p4a aab

The .aab increases in size by about 24M with each run 51M, 74M, 98M,......
Skip the clean_all and it increases by 98M

Deleting ~/.gradle before each build stops the increase.
But if I stop doing that the increase continues, even if I change --dist_name

I'm stuck on a one way street now, because whatever I do so far the output files get bigger (currently 1.2G)

@RobertFlatt
Copy link
Contributor

Arg, been using Buildozer for too long.
Placing the .aab or .apk in the project directory and rebuilding is greedy.

@RobertFlatt
Copy link
Contributor

Wait, it is only greedy for .aab, not greedy for .apk
There is a filter somewhere that needs to be updated.

@misl6
Copy link
Member Author

misl6 commented Aug 25, 2021

I'm using Hello World, and the .p4a above.

On the first build the .aab is about 50M. I'm surprised, but that is not new!
On subsequent

p4a clean_all
p4a aab

The .aab increases in size by about 24M with each run 51M, 74M, 98M,......
Skip the clean_all and it increases by 98M

Deleting ~/.gradle before each build stops the increase.
But if I stop doing that the increase continues, even if I change --dist_name

I'm stuck on a one way street now, because whatever I do so far the output files get bigger (currently 1.2G)

Nice catch, added .aab and .apks to default blacklist.txt

@misl6
Copy link
Member Author

misl6 commented Aug 25, 2021

Great, --release runs for me. I'm going to play some, currently trying to figure out what I've got!
Any docs?

--debug fails with:

[INFO]:    unnamed_dist_1 has compatible recipes, using this one
[INFO]:    # Copying android package to current directory
[INFO]:    # Android package filename not found in build output. Guessing...
[ERROR]:   Build failed: Couldn't find the built APK

Can you tell me how to run bundletool ?
I see the Google docs https://developer.android.com/studio/command-line/bundletool#generate_apks

But all I can find is bundletool.py, tried python3 bundletool.py ...... but got:

Traceback (most recent call last):
  File "bundletool.py", line 8, in <module>
    from devil import base_error
ModuleNotFoundError: No module named 'devil'

Since devil is a couple of directories up, I assume there is some command somewhere...

I found bundletool.py in Android Studio and in ~/.buildozer but no bundletool

Or maybe I have to install the Java version?

Enhancement request : Execute bundletool in p4a, any user with half a brain will want to test the aab by installing the derived apks on Android. Seems automation (run bundletool and unzip) would be a good thing.

aab is not available by design in debug mode.
I've added an error when the user tries to build an aab in --debug mode.

@misl6
Copy link
Member Author

misl6 commented Aug 25, 2021

@RobertFlatt , here you can find some docs about aab and bundletool:

https://github.com/kivy/python-for-android/blob/5164fb8e2a4aabc54b5b2ccadf82ee6c810d6fab/doc/source/quickstart.rst#exporting-the-android-app-bundle-aab-for-distributing-it-on-google-play

After working at this PR, I don't feel that We should integrate any bundletool related automation as I previously felt.
As I stated in docs, aab is not meant for development, but just for distributing, and the developer should probably ignore that until is ready to distribute it on Google Play.

Also, the result of bundletool build-apks is a collection of the base.apk + all the variations (like the ABI-specific ones) that should be installed separately (or via bundletool).

@misl6 misl6 changed the title [WIP] AAB support related changes AAB support related changes Aug 25, 2021
@misl6 misl6 requested a review from AndreMiras September 11, 2021 17:50
Copy link
Member

@AndreMiras AndreMiras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a mil for the huge effort, researching, implementing, refactoring, testing and addressing feedback ❤️
That's a big step for p4a 🎉
Thanks also for making the p4a release prior merging this change

@misl6 misl6 merged commit 41c6cc0 into kivy:develop Sep 11, 2021
@mmsprojects
Copy link

Hi, in first I'd thank you all for the development of this tool and @misl6 for the recent implementation about .aab package! I tried and had success building the aab file from @misl6 p4a's and buildozer's branch.

But I only could get success by removing the Pillow from the requirements of buildozer.spec. I thing there's something with Pillow recipe or I'm doing wrong the implementation. I'm passed the bug related by @Guhan-SenSam about opencv.

I'm using Kivymd and it kind of depends of pillow.
''''
[INFO]: <- directory context /home/ros/APP_MD_ADS/python-for-android
[INFO]: Building Pillow for armeabi-v7a
[INFO]: Pillow apparently isn't already in site-packages
[INFO]: Building compiled components in Pillow
[WARNING]: ndk_platform is deprecated and should be avoided in new recipes
[INFO]: -> directory context /home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/Pillow/armeabi-v7a__ndk_target_21/Pillow
[DEBUG]: -> running python3 setup.py build_ext -v
[DEBUG]: running build_ext
[DEBUG]: building 'PIL._imaging' extension
[DEBUG]: creating build
[DEBUG]: building 'PIL._imagingft' extension
[DEBUG]: building 'PIL.imagingmath' extension
[DEBUG]: building 'PIL.imagingmorph' extension
[DEBUG]: creating build/temp.linux-x86_64-3.8
[DEBUG]: creating build/temp.linux-x86_64-3.8
[DEBUG]: creating build/temp.linux-x86_64-3.8
[DEBUG]: creating build/temp.linux-x86_64-3.8/src
[DEBUG]: creating build/temp.linux-x86_64-3.8/src
[DEBUG]: /home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/png/armeabi-v7a__ndk_target_21/png -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/harfbuzz-freetype/armeabi-v7a__ndk_target_21/harfbuzz -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/harfbuzz-freetype/armeabi-v7a__ndk_target_21/harfbuzz/src -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/freetype/armeabi-v7a__ndk_target_21/freetype/include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/jpeg/armeabi-v7a__ndk_target_21/jpeg -I/home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -lm -DANDROID -D__ANDROID_API
=21 -I/home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/arm-linux-androideabi -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/gastospessoais/armeabi-v7a/include/python3.8 -fPIC -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/Pillow/armeabi-v7a__ndk_target_21/Pillow/src/libImaging -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/jpeg/armeabi-v7a__ndk_target_21/jpeg -I/usr/include/openjpeg-2.3 -I/usr/include/x86_64-linux-gnu -I/home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/freetype/armeabi-v7a__ndk_target_21/freetype/include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/png/armeabi-v7a__ndk_target_21/png -I/home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/arm-linux-androideabi -I/usr/local/include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build -c src/imagingmath.c -o build/temp.linux-x86_64-3.8/src/imagingmath.o
[DEBUG]: /home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/png/armeabi-v7a__ndk_target_21/png -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/harfbuzz-freetype/armeabi-v7a__ndk_target_21/harfbuzz -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/harfbuzz-freetype/armeabi-v7a__ndk_target_21/harfbuzz/src -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/freetype/armeabi-v7a__ndk_target_21/freetype/include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/jpeg/armeabi-v7a__ndk_target_21/jpeg -I/home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -lm -DANDROID -D__ANDROID_API
=21 -I/home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/arm-linux-androideabi -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/gastospessoais/armeabi-v7a/include/python3.8 -fPIC -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/Pillow/armeabi-v7a__ndk_target_21/Pillow/src/libImaging -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/jpeg/armeabi-v7a__ndk_target_21/jpeg -I/usr/include/openjpeg-2.3 -I/usr/include/x86_64-linux-gnu -I/home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/freetype/armeabi-v7a__ndk_target_21/freetype/include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/png/armeabi-v7a__ndk_target_21/png -I/home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/arm-linux-androideabi -I/usr/local/include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build -c src/imagingft.c -o build/temp.linux-x86_64-3.8/src/imagingft.o
[DEBUG]: /home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/png/armeabi-v7a__ndk_target_21/png -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/harfbuzz-freetype/armeabi-v7a__ndk_target_21/harfbuzz -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/harfbuzz-freetype/armeabi-v7a__ndk_target_21/harfbuzz/src -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/freetype/armeabi-v7a__ndk_target_21/freetype/include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/jpeg/armeabi-v7a__ndk_target_21/jpeg -I/home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -lm -DANDROID -D__ANDROID_API
=21 -I/home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/arm-linux-androideabi -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/gastospessoais/armeabi-v7a/include/python3.8 -fPIC -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/Pillow/armeabi-v7a__ndk_target_21/Pillow/src/libImaging -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/jpeg/armeabi-v7a__ndk_target_21/jpeg -I/usr/include/openjpeg-2.3 -I/usr/include/x86_64-linux-gnu -I/home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/freetype/armeabi-v7a__ndk_target_21/freetype/include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/png/armeabi-v7a__ndk_target_21/png -I/home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/arm-linux-androideabi -I/usr/local/include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build -c src/imagingmorph.c -o build/temp.linux-x86_64-3.8/src/imagingmorph.o
[DEBUG]: creating build/temp.linux-x86_64-3.8/src/libImaging
[DEBUG]: /home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -target armv7a-linux-androideabi21 -fomit-frame-pointer -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/png/armeabi-v7a__ndk_target_21/png -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/harfbuzz-freetype/armeabi-v7a__ndk_target_21/harfbuzz -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/harfbuzz-freetype/armeabi-v7a__ndk_target_21/harfbuzz/src -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/freetype/armeabi-v7a__ndk_target_21/freetype/include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/jpeg/armeabi-v7a__ndk_target_21/jpeg -I/home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -lm -DANDROID -D__ANDROID_API
=21 -I/home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/arm-linux-androideabi -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/gastospessoais/armeabi-v7a/include/python3.8 -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DPILLOW_VERSION="7.0.0" -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/Pillow/armeabi-v7a__ndk_target_21/Pillow/src/libImaging -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/jpeg/armeabi-v7a__ndk_target_21/jpeg -I/usr/include/openjpeg-2.3 -I/usr/include/x86_64-linux-gnu -I/home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/freetype/armeabi-v7a__ndk_target_21/freetype/include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/png/armeabi-v7a__ndk_target_21/png -I/home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/arm-linux-androideabi -I/usr/local/include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -I/home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build -c src/_imaging.c -o build/temp.linux-x86_64-3.8/src/_imaging.o
[DEBUG]: clang: warning: -lm: 'linker' input unused [-Wunused-command-line-argument]
[DEBUG]: clang: warning: -lm: 'linker' input unused [-Wunused-command-line-argument]
[DEBUG]: clang: warning: -lm: 'linker' input unused [-Wunused-command-line-argument]
[DEBUG]: clang: warning: -lm: 'linker' input unused [-Wunused-command-line-argument]
[DEBUG]: In file included from src/_imagingmath.c:16:
[DEBUG]: In file included from /home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include/Python.h:11:
[DEBUG]: In file included from /home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/8.0.2/include/limits.h:37:
[DEBUG]: In file included from /home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/limits.h:38:
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:41:6: error: function-like macro
[DEBUG]: '__GNUC_PREREQ' is not defined
[DEBUG]: # if __GNUC_PREREQ (4, 6) && !defined _LIBC
[DEBUG]: ^
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:54:30: error: function-like macro
[DEBUG]: '__GNUC_PREREQ' is not defined
[DEBUG]: # if !defined __cplusplus && __GNUC_PREREQ (3, 3)
[DEBUG]: ^
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:60:30: error: function-like macro
[DEBUG]: '__GNUC_PREREQ' is not defined
[DEBUG]: # if defined __cplusplus && __GNUC_PREREQ (2,8)
[DEBUG]: ^
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:126:5: error: function-like macro
[DEBUG]: '__GNUC_PREREQ' is not defined
[DEBUG]: #if __GNUC_PREREQ (4,3)
[DEBUG]: ^
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:207:5: error: function-like macro
[DEBUG]: '__GNUC_PREREQ' is not defined
[DEBUG]: #if __GNUC_PREREQ (2,96)
[DEBUG]: ^
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:215:5: error: function-like macro
[DEBUG]: '__GNUC_PREREQ' is not defined
[DEBUG]: #if __GNUC_PREREQ (4, 3)
[DEBUG]: ^
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:225:5: error: function-like macro
[DEBUG]: '__GNUC_PREREQ' is not defined
[DEBUG]: #if __GNUC_PREREQ (2,96)
[DEBUG]: ^
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:232:5: error: function-like macro
[DEBUG]: '__GNUC_PREREQ' is not defined
[DEBUG]: #if __GNUC_PREREQ (2,5)
[DEBUG]: ^
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:241:5: error: function-like macro
[DEBUG]: '__GNUC_PREREQ' is not defined
[DEBUG]: #if __GNUC_PREREQ (3,1)
[DEBUG]: ^
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:250:5: error: function-like macro
[DEBUG]: '__GNUC_PREREQ' is not defined
[DEBUG]: #if __GNUC_PREREQ (3,2)
[DEBUG]: ^
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:259:5: error: function-like macro
[DEBUG]: '__GNUC_PREREQ' is not defined
[DEBUG]: #if __GNUC_PREREQ (4,5)
[DEBUG]: ^
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:273:5: error: function-like macro
[DEBUG]: '__GNUC_PREREQ' is In file included from notsrc/_imagingmorph.c :defined14
[DEBUG]: :
[DEBUG]: In file included from /home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include/Python.h:11:
[DEBUG]: In file included from /home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/8.0.2/include/limits.h#if __GNUC_PREREQ (2,8):
[DEBUG]: 37 ^:
[DEBUG]:
[DEBUG]: In file included from /home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/limits.h:/usr/include/x86_64-linux-gnu/sys/cdefs.h38:283:
[DEBUG]: :/usr/include/x86_64-linux-gnu/sys/cdefs.h5::41 :error6: :function-like errormacro:
[DEBUG]: function-like '__GNUC_PREREQ'macro
[DEBUG]: is '__GNUC_PREREQ'not isdefined
[DEBUG]: not defined
[DEBUG]: #if __GNUC_PREREQ (2,97)
[DEBUG]: ^
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:292:5: error: # if __GNUC_PREREQ (4, 6) && !defined _LIBCfunction-like
[DEBUG]: ^macro
[DEBUG]:
[DEBUG]: '__GNUC_PREREQ' is not /usr/include/x86_64-linux-gnu/sys/cdefs.hdefined:
[DEBUG]: 54:30: error#if __GNUC_PREREQ (3,3):
[DEBUG]: function-like ^
[DEBUG]: macro
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h'__GNUC_PREREQ': 300is: 5not: definederror
[DEBUG]: : function-like macro
[DEBUG]: '__GNUC_PREREQ' is not defined
[DEBUG]: # if !defined __cplusplus && __GNUC_PREREQ (3, 3)
[DEBUG]: ^
[DEBUG]: #if __GNUC_PREREQ (3,4)
[DEBUG]: ^
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:60/usr/include/x86_64-linux-gnu/sys/cdefs.h::30314:: 5error:: function-likeerror : macrofunction-like
[DEBUG]: macro'__GNUC_PREREQ'
[DEBUG]: is'__GNUC_PREREQ' notis definednot
[DEBUG]: defined
[DEBUG]: #if __GNUC_PREREQ (3,2)
[DEBUG]: ^
[DEBUG]: # if defined __cplusplus && __GNUC_PREREQ (2,8)
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h ^:
[DEBUG]: 327:5: error: function-like macro
[DEBUG]: '__GNUC_PREREQ' is not defined
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:#if __GNUC_PREREQ (4,3)126
[DEBUG]: : ^5
[DEBUG]: : error: /usr/include/x86_64-linux-gnu/sys/cdefs.hfunction-like: 342macro:
[DEBUG]: 30 :'__GNUC_PREREQ' erroris: function-likenot macrodefined
[DEBUG]:
[DEBUG]: '__GNUC_PREREQ' is not defined
[DEBUG]: #if __GNUC_PREREQ (4,3)
[DEBUG]: ^
[DEBUG]: #if (!defined __cplusplus || __GNUC_PREREQ (4,3)
[DEBUG]: ^
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:361:5: error: function-like macro
[DEBUG]: '__GNUC_PREREQ' is/usr/include/x86_64-linux-gnu/sys/cdefs.h :not207 :defined5
[DEBUG]: : error: function-like macro#if __GNUC_PREREQ (4,3)
[DEBUG]:
[DEBUG]: ^'__GNUC_PREREQ'
[DEBUG]: is notfatal error In file included from : src/_imagingft.cdefined:too
[DEBUG]: 22 :
[DEBUG]: manyIn file included from /home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include/Python.herrors: 11emitted,:
[DEBUG]: In file included from #if __GNUC_PREREQ (2,96)stopping/home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/8.0.2/include/limits.h
[DEBUG]: : ^now37
[DEBUG]: :
[DEBUG]: [-ferror-limit=]In file included from
[DEBUG]: /home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/limits.h/usr/include/x86_64-linux-gnu/sys/cdefs.h::38215:
[DEBUG]: :/usr/include/x86_64-linux-gnu/sys/cdefs.h5::41 :error6: :function-like errormacro:
[DEBUG]: function-like '__GNUC_PREREQ'macro
[DEBUG]: is '__GNUC_PREREQ'not isdefined
[DEBUG]: not defined
[DEBUG]: #if __GNUC_PREREQ (4, 3)
[DEBUG]: ^
[DEBUG]: # if __GNUC_PREREQ (4, 6) && !defined _LIBC
[DEBUG]: ^
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:54:30: error: function-like/usr/include/x86_64-linux-gnu/sys/cdefs.h :macro225
[DEBUG]: : 5'__GNUC_PREREQ': iserror : notfunction-like definedmacro
[DEBUG]:
[DEBUG]: '__GNUC_PREREQ' is not defined
[DEBUG]: # if !defined __cplusplus && __GNUC_PREREQ (3, 3)
[DEBUG]: ^
[DEBUG]: #if __GNUC_PREREQ (2,96)
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h ^:
[DEBUG]: 60:30: error/usr/include/x86_64-linux-gnu/sys/cdefs.h: :function-like232 :macro5
[DEBUG]: : '__GNUC_PREREQ'error : isfunction-like notmacro
[DEBUG]: defined
[DEBUG]: '__GNUC_PREREQ' is not defined
[DEBUG]: #if __GNUC_PREREQ (2,5)# if defined __cplusplus && __GNUC_PREREQ (2,8)
[DEBUG]:
[DEBUG]: ^ ^
[DEBUG]:
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:241:5: error: function-like macro
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h'__GNUC_PREREQ': 126is: 5not: definederror
[DEBUG]: : function-like macro
[DEBUG]: '__GNUC_PREREQ'#if __GNUC_PREREQ (3,1)
[DEBUG]: is ^
[DEBUG]: not defined/usr/include/x86_64-linux-gnu/sys/cdefs.h
[DEBUG]: :250:5:#if __GNUC_PREREQ (4,3)
[DEBUG]: error ^:
[DEBUG]: function-like macro
[DEBUG]: '__GNUC_PREREQ' is not defined
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h#if __GNUC_PREREQ (3,2):
[DEBUG]: 207 ^:
[DEBUG]: 5: error: function-like/usr/include/x86_64-linux-gnu/sys/cdefs.h :macro259
[DEBUG]: : 5'__GNUC_PREREQ': iserror : notfunction-like definedmacro
[DEBUG]:
[DEBUG]: '__GNUC_PREREQ' is not defined
[DEBUG]: #if __GNUC_PREREQ (2,96)
[DEBUG]: ^
[DEBUG]: #if __GNUC_PREREQ (4,5)
[DEBUG]: ^
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:273:5: error: function-like macro
[DEBUG]: '__GNUC_PREREQ' /usr/include/x86_64-linux-gnu/sys/cdefs.his: 215not: 5defined:
[DEBUG]: error: function-like macro
[DEBUG]: #if __GNUC_PREREQ (2,8)
[DEBUG]: '__GNUC_PREREQ' ^
[DEBUG]: is not/usr/include/x86_64-linux-gnu/sys/cdefs.h :defined283
[DEBUG]: :5: error: function-like #if __GNUC_PREREQ (4, 3)macro
[DEBUG]:
[DEBUG]: ^
[DEBUG]: '__GNUC_PREREQ' is not/usr/include/x86_64-linux-gnu/sys/cdefs.h :defined225
[DEBUG]: :5: error: function-like#if __GNUC_PREREQ (2,97)
[DEBUG]: macro ^
[DEBUG]:
[DEBUG]: '__GNUC_PREREQ' /usr/include/x86_64-linux-gnu/sys/cdefs.his: 292not: 5defined:
[DEBUG]: error: function-like macro#if __GNUC_PREREQ (2,96)
[DEBUG]:
[DEBUG]: ^'__GNUC_PREREQ'
[DEBUG]: is /usr/include/x86_64-linux-gnu/sys/cdefs.hnot: 232defined:
[DEBUG]: 5: error: function-like macro
[DEBUG]: #if __GNUC_PREREQ (3,3)
[DEBUG]: '__GNUC_PREREQ' ^
[DEBUG]: is not/usr/include/x86_64-linux-gnu/sys/cdefs.h :defined300
[DEBUG]: :5: error: function-like#if __GNUC_PREREQ (2,5)
[DEBUG]: macro ^
[DEBUG]:
[DEBUG]: '__GNUC_PREREQ' /usr/include/x86_64-linux-gnu/sys/cdefs.his: 241not: 5defined:
[DEBUG]: error: function-like macro
[DEBUG]: #if __GNUC_PREREQ (3,4)'__GNUC_PREREQ'
[DEBUG]: ^is
[DEBUG]: not defined
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:314:5:#if __GNUC_PREREQ (3,1)
[DEBUG]: error ^:
[DEBUG]: function-like macro/usr/include/x86_64-linux-gnu/sys/cdefs.h
[DEBUG]: : 250'__GNUC_PREREQ': 5is: noterror : definedfunction-like
[DEBUG]: macro
[DEBUG]: '__GNUC_PREREQ' is not #if __GNUC_PREREQ (3,2)defined
[DEBUG]:
[DEBUG]: ^
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h#if __GNUC_PREREQ (3,2):
[DEBUG]: 327 ^:
[DEBUG]: 5:/usr/include/x86_64-linux-gnu/sys/cdefs.h :error259: :function-like5 :macro
[DEBUG]: error : '__GNUC_PREREQ'function-like ismacro
[DEBUG]: not '__GNUC_PREREQ'defined
[DEBUG]: is not defined
[DEBUG]: #if __GNUC_PREREQ (4,3)
[DEBUG]: ^
[DEBUG]: #if __GNUC_PREREQ (4,5) /usr/include/x86_64-linux-gnu/sys/cdefs.h
[DEBUG]: : ^342
[DEBUG]: :30: /usr/include/x86_64-linux-gnu/sys/cdefs.herror:: 273function-like: 5macro:
[DEBUG]: error'__GNUC_PREREQ': function-likeis macronot
[DEBUG]: defined'__GNUC_PREREQ'
[DEBUG]: is not defined
[DEBUG]: #if (!defined __cplusplus || __GNUC_PREREQ (4,3) #if __GNUC_PREREQ (2,8)
[DEBUG]:
[DEBUG]: ^ ^
[DEBUG]:
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:283:/usr/include/x86_64-linux-gnu/sys/cdefs.h5:: 361error:: 5function-like: macroerror
[DEBUG]: : function-like'__GNUC_PREREQ' macrois
[DEBUG]: not'__GNUC_PREREQ' definedis
[DEBUG]: not defined
[DEBUG]: #if __GNUC_PREREQ (2,97)
[DEBUG]: ^
[DEBUG]: #if __GNUC_PREREQ (4,3)
[DEBUG]: ^/usr/include/x86_64-linux-gnu/sys/cdefs.h
[DEBUG]: :292:5fatal error:: tooerror : manyfunction-like errorsmacro
[DEBUG]: emitted, '__GNUC_PREREQ'stopping isnow not[-ferror-limit=]
[DEBUG]: defined
[DEBUG]: #if __GNUC_PREREQ (3,3)
[DEBUG]: ^
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:300:5: error: function-like macro
[DEBUG]: '__GNUC_PREREQ' is not defined
[DEBUG]: #if __GNUC_PREREQ (3,4)
[DEBUG]: ^
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:314:5: error: function-like macro
[DEBUG]: '__GNUC_PREREQ' is not defined
[DEBUG]: #if __GNUC_PREREQ (3,2)
[DEBUG]: ^
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:327:5: error: function-like macro
[DEBUG]: '__GNUC_PREREQ' is not defined
[DEBUG]: #if __GNUC_PREREQ (4,3)
[DEBUG]: ^
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:342:30: error: function-like macro
[DEBUG]: '__GNUC_PREREQ' is not defined
[DEBUG]: #if (!defined __cplusplus || __GNUC_PREREQ (4,3)
[DEBUG]: ^
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:361:5: error: function-like macro
[DEBUG]: '__GNUC_PREREQ' is not defined
[DEBUG]: #if __GNUC_PREREQ (4,3)
[DEBUG]: ^
[DEBUG]: fatal error: too many errors emitted, stopping now [-ferror-limit=]
[DEBUG]: In file included from src/_imaging.c:75:
[DEBUG]: In file included from /home/ros/APP_MD_ADS/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include/Python.h:11:
[DEBUG]: In file included from /home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/8.0.2/include/limits.h:37:
[DEBUG]: In file included from /home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/limits.h:38:
[DEBUG]: /usr/include/x86_64-linux-gnu/sys/cdefs.h:41:6: error: function-like macro'''

... repeats it recursively ...

At the end :
'''
usr/include/x86_64-linux-gnu/sys/cdefs.h:361:5: error: function-like macro
'__GNUC_PREREQ' is not defined
#if __GNUC_PREREQ (4,3)
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2020 error errorss generated generated.
.
20 errors generated.
20 errors generated.
error: command '/home/ros/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang' failed with exit status 1

'''

If I remove Pillow recipe in buildozer.spec the compilation finished like a charm but with the app probably broken.

Some buildozer configs:
android.api = 30
android.minapi = 21
android.sdk = 20
android.ndk = 19c

Thanks.

@@ -492,11 +508,11 @@ def prepare_bootstrap(self, bootstrap):
def prepare_dist(self):
self.bootstrap.prepare_dist_dir()

def get_site_packages_dir(self, arch=None):
def get_site_packages_dir(self, arch):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making the arch parameter no longer optional breaks existing code. Was this intentional?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @dlech ,
Unfortunately, previously, the arch argument was useless.
Now instead, is needed in order to select the correct folder, based on the arch you're currently building for.

If some recipe is broken (We noticed in #2496 that our CI wasn't running as expected) or this change is breaking something for you, and the change could also meet someone else needs, I will schedule it as a feature-request.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries, it was a one-line fix. This PR was huge, and sometimes things slip through unnoticed, so I just thought I would ask.

dlech added a commit to xloem/bleak that referenced this pull request Oct 9, 2021
The arch argument of get_site_packages_dir() is no longer optional. Comes from changes in kivy/python-for-android#2467
xloem pushed a commit to xloem/python-for-android that referenced this pull request Oct 9, 2021
* Added support for aab

* Move to build:gradle:3.5.4 (adds support for API 30), fix some tests

* Github actions test apps (apk + aab)

* Add missing bdistaab

* Fix automated tests

* ndk lib folder (or ndk platform) now is ABI specific

* Fixes dist lookup + some tests

* Added .aab and .apks to blacklist

* Interrupt build and alert the user if tried to build an aab in debug mode

* Updates troubleshooting instructions to reflect current structure.

* Exclude gdbserver and gdb.setup from release builds

* Add a paragraph in history + fixes --arch docs

* Fix versioning

* Minor fixes to docs

* Some code cleanup

* Removes unusued versioning logic in unpackPyBundle and add a FIXME
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

Successfully merging this pull request may close these issues.