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

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

Open yurykovshov opened this issue 7 years ago • 5 comments

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?

yurykovshov avatar Feb 12 '18 21:02 yurykovshov

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

  • Full output of "python buildtap.py -b"
  • Contents of paths.py
  • OS version(s) you're using

mattock avatar Feb 13 '18 08:02 mattock

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

yurykovshov avatar Feb 13 '18 20:02 yurykovshov

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.

mattock avatar Feb 14 '18 12:02 mattock

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?

yurykovshov avatar Feb 14 '18 21:02 yurykovshov

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

  • <ddk-path>\bin\setenv.bat (see build_ddk method in build.py)
  • <NTMAKEENV>\makefile.def (see src/MAKEFILE)

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

mattock avatar Feb 15 '18 07:02 mattock