You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/10/14 12:15:24 UTC

[GitHub] [tvm] apeskov commented on issue #9268: [Bug] [ios_rpc] Error happens during dlopen execution. Unimplemented

apeskov commented on issue #9268:
URL: https://github.com/apache/tvm/issues/9268#issuecomment-943299463


   Hi, @zhaiyi000 thank you
   This is a known issue related with latest update to Xcode 13. We are working on fix for main. I hope it will be available soon.
   
   Meanwhile I can suggest you to apply minimal workaround patch which will allow you to continue experiments with iOS.
   ```diff
   diff --git a/python/tvm/contrib/xcode.py b/python/tvm/contrib/xcode.py
   index c44a2fe4a..bb6eb8367 100644
   --- a/python/tvm/contrib/xcode.py
   +++ b/python/tvm/contrib/xcode.py
   @@ -71,6 +71,7 @@ def create_dylib(output, objects, arch, sdk="macosx"):
        cmd += ["-dynamiclib"]
        cmd += ["-arch", arch]
        cmd += ["-isysroot", sdk_path]
   +    cmd += ["-target", "arm64-apple-ios13.0"]  # any iOS version <15
        cmd += ["-o", output]
        if isinstance(objects, str):
            cmd += [objects]
   ```
   
   
   **Slightly more details about reason leading to that issue**
   
   Just FYI. TVM uses a custom DSO loader for iOS platform(because of JIT limitation of apple platform). This loader is a stripped version of original dyld loader with dropping a lot of functionality which is out of TVM needs. Particularly it supports only one format of storing export symbols inside a mach-o binary (via DYLD_INFO section). Before iOS 15 it was a default variant of binaries used for iOS. But recently default behaviour was changed in Xcode 13. Now linker uses CHAINED_FIXUPS format if you are targeting on iOS 15 and later. The patch above specifies target version to iOS 13 and forces linker to go old way with DYLD_INFO.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org