OpenVPN / tap-windows6

Windows TAP driver (NDIS 6)
Other
788 stars 237 forks source link

Build is not working: .cat & .sys files are not created #46

Open yurykovshov opened 6 years ago

yurykovshov commented 6 years ago

Trying to build default driver.

  1. Installed Python 2.7.14
  2. Installed Windows Driver Kit Version 7.1.0 (C:\WinDDK\7600.16385.1) Didn't change anything, trying just a default build. Running python buildtap.py -b Got nothing, only 'OemVista.inf' files in dist. In the output see "2 errors..". Found them in buildfre_wlh_x86.err:
    0>CanonicalizePathName: GetFileAttributesW(c:\winddk\7600.16385.1\lib\wlh\*\ --> c:\winddk\7600.16385.1\lib\wlh\*\) failed - rc = 123.
    0>CanonicalizePathName: GetFileAttributesW(c:\winddk\7600.16385.1\lib\wlh\*\ --> c:\winddk\7600.16385.1\lib\wlh\*\) failed - rc = 123.

    The same on Win10... It's bug?

Changed in buildtap.py to build only x86, and edited in setenv.bat (C:\WinDDK\7600.16385.1\bin) this path set SDK_LIB_PATH=%BASEDIR%\lib\%_ddkspec%\* to: set SDK_LIB_PATH=%BASEDIR%\lib\%_ddkspec%\i386

As a result - no errors, but still have neither .cat not .sys files.

What am I doing wrong? Is this build broken now?

mattock commented 6 years ago

My build computer is a Windows 2012r2 server box with WinDDK 7600.16385.1 and it just works. Can you provide the following information:

yurykovshov commented 6 years ago

Full output of "python buildtap.py -b" buildtap.py.log

path.py

# Windows 7 DDK
DDK = "C:\\winddk\\7600.16385.1"
NSIS = "C:\\Program Files (x86)\\NSIS"

OS: Win7 sp1 image

Also attached logs from DDK

buildfre_wlh_x86.err.log buildfre_wlh_x86.log

mattock commented 6 years ago

Why is it building so much stuff and producing so much output? Normally "buildtap.py -b" produces a dozen or so lines. Near the end there's this:

    2,275 files compiled - 3 Warnings - 2 Errors - 19,321 LPS
    106 libraries built
    277 executables built

These are unrelated to a normal tap-windows6 build. There are references to devcon.exe in the output, but devcon build should not get triggered if you just use "-b" without any other options. Also, default devcon source code from MS won't build as mentioned in README.rst. I always just reuse old tapinstall.exe (a.k.a. devcon.exe) from old OpenVPN installers as advised in README.rst.

Also, at the end it shows that it actually generated the tarball:

***** Generated tarball: E:\_sandbox\tap-windows6\tap6.tar.gz

That tarball should contain the .cat and .inf files.

yurykovshov commented 6 years ago

So, I tried to build it on the clean win7 machine and it was successful. And I have also noticed that it was really fast. But I have no idea, why on my dev machines (win7 and win10, used for asp.net development) it does so much of compilation. The tarball file contains also only .inf file. I spent so much time trying to figure it out, so it's really kind of interesting now to find the root of the problem. Any ideas, what to try?

mattock commented 6 years ago

@yurykovshov I would start by looking at what tie-ins build.py has with the system. These two look promising:

If either of these has been customized the build could definitely behave oddly.