0

In my application https://github.com/sameermahajan/PaadasML I need SpeechRecognition package. Since it depends on pyaudio, I am trying to install it (specified in requirements of my buildozer.spec file).

However while building apk (using github actions) it is giving an error of:

/usr/include/limits.h:26:10: fatal error: 'bits/libc-header-start.h' file not found
34939  #include <bits/libc-header-start.h>
34940           ^~~~~~~~~~~~~~~~~~~~~~~~~~
34941  1 error generated.
34942  error: command '/usr/bin/ccache' failed with exit code 1
34943  error: subprocess-exited-with-error
34944  
34945  × Building wheel for pyaudio (pyproject.toml) did not run successfully.
34946  │ exit code: 1
ERROR: Failed building wheel for pyaudio
34954Failed to build pyaudio
34955ERROR: Could not build wheels for pyaudio, which is required to install pyproject.toml-based projects

You can see the error and other details in my latest build under Actions tab of my repo shared above. Some posts suggest to apt install gcc-multilib for such issues. However I don't know how I can do that as a part of my buildozer build. I could not find any other python package that I can add to my requirements list to fix this issue. Some other posts point to 32 vs 64 bit system incompatibility. But I don't know how I can control that in github actions.

Here is a summary of my problem after trying out a few suggestions by Azeem.

After applying a number of fixes on my local system, I am stuck at the exact same place there as well.

Sameer Mahajan
  • 484
  • 1
  • 8
  • 27
  • Is the same sequence of commands working locally for you? – Azeem May 10 '23 at 09:18
  • You may add a separate step before build to install any dependencies. – Azeem May 10 '23 at 09:20
  • @Azeem how do I add such a step? Can I do a apt-get install in such a step? – Sameer Mahajan May 10 '23 at 09:28
  • You're using [`ubuntu-latest`](https://github.com/sameermahajan/PaadasML/blob/main/.github/workflows/kivi_workflow.yml#L9) runner so that should work. See [`steps.run`](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun) on how to do it in a separate step. – Azeem May 10 '23 at 09:31
  • @Azeem now I am getting the exact same problem on a local system as well. – Sameer Mahajan May 14 '23 at 10:50
  • Relevant thread: https://stackoverflow.com/questions/54082459/fatal-error-bits-libc-header-start-h-no-such-file-or-directory-while-compili – Azeem May 14 '23 at 11:24
  • Did you try solutions in above thread? – Azeem May 14 '23 at 11:25
  • @Azeem when I tried installing multilib I have started getting another error namely In file included from /home/sameer/PaadasML/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Include/pythread.h:128: /usr/include/pthread.h:657:6: error: 'regparm' is not valid on this platform __cleanup_fct_attribute; ^~~~~~~~~~~~~~~~~~~~~~~ – Sameer Mahajan May 14 '23 at 11:36
  • unable to find any resolution for this new error... – Sameer Mahajan May 14 '23 at 11:37
  • I don't know how to tell my 'buildozer android debug' to build specifically for 64 bit in case that helps... – Sameer Mahajan May 14 '23 at 11:38
  • Your spec file specifies that you're building for ARM, see [here](https://github.com/sameermahajan/PaadasML/blob/6614b2c750ebdf4692c77738cb82b99d79b5cf0a/buildozer.spec#L286). However, you're using `ubuntu-latest` runner in your workflow [here](https://github.com/sameermahajan/PaadasML/actions/runs/4936962203/workflow#L9) which is AMD64. I don't see any emulator configured here. I'm not sure if Builddozer automatically takes care of this or not. Maybe, you might want to shed some light on that. – Azeem May 14 '23 at 11:44
  • I have android.archs = arm64-v8a, armeabi-v7a in buildozer.spec All these architectures (armeabi-v7a, arm64-v8a, x86, x86_64) are latin to me :) I don't know which one would work on my phone... – Sameer Mahajan May 14 '23 at 11:44
  • Well, generally mobile phones now usually have ARM architecture so that's understandable. Seems like you might need to do some research about these things first. As for your local build, you must be using some emulator or your phone directly to build and deploy the generated app. – Azeem May 14 '23 at 11:49
  • My earlier project https://github.com/sameermahajan/Paadas had worked in github action with the exact same buildozer.spec and workflow.yml But may be that project didn't have as much requirement as this project. I am trying with x86_64 only now.Hope it builds and also works on my phone... – Sameer Mahajan May 14 '23 at 12:43
  • Interestingly in my latest github action I get the same error inspite of installing multilib :( https://github.com/sameermahajan/PaadasML/actions/runs/4972414705/jobs/8897614965 – Sameer Mahajan May 14 '23 at 12:56
  • https://github.com/sameermahajan/Paadas also is built for ARM, see [here](https://github.com/sameermahajan/Paadas/blob/main/buildozer.spec#L286). However, those extra dependencies may possibly be the reason of errors in this one. You should first solve this for your local build and then apply the same solution to GitHub Actions workflow. I also noticed that there's no license in your repo. You might want to add a permissible one e.g. MIT to make it more accessible for others. https://choosealicense.com/ might be helpful to choose one. – Azeem May 14 '23 at 12:59
  • I could locally build x86_64 only apk. However my phone cannot install it stating that it is incompatible :( – Sameer Mahajan May 14 '23 at 13:22

0 Answers0