Skip to content

pygame_sdl2 compile failure # include <iconv.h> #1023

Closed

Description

@frankgould

I am trying to compile an apk using buildozer and have created a recipe for this, pasted below. The error I get can be seen in the attached file. I don't know what is causing this error. Any help greatly appreciated.

from pythonforandroid.toolchain import CompiledComponentsPythonRecipe, warning

class Pygame_sdl2Recipe(CompiledComponentsPythonRecipe):
    
    version = '2.1.0'
    url = 'https://testpypi.python.org/packages/2f/f1/8dd343ae2d97c432cf1c81ca03d2d0472396f9d8e76c677aeae9ce2ec61d/pygame_sdl2-2.1.0.tar.gz'

    site_packages_name= 'pygame_sdl2'

    depends = ['python2']

    def prebuild_arch(self, arch):
        super(Pygame_sdl2Recipe, self).prebuild_arch(arch)

        # AND: Fix this warning!
        warning('Pygame_sdl2 is built assuming the archiver name is '
                'arm-linux-androideabi-ar, which may not always be true!')

recipe = Pygame_sdl2Recipe()

pygame_sdl2_compile_err_March2017.txt

Activity

  1. inclement commented on Mar 22, 2017

    @inclement
    Member

    You'll want to copy the extra recipe contents from https://github.com/renpy/python-for-android/blob/master/recipes/pygame_sdl2/recipe.sh, converting them to the modern python-for-android Python recipe equivalents. This page has a lot of information about this, and other recipes are also a good reference.

    Could you try to adapt your base recipe to add these things? We can then go from there.

  2. frankgould commented on Mar 23, 2017

    @frankgould
    Author

    Thanks inclement for your response. I have read the page you suggested several times and it does not make sense to me because of all the options that I don't know if I need or not. I also do not know "modern python-for-android Python recipe equivalents" are and what I need to convert. I did follow your chat and updated the renpy file you suggested but I don't know what to do with it (see attached). It is currently in the following folder: /home/frankgould/Desktop/Master-Pics/Slideshow/.buildozer/android/platform/python-for-android-master/pythonforandroid/recipes/pygame_sdl2. I'm still getting the same build error with the file there. I also tried to bash the script but nothing happened. Sorry, I'm not understanding what to do.

    recipe.sh.txt

  3. frankgould commented on Mar 25, 2017

    @frankgould
    Author

    Is there someone watching these issues? I haven't heard back in 2 days. What should I do?

  4. inclement commented on Mar 25, 2017

    @inclement
    Member

    I also do not know "modern python-for-android Python recipe equivalents" are and what I need to convert.

    You have a shell script that declares some variables, and performs some commands. You need to write a Python script that declares the same variables, and performs the same commands, using the Recipe structure of python-for-android. For instance, here is the old shell script used to compile pygame, while here is the new Python code for the same thing. I'll note that pygame is a particularly complex example, most recipes are simpler.

    It is currently in the following folder: /home/frankgould/Desktop/Master-Pics/Slideshow/.buildozer/android/platform/python-for-android-master/pythonforandroid/recipes/pygame_sdl2

    This is probably an appropriate location. You should see that python-for-android has found your recipe in the build logs, even if it doesn't work.

    Is there someone watching these issues? I haven't heard back in 2 days.

    I am probably the most active dev on python-for-android, and I work through issues mostly at the weekend or some evenings. You can also catch me on irc at these times.

    What should I do?

    I suggest starting with something simpler, try to make a recipe for a pure python module such as appdirs (this doesn't actually need a recipe but you can make one). pygame_sdl2 should be doable but will be at least a bit more complex than most recipes.

  5. inclement commented on Mar 25, 2017

    @inclement
    Member

    I once tried to make a pygame_sdl2 recipe, but never finished. I don't remember how far I got or why it was failing, but there's a fairly complete recipe at https://github.com/kivy/python-for-android/blob/pygame_sdl2/pythonforandroid/recipes/pygame_sdl2/__init__.py (note that this branch also contains other new files). The relative complexity of this recipe and need for other new things is why I suggest starting with something simpler, although as far as I remember my code should be a good start for pygame_sdl2 support.

  6. frankgould commented on Mar 25, 2017

    @frankgould
    Author

    Thanks Inclement. I avoided bothering you on irc because it was quiet and I didn't want to interrupt you. I have time to wait but since I hadn't seen any activity, I thought I should ask. I will pound on this again today and see if I can make progress.

  7. frankgould commented on Mar 25, 2017

    @frankgould
    Author

    I am still getting a compile error with the pygame_sdl2 init.py you had started to work. I've attached the error message and init.py file for your review. I do not know what to do to fix this error or what's causing it. Any assistance greatly appreciated. Is it appropriate to offer to pay for this to be fixed or not? Thanks.
    error-25Marchat1.22.txt
    init.py.txt

  8. inclement commented on Mar 25, 2017

    @inclement
    Member

    Could you create a new pull request with this recipe and all the other stuff? This will make it easier to check and test.

  9. frankgould commented on Mar 25, 2017

    @frankgould
    Author

    I don't know how to do what you're asking. I don't understand pull, forks, branches, etc. Can you show me what to do?

  10. dessant commented on Mar 25, 2017

    @dessant
    Contributor

    @frankgould, have you tried checking out the github docs?

  11. frankgould commented on Mar 25, 2017

    @frankgould
    Author

    No dessant. Are you suggesting I start there to learn how to pull requests? I'm also not sure what "all the other stuff" means.

  12. dessant commented on Mar 25, 2017

    @dessant
    Contributor

    @frankgould, yes, I'm suggesting exactly that.

  13. frankgould commented on Mar 25, 2017

    @frankgould
    Author

    Okay, I took a shot at it. Let me know what else I need to do. Sorry for my reluctance. I guess you can find it or do I need to include a link? I appreciate your help.

  14. frankgould commented on Apr 3, 2017

    @frankgould
    Author

    Update: I was finally able to get opencv to work and do not need pygame_sdl2. However, I am willing to work with someone to get this to work. Please let me know and I will offer my time to solve this problem. Until then, I'm moving forward.

  15. inclement commented on Jan 30, 2019

    @inclement
    Member

    Closing as inactive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions