Skip to content

Meson produces "bundle" library for iOS which does not pass App Store validation #14240

Closed
@FeodorFitsner

Description

@FeodorFitsner

When cross-compiling Numpy, Pandas and any other Python module using Meson as their build system for iOS it produces .so libraries of "bundle" type which fail App Store validation with errors like this:

Validation failed (409) The binary is invalid. The executable 'Runner.app/Frameworks/numpy._core._simd.framework/numpy._core._simd' has type 'BUNDLE' that is not valid. Only 'EXECUTE' is permitted.

Checking file type with file gives:

Mach-O 64-bit bundle arm64

Indeed, -bundle option is hard-coded in the method returning linker args:

def get_std_shared_module_args(self, options: 'KeyedOptionDictType') -> T.List[str]:
return ['-bundle'] + self._apply_prefix('-undefined,dynamic_lookup')

Patching Meson and replacing ['-bundle'] with ['-dynamiclib'] in that file produces library of the correct type which passes App Store validation.

Correct file type:

Mach-O 64-bit dynamically linked shared library arm64

Is there any way to override that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS:macosIssues specific to Apple Operating Systems like MacOS and iOSdynamic linkersDynamic linkers (ld, link, lld-link, etc)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions