Closed
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
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?