CancelWaitableTimer could not be located

Bug #1971640 reported by Tom Kloos
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
SBCL
Incomplete
Undecided
Unassigned

Bug Description

Starting SBCL.EXE on Windows 7-64 w/ESU fails and yields the error:
The procedure entry point CancelWaitableTimer could not be located
in the dynamic link library api-ms-win-core-synch-l1-2-0.dll

This precludes the use of Maxima 5.46.0 (with SBCL 2.2.2?) and the current version 2.2.4. It appears that 2.0.0 is the last official Windows build that works.

It is said by some that Windows 7 doesn't support this function, but according to MS it's been present since XP and is certainly present in the W7 kernel32, kernelbase, etc.

This is on "Microsoft Windows [Version 6.1.7601]" with an ESU license (i.e. fully patched).

Revision history for this message
Stas Boukarev (stassats) wrote :

That call to CancelWaitableTimer is there since before Windows 8 was released, something's broken with your windows.

Changed in sbcl:
status: New → Incomplete
Revision history for this message
Tom Kloos (tommy-tek) wrote :

Right and wrong. CancelWaitableTimer was present in XP. The current SBCL.EXE fails in multiple W7-64 systems, not just mine. CancelWaitableTimer is used by multiple other software package, like Firefox, and they don't have a problem. The issue appears to be with the SBCL that should be getting this entry from api-ms-win-core-synch-l1-1-0.dll, NOT api-ms-win-core-synch-l1-2-0.dll.
A dependency walker yields this error:
Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Further, in recent win32-os.c someone has added a check for "pre-W8" with GetModuleHandle("API-MS-Win-Core-Synch-l1-2-0"). This module is present on W7 systems that have installed various versions of Visual-C runtime support, so this check for older OS versions is not valid.

Revision history for this message
Stas Boukarev (stassats) wrote :

So is the issue not with CancelWaitableTimer but with binaries not built on windows 7? I guess you have to build it yourself then.

Revision history for this message
Tom Kloos (tommy-tek) wrote :

Yes, that's probably it. The issue actually gets a bit more complicated for W7...
It needs api-ms-win-core-synch-l1-1-0.dll for CancelWaitableTimer,
and it needs api-ms-win-core-synch-l1-2-0.dll for WaitOnAddress (added since 2.0.0).
Unfortunately WaitOnAddress is only available on W8 and after so 2.0.0 is the last build for W7 unless some other tweaks are made. Regardless, win32-os.c needs some changes to reliably check for less than W8 rather than looking for a specific DLL. Probably use the convoluted GetVersion call. :-(
Thanks anyway for your help. Feel free to close this bug.

Revision history for this message
ahz (sbclbugreporter) wrote :

CI can confirm the bug.
I can run SBCL 2.0.0 without any problems but received the same error as Tom Kloos for 2.2.4.

Revision history for this message
Yukari Hafner (shinmera) wrote :

Can also confirm, and it's currently preventing me from deploying binaries compatible with Win7. I need fixes from later than 2.0.0 to make it stable, so using 2.0.0 is not an option, either.

Revision history for this message
Andrew Kravchuk (awkravchuk) wrote :

My experience shows that it is possible to build SBCL using nothing but Linux, Wine (pretending to be Windows 7), MSYS2 and some level of trickery, and resulting binary would be perfectly compatible with W7.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.