-1

I try to build a vpn with wireguard as open server. and then I try to inject the dependency of wireguard, the error is raised as showed in image below:

Screenshot
enter image description here

I don't know how to solve it.

Kuldeep J
  • 382
  • 5
  • 12
Frank Ding
  • 11
  • 1
  • 2

1 Answers1

0

I also had this error. To solve it, you should:

  1. Clone the repository (https://git.zx2c4.com/wireguard-apple) to a local "wireguard-apple" directory
  2. Edit your local package's "Package.Swift" first line from "// swift-tools-version:5.3" to "// swift-tools-version:5.5"
  3. Perform the WireGuardKit integration as per the guide in "README.md"

You will likely encounter other errors afterwards related to "/usr/bin/make". In step 2, specifically in the instruction 'In the appeared "Info" tab of a newly created target, type in the "Directory" path under the "External Build Tool Configuration"', make sure to browse to the folder where you have your MAKE file. Furthermore, you also need to download go@1.19 and add a user-defined variable in XCode called "PATH", with value "${PATH}:/path/to/go@1.19/bin".

Hope this helps!

meiraxx
  • 46
  • 5
  • For me issue wasn't related to build tool. Instead, provided external build tool configuration directory could not find makefile (on Xcode 14.2 or 14.3 `${BUILD_DIR%Build/*}` was making it ignore the directory value altogether) if you are adding library locally clone it in directory with **.xcodeproj* and change path to `$PROJECT_DIR/wireguard-apple/Sources/WireGuardKitGo`. You can also add package of prior version (set dependency rule to *1.0.5-26*) and for external build tool configuration directory path use `$BUILD_DIR/../../SourcePackages/checkouts/wireguard-apple/Sources/WireGuardKitGo`. – esesmuedgars May 03 '23 at 16:27