Hi,
I have been attempting to setup the Windows Core docker build as described in:
HOW_TO_BUILD.txt
Unfortunately, this does not work out of the box. So far the issues I have hit and worked around:
This does not work as when attempting to install Chocolately, it fails because it requires a reboot due to an installation of .NET. I think the following page describes it:
I fixed this by specifying a different image in the dockerfile: mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019
Missing semicolon at line 82 of DockerFile. Not sure if this would cause an issue, but I noticed and fixed.
When running the docker container, attempting to start Cygwin results in lots of nice errors in the form of:
0 [main] bash 959 child_copy: dll data read copy failed, 0x7FFB356E9000..0x7FFB356F5FD0, done 0, windows pid 2948,
Win32 error 299
0 [main] bash 958 dofork: child -1 - forked process 2948 died unexpectedly, retry 0, exit code 0xC0000005, errno 1
1
bash: fork: retry: Resource temporarily unavailable
This is fixed by changing to the cygwin directory at c:\tools\cygwin\bin and running:
bash ./rebaseall
nasm: panic: assertion cv8_state.source_files != NULL failed at output/codeview.c:517
NMAKE : fatal error U1077: 'nasm -Ox -f win64 -DNEAR -g -o crypto\aes\aesni-sha256-x86_64.obj "crypto\aes\aesni-sha256-
x86_64.asm"' : return code '0x3'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX
64\x64\nmake.exe" / depend && "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\1
4.37.32822\bin\HostX64\x64\nmake.exe" / _all' : return code '0x2'
Stop.
2: Error compiling openssl for release
Looking online, it appears to be an issue fixed in a more recent version of nasm. Unfortunately, that is not available for cygwin, so I left this for the time being. The relevant bug on OpenSSL (I think) is:
https://github.com/openssl/openssl/issues/11532
Attempting to build mhmake fails with the following error:
"C:\vcx\tools\mhmake\mhmakevc10.sln" (Build target) (1) ->
"C:\vcx\tools\mhmake\mhmake.vcxproj" (default target) (2) ->
(ClCompile target) ->
C:\vcx\tools\mhmake\src\fileinfo.h(406,31): error C2504: 'binary_function': base class undefined [C:\vcx\tools
\mhmake\mhmake.vcxproj]
C:\vcx\tools\mhmake\src\fileinfo.h(406,47): error C2143: syntax error: missing ',' before '<' [C:\vcx\tools\mh
make\mhmake.vcxproj]
This is fixed by adding "#include <functional>" to the beginning of fileinfo.h. Possible relevant link:</functional>
https://developercommunity.visualstudio.com/t/Compiler-errors-on-binary_function-for-c/10444840?q=azure+repos
There is a bug in buildall.sh line 173:
tools/mhmake/Release64/mhmake -P$2 -C xorg-server MAKESERVER=1 DEBUG=1
it should be "Debug64" not "Release64" when the 'D' argument is passed to buildall.sh
Compilation now fails when attempting to link xkbcomp.exe:
*** Error -> Error running command: link /nologo /INCREMENTAL:NO /MACHINE:X64 /DEBUG /SUBSYSTEM:CONSOLE /MAP:obj64\debu
g\xkbcomp.map /OUT:obj64\debug\xkbcomp.exe C:\vcx\libX11\obj64\debug\libX11.lib C:\vcx\libxcb\src\obj64\debug\libxcb.lib
C:\vcx\libXau\obj64\debug\libXau.lib C:\vcx\libxkbfile\src\obj64\debug\libxkbfile.lib odbc32.lib odbccp32.lib kernel3
2.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib shlwapi.lib oleaut32.lib uuid.li
b odbc32.lib odbccp32.lib setupapi.lib winmm.lib ws2_32.lib wmcodecdspuuid.lib comctl32.lib opengl32.lib synchronization
.lib C:\vcx\pthreads\libpthreadVC3d64.lib C:\vcx\freetype\lib64\freetype291MT_D.lib C:\vcx\openssl\debug64\libssl.lib C
:\vcx\openssl\debug64\libcrypto.lib obj64\debug\action.obj obj64\debug\alias.obj obj64\debug\compat.obj obj64\debug\exp
r.obj obj64\debug\geometry.obj obj64\debug\indicators.obj obj64\debug\keycodes.obj obj64\debug\keymap.obj obj64\debug\ke
ytypes.obj obj64\debug\listing.obj obj64\debug\misc.obj obj64\debug\parseutils.obj obj64\debug\symbols.obj obj64\debug\u
tils.obj obj64\debug\vmod.obj obj64\debug\xkbcomp.obj obj64\debug\xkbparse.obj obj64\debug\xkbpath.obj obj64\debug\xkbsc
an.obj
This is probably related to the failed OpenSSL build as it includes C:\vcx\openssl\debug64\libssl.lib on the link line, which does not exist.
At this point, I'm giving up :-)
For what it is worth, I only needed the import library files for libX11, libXkb and libXaw, all of which mercifully built prior to the final error. So I've got as far as I need to anyway.
Hope this helps. It would be nice if this docker build system worked fully as it is quite neat and obviously someone has put a lot of effort into it.
Cheers,
James
OK, so SourceForge has completely mangled my post and appears to offer no way of editing.
5-star source forge :-/
Hopefully you can still get something useful from it.
"1. Missing semicolon at line 82 of DockerFile. Not sure if this would cause an issue, but I noticed and fixed."
Should read: missed inverted comma (")