ipfs-shipyard / gomobile-ipfs

IPFS and libp2p on Mobile, with Gomobile
Other
324 stars 63 forks source link

Build error for Xcode 13.4.1 #131

Closed jefft0 closed 2 years ago

jefft0 commented 2 years ago

Is there an existing issue for this?

Package version

Latest commit a2c7efffdf506fb00f51c69697855ac42546a67a

Language version and compiler version

go 1.17, Xcode 13.4.1

Bug description

On macOS 12.5, Xcode 13.4.1, try buildingmake test_bridge.ios.

Current behavior

It gives the build error:

clang: error: invalid version number in '-target arm64-apple-ios13.0-macabi'

Expected behavior

It should build. On the same macOS, if I install Xcode 13.2.1 then it builds. So something changed for Xcode 13.4.1 .

Environment

macOS 12.5

Other

No response

nc163 commented 2 years ago

I found this issue. https://github.com/golang/go/issues/47228

I think, currently, builds only succeed with

-   $(GOMOBILE) bind $(GOMOBILE_OPT) -target=ios,macos,maccatalyst$(GOMOBILE_TARGET) -o $(IOS_CORE) $(CORE_PACKAGE) $(EXT_PACKAGE)
+   $(GOMOBILE) bind $(GOMOBILE_OPT) -target=ios$(GOMOBILE_TARGET) -o $(IOS_CORE) $(CORE_PACKAGE) $(EXT_PACKAGE)

To run make test_bridge.ios. This change worked.

jefft0 commented 2 years ago

@nc163 , does this solve the build problem you mentioned here? https://github.com/ipfs-shipyard/gomobile-ipfs/issues/50#issuecomment-1214290452

nc163 commented 2 years ago

@jefft0 No, this just resolves make test_bridge.ios. I have not been able to find a solution for make build_demo.ios.

jefft0 commented 2 years ago

The Makefile has an update which resolves the build error with make test_bridge.ios on Xcode 13.4.1. https://github.com/ipfs-shipyard/gomobile-ipfs/blob/e382b977418974dbe7fee25f0f1a88299c904b2f/packages/Makefile#L157-L162 Closing this issue. We will address the error with make build_demo.ios on issue #50.