wireguard-apple
wireguard-apple copied to clipboard
Include Homebrew in PATH for build tool to find go
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
You can easily add the PATH
to the Developer.xcconfig
Just add
PATH = ${PATH}:/usr/local/go/bin
and it's done.
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.
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