-
-
Couldn't load subscription status.
- Fork 1.8k
Closed
Labels
OS:macosIssues specific to Apple Operating Systems like MacOS and iOSIssues specific to Apple Operating Systems like MacOS and iOSdynamic linkersDynamic linkers (ld, link, lld-link, etc)Dynamic linkers (ld, link, lld-link, etc)
Description
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:
meson/mesonbuild/linkers/linkers.py
Lines 790 to 793 in e42cd6a
| 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
Labels
OS:macosIssues specific to Apple Operating Systems like MacOS and iOSIssues specific to Apple Operating Systems like MacOS and iOSdynamic linkersDynamic linkers (ld, link, lld-link, etc)Dynamic linkers (ld, link, lld-link, etc)