tap-windows6 icon indicating copy to clipboard operation
tap-windows6 copied to clipboard

How to build the tap drivers in Github CI?

Open yifanwww opened this issue 4 years ago • 5 comments

  • EWDK

If executed python buildtap.py -b to use EWDK to build the tap drivers, there would be errors that The system cannot find the path specified.

Please see https://github.com/YF1999/tap-windows6/actions/runs/974225916 to find more information.

  • WDK

If executed python buildtap.py -b --sdk=wdk to use WDK to build the tap drivers, it failed to build the *.sys and *.cat files,

The build error:

"D:\a\tap-windows6\tap-windows6\src\tap-windows6.vcxproj" (default target) (1) ->
(Link target) -> 
  device.obj : error LNK2019: unresolved external symbol ___stdio_common_vsprintf referenced in function __vsnprintf_l [D:\a\tap-windows6\tap-windows6\src\tap-windows6.vcxproj]
  D:\a\tap-windows6\tap-windows6\src\Release\tap0901.sys : fatal error LNK1120: 1 unresolved externals [D:\a\tap-windows6\tap-windows6\src\tap-windows6.vcxproj]

Please see https://github.com/YF1999/tap-windows6/actions/runs/974221105 to find more information. The above error locates in the line 98.

How to fix the errors in order to build the drivers in Github CI?

yifanwww avatar Jun 26 '21 13:06 yifanwww

Also it failed to build the tap drivers in Appveyor CI, but Appveyor didn't think so.

Take 154d825 as an example, in the Appveyor CI logs, the errors are outputted at line 15, line 32 and line 50, but the final result outputted as Build success.

yifanwww avatar Jun 26 '21 14:06 yifanwww

@YF1999 as far as I know you're the first person attempting to build tap-windows6 in GitHub CI. If you get it to work we would very much appreciate a pull request. I made some inquiries to see if somebody could give some advise to you here.

mattock avatar Jun 28 '21 13:06 mattock

There is apparently regression in VS build tools which might cause above error - https://github.com/microsoft/DMF/issues/170.

Our new driver, ovpn-dco-win (https://github.com/openvpn/ovpn-dco-win), uses DMF and we got the same error, here is how we fixed/workarounded it: https://github.com/lstipakov/DMF/commit/db1f3feadc5e59aae054e2e84ea1fa96a057036d.

I personally haven't played with EWDK - I build tap-windows6 with WDK. There is GitHub actions support for ovpn-dco-win (https://github.com/OpenVPN/ovpn-dco-win/blob/master/.github/workflows/msbuild.yml), maybe something similar could be done to tap-windows6.

lstipakov avatar Jun 28 '21 13:06 lstipakov

it's too heavy for a normal user to build this project

introspection3 avatar Nov 06 '21 08:11 introspection3

@564064202 that is definitely true. That said, normal users should not rebuild this project. Patches to make building easier are always welcome.

mattock avatar Nov 06 '21 11:11 mattock