Skip to content

Can't compile dependency in 32bit on 64bit system #1237

@Denpeer

Description

@Denpeer

I'm trying to compile the package pyclipper (https://github.com/greginvm/pyclipper) for armeabi-v7a. Using the master branch compilation succeeds but i get the following error upon running the application on my android device: ImportError: dlopen failed: "/data/data/org.test.hcdpyclipper/files/app/lib/python2.7/site-packages/pyclipper.so" is 64-bit instead of 32-bit

When using a custom recipe to compile to 32bit I get the following compilation error: wrong ELF class: ELFCLASS32 when building the dependency. The recipe I created is:

from os.path import exists, join
import sh
import glob
import pprint
from pprint import pprint

class PyclipperRecipe(PythonRecipe):
    # This could also inherit from PythonRecipe etc. if you want to
    # use their pre-written build processes

    version = '1.1.0'
    url = 'https://github.com/greginvm/pyclipper/releases/download/{version}/pyclipper-{version}.zip'
    # {version} will be replaced with self.version when downloading

    depends = ['python2', 'setuptools']  # A list of any other recipe names
                                    # that must be built before this
                                    # one

    conflicts = []  # A list of any recipe names that cannot be built
                    # alongside this one

    site_packages_name = 'pyclipper'


    def get_recipe_env(self,arch):
        env = super(PyclipperRecipe, self).get_recipe_env(arch)
        # Manipulate the env here if you want
        env['PYTHONPATH'] = ':'.join([self.ctx.get_site_packages_dir()])
        env['LDFLAGS'] += " -m32"
        env['CFLAGS'] += " -m32"
        pprint(env)
        return env


recipe = PyclipperRecipe()

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