-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Perl 5.38.2.1-32bit does not find _mkgmtime32 #204
Comments
Hi Wolf, Oof. Let me first list some older discussions on the topic of Windows XP (or, rather, Windows version support in general). While these don't describe your problem, they do provide some background information for you. Perl/perl5@4695dc7 I don't think this issue is necessarily caused by the build by the Strawberry team; I'm fairly sure @shawnlaffan used the same build setup as the previous 32bit release (same compiler as well as libraries from the 32bit v5.32 build). So, while my gut says the issue isn't on the Strawberry end of things, I'll wait for @shawnlaffan to weigh in on that build info. What I suspect the actual problem is, is that Perl itself started fixing some things for Windows without adding the workarounds necessary for EOLed OS versions. While merely dropping support for older versions of Windows doesn't mean they'll actively be broken, there are some examples in those discussions above that exemplify the problem with trying to maintain compatibility with older versions of Windows. Some APIs didn't exist, so runtime decisions based on OS version had to be made, making the code harder to maintain, etc. I'm not yet answering with a fist-on-the-table of "this is just how it is", but my guess is going to be that if you're still on a 32bit WinXP, you're likely going to have to be pinned at Perl v5.32. That being said, can you see if ActiveState has a 32bit release that might work on your WinXP platform? That might help us determine that it's our problem vs just a "way things are now" type of scenario. I don't have a way of testing on WinXP anymore. -- Chase |
Thanks @genio. The 32-bit release of SP 5.38 uses the same stack as SP 5.32 so the change would seem more likely related to something in perl itself. |
I think that perl.exe will still be using the old msvcrt.dll. Along the same lines as @genio and @shawnlaffan, I wonder if the problem might be in the setting of _WIN32_WINNT which is at 0x502 by default. Since perl-5.38.2 no longer supports XP, it is quite allowable for _WIN32_WINNT to be raised to a level beyond the scope of XP. |
On further search I found the (quite old) contribution in sourceforge on "Provide gmtime/_gmtime32/_gmtime64 for all msvcrt versions through .def files". Regards |
I'm not entirely sure what that sourceforge.net thread is about. The problem arises because the 5.38.2 win/win32.c, at line 1542, does:
_mkgmtime() is declared in strawberry/c/i686-w64-mingw32/include/time.h and in turn calls _mkgmtime32() (which is also declared in the same time.h file) - which is resolved by the aforementioned import libs. Of course, none of that helps overcome the fact that an msvcrt.dll containing the _mkgmtime32() functionality needs to be loaded when perl-5.38.2 is run. |
This particular issue should be resolved by upgrading the toolchain to MinGW-w64 12.0 or later. It was fixed by this commit: mingw-w64/mingw-w64@cd4cf9b Proof:
Of course, it's possible that upgrading the toolchain will break something else on Windows XP. BTW, XP was released 20 years ago and it's been EOL for 10 years. Why use bleeding-edge Perl on an obsolete OS? |
On my own In my Both of those builds of mine were done on a 64-bit Windows 11 system. |
You're confusing GCC version with MinGW-w64 version. GCC and the accompanying MinGW-w64 toolchain are versioned separately. For example, when you have winlibs build "winlibs-i686-posix-dwarf-gcc-13.1.0-llvm-16.0.5-mingw-w64msvcrt-11.0.0-r5", GCC version is 13.1 and the version of MinGW-w64 is 11.0. |
I see. |
I downloaded the portable version from GitHub "Assets" for a quick test.
On calling portableshell.bat, the "welcome lines" output by echo command appear on the screen.
But then an error window pops up with the text "The procedure entry point _mkgmtime32 could not be located in the dynamic link library msvcrt.dll".
Tested on a WinXP machine with all patches up to EOL.
The msvcrt.dll in C:\WINDOWS\system32 is from 2008-4-14 14:00. Version number is 7.0.2600.5512.
As remedy I tried a newer version of msvcrt.dll (7.0.18362.1).
As WFP does not allow exchange of a dll in \system32, I put this new dll into the directory of "perl.exe". But still the same error message pops up.
As I can run all .msi and portable versions from 5.14 through 5.32 (including Win32:UTCFileTime) on the WinXP machine, there must have been some incompatible change.
Any ideas of the reason or for a fix?
And I want to express my thanks to all caring for the 32-bit versions of Strawberry Perl.
Regards
Wolf
The text was updated successfully, but these errors were encountered: