微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Heimdal 7.7.0 编译与 VS 2019 和最新的 Win SDK

如何解决Heimdal 7.7.0 编译与 VS 2019 和最新的 Win SDK

有人有用VS 2019编译Heimdal 7.7.0的经验吗?

我使用下一个命令来设置构建环境并尝试编译:

set INCLUDE=%INCLUDE%;C:\Program Files\Microsoft SDKs\Windows\v7.1\Include
call "c:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsall.bat" x86 10.0.18362.0
set PATH=c:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared\;%PATH%
cd c:\Projects\heimdal
nmake /f NTMakefile

编译在 roken lib 上出现错误

.\socket.c(76): error C2065: 'in6addr_any': undeclared identifier
.\socket.c(76): error C2440: '=': cannot convert from 'int' to 'IN6_ADDR'
syslogc.c
.\socket.c(317): error C2065: 'IPPROTO_IPV6': undeclared identifier

更新:找到解决此问题的方法。运行nmake之前需要设置正确的APPVER:

SET APPVER=6.1

解决了这个特定的问题,但建立了错误的刹车:

BEGIN Failed--compilation aborted at ..\..\cf\make-proto.pl line 7.
Could Not Find c:\Projects\heimdal\out\obj_AMD64\lib\asn1\der-protos.h
        copy /Y c:\Projects\heimdal\lib\asn1\..\..\out\obj_AMD64\lib\asn1\der-protos.h c:\Projects\heimdal\lib\asn1\..\..\out\dest_AMD64\inc\der-protos.h

Update2:该问题与首先在 msys64 中发现的 perl 相关,而不是在 c:\Perl64\bin 中。设置正确的路径修复了这个问题。 现在在汇编目标中有错误

mt.exe : general error c101008c: Failed to read the manifest from the resource of file "c:\Projects\heimdal\packages\windows\assembly\..\..\..\out\dest_AMD64\bin\Heimdal.Kerberos.Debug\heimdal.dll". The specified resource type cannot be found in the image file.

Update3:这个问题是由新版本的 mt.exe 引起的。它只在当前文件夹中查找文件。通过更新packages\windows\assembly\NTMakefile,将cd添加到.dll存在的文件夹中并添加:“。” mt.exe 调用的 -hashupdate 选项:

93: cd $(ASMKRBDIR)
94: $(MT) -manifest $(ASMKRBDIR)\$(ASMKRBMAN).nohash -out:$(ASMKRBDIR)\$(ASMKRBMAN) -hashupdate:"." -makecdfs

下次刹车

makeinfo.exe --css-include=c:\Projects\Access\GD\heimdal\doc\..\doc/heimdal.css --html heimdal.texi
c:\msys64\usr\bin\makeinfo.exe: unrecognized option `--css-include=c:\Projects\Access\GD\heimdal\doc\..\doc/heimdal.css'

看起来这是因为旧版本的 makeinfo,在 mingw64 中。更新 mingw64 中的 texinfo 和 makeinfo .exe 完全消失。跳过构建中的文档和安装步骤,因为我只需要库。而已。 需要为构建安装的软件包(我记得的所有内容):

Windows SDK 7.1
cygwin64 and packages in it:
pacman -S bison
pacman -S flex
pacman -S diffutils
pacman -S texinfo
Active Pearl 5.28
https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip
https://www.cjmweb.net/makeinfo/makeinfo-4.0.zip
set INCLUDE=%INCLUDE%;C:\Program Files\Microsoft SDKs\Windows\v7.1\Include
set PATH=c:\msys64\usr\bin;c:\Program Files (x86)\wix311-binaries;%PATH%

对不起,弄得一团糟。希望会有同样方式的人发现这有帮助。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。