[erlang-questions] Erlang on Windows NT4
Sebastian Egner
s.egner@REDACTED
Thu Jul 17 15:21:32 CEST 2008
Hello,
Thank you for all the comments!
For what it's worth, I found out that the NT4 compatibility issue is not
related to Erlang/OTP specifically, but rather an general byproduct of
Microsoft terminating support for NT4 in Visual C++ 8:
http://forums.msdn.microsoft.com/en-US/vcgeneral/thread/2435c3ab-f732-467e-8224-5f4e3f12c10b/
http://www.mombu.com/microsoft/windows-programmer-win32/t-vs2005-and-nt4-392831.html
In short, when the system loads the VC8 runtime lib MSVCR80.DLL, it
tries to resolve a reference to the function GetLongPathNameW in
KERNEL32.DLL, which NT4 doesn't have. The beauty of it is that this
reference seems to be the only reason for most VC8 application not to
run on NT4! People have reported successfully running non-unicode VC8
applications by using custom-compiled versions of MSVCR80.DLL without
the call to GetLongPathNameW.
This means, short of ERTS being ported back to VC 6.0, there is no hope
of an 'official' version of ERTS supporting NT4, because Microsoft's
licence will prevent Ericsson to include a patched runtime lib in the
redistributable VC package. (Unless I am mistaken and there is a legal
way of supporting NT with VC8.)
Experimentally trying out R12B-3 with a patched version of MSVCR80.DLL
(<dirty mode="don't try this at home">Start emacs, load MSVCR80.DLL,
replace "GetLongPathNameW" by "GetModuleHandleA" (= 16 chars and
linkable), save.</dirty>), and creating a proper 'erl.ini' (which the
installer could not do due to an acute lack of working VMs at the time),
I am informed by the VM:
C:\Program Files\erl5.6.3\erts-5.6.3\bin>erl
Windows version not supported (min required: winnt 5.0)
So this clarifies the bug-report of my first email:
Yes, Erlang/OTP R12B-3 does check the OS version and refuses to run on
NT4. However, the check is executed in an Erlang VM, which won't start
in the first place, throwing an error message that takes an expert to
interpret.
You could consider checking the OS version in the NSIS installer itself,
e.g. using the function GetWindowsVersion:
http://nsis.sourceforge.net/Get_Windows_version
and deactivate the check from the VM (erts\emulator\sys\win32\sys.c:
check_supported_os_version()).
Kind regards,
Sebastian
More information about the erlang-questions
mailing list