mihomo icon indicating copy to clipboard operation
mihomo copied to clipboard

[Bug] 用gomobile进行编译iOS包,报错

Open JerFree opened this issue 1 year ago • 2 comments

Verify steps

  • [X] 确保你使用的是本仓库最新的的 mihomo 或 mihomo Alpha 版本 Ensure you are using the latest version of Mihomo or Mihomo Alpha from this repository.
  • [X] 如果你可以自己 debug 并解决的话,提交 PR 吧 Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome.
  • [X] 我已经在 Issue Tracker 中找过我要提出的问题 I have searched on the issue tracker for a related issue.
  • [X] 我已经使用 Alpha 分支版本测试过,问题依旧存在 I have tested using the dev branch, and the issue still exists.
  • [X] 我已经仔细看过 Documentation 并无法自行解决问题 I have read the documentation and was unable to solve the issue.
  • [X] 这是 Mihomo 核心的问题,并非我所使用的 Mihomo 衍生版本(如 OpenMihomo、KoolMihomo 等)的特定问题 This is an issue of the Mihomo core per se, not to the derivatives of Mihomo, like OpenMihomo or KoolMihomo.

Mihomo version

分支Meta

What OS are you seeing the problem on?

macOS m1(13.5.1)

Mihomo config

暂无

Mihomo log

# github.com/shoenig/go-m1cpu
/Users/xxxx/go/pkg/mod/github.com/shoenig/[email protected]/cpu.go:70:33: error: 'kIOMasterPortDefault' is unavailable: not available on iOS
   IOServiceGetMatchingServices(kIOMainPortDefault, matching, &iter);
                                ^
/Users/xxxx/go/pkg/mod/github.com/shoenig/[email protected]/cpu.go:12:29: note: expanded from macro 'kIOMainPortDefault'
 #define kIOMainPortDefault kIOMasterPortDefault
                            ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.2.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:133:19: note: 'kIOMasterPortDefault' has been explicitly marked unavailable here
const mach_port_t kIOMasterPortDefault

Description

用gomobile 进行iOS framework编译报错

JerFree avatar Dec 05 '23 15:12 JerFree

Same problem when go build with ios/iphonesimulator SDK on intel mac

imzue avatar Feb 18 '24 12:02 imzue

Same problem when go build with ios/iphonesimulator SDK on intel mac

Yewenyu avatar Feb 29 '24 02:02 Yewenyu