4

I have a framework that I produced with gomobile. I have written up most of my detail in this issue. It may have to do with Xcode/ld, but I have a different version of the framework that does compile. I am not sure this is entirely go (although it does seem like it) so I thought I should put a stack overflow q up. The output of file is listed in the issue but I will put it here as well:

$ file Hello.framework/Hello
Hello.framework/Hello: Mach-O universal binary with 4 architectures: [arm_v7:current ar archive] [arm64]
Hello.framework/Hello (for architecture armv7):  current ar archive
Hello.framework/Hello (for architecture i386):   current ar archive
Hello.framework/Hello (for architecture x86_64): current ar archive
Hello.framework/Hello (for architecture arm64):  current ar archive

ld is not happy with the file.

Warning ignoring file ./Hello.framework/Hello, file is universal (4 slices) but does not contain the x86_64 architecture: ./Hello.framework/Hello
pmpbar
  • 41
  • 1
  • 2
  • Any success with this? I also have this problem. – afp Sep 12 '19 at 17:45
  • Not the best solution, but I backed up my computer and reinstalled macOS...I was at my wit's end. I think that the new mobile package works much better it also includes bit code support – pmpbar Sep 13 '19 at 18:10

1 Answers1

0

In my case, the problem appeared because I wanted to free some space on my mac and deleted some of the older deployment target files. Before this, I used to build for iOS development target 10.3 and now, since I deleted those files, I had to build for 12.4.

Calling $(go env GOPATH)/bin/gomobile init before $(go env GOPATH)/bin/gomobile bind worked for me. Probably init scans the files in /Users/<user>/Library⁩/Developer⁩/Xcode⁩/iOS DeviceSupport⁩ and following calls to bind use them correctly.

afp
  • 103
  • 7