wireguard-apple icon indicating copy to clipboard operation
wireguard-apple copied to clipboard

Include Homebrew in PATH for build tool to find go

Open keeshux opened this issue 3 years ago • 3 comments

Fixes this opaque error when building WireGuardGoBridge, due to Xcode not finding the go binary in PATH:

Command ExternalBuildToolExecution failed with a nonzero exit code

keeshux avatar Nov 21 '21 11:11 keeshux

You can easily add the PATH to the Developer.xcconfig

Just add

PATH = ${PATH}:/usr/local/go/bin and it's done.

mludi avatar Jan 21 '22 17:01 mludi

I would add this as a suggestion in README.md, as not everyone has the go binary in the same location, as demonstrated by the @mludi comment in comparison to @keeshux changes.
Something like:

NOTE: You may need to add a line with PATH = ${PATH}:/directory/of/go/binary to the file Config.xcconfig (Sources/WireGuardApp/Config/Config.xcconfig) file.

Markdown syntax
NOTE: You may need to add a line with `PATH = ${PATH}:/directory/of/go/binary` to the file _Config.xcconfig_ (`Sources/WireGuardApp/Config/Config.xcconfig`) file.

alessionossa avatar Feb 07 '22 16:02 alessionossa

I would add this as a suggestion in README.md, as not everyone has the go binary in the same location, as demonstrated by the @mludi comment in comparison to @keeshux changes. Something like:

NOTE: You may need to add a line with PATH = ${PATH}:/directory/of/go/binary to the file Config.xcconfig (Sources/WireGuardApp/Config/Config.xcconfig) file.

Markdown syntax

True. Personally I would do both as an optimistic strategy, i.e. adding the bit to the README and also falling back to a few default search paths.

PATH = ${PATH}:/opt/homebrew/bin:/usr/local/bin:/usr/local/go/bin

keeshux avatar Feb 17 '22 12:02 keeshux