Menu

#666 timeGetTime incorrectly exported via kernel32 implib for x64

v1.0 (example)
closed-fixed
nobody
None
5
2017-09-15
2017-09-14
No

Hi,

Some change (maybe 8d449b92ef2ae63dadc7e4b4ac67d63b4b8f00d4 ?) in the recent month or so caused that libkernel32.a now unexpectedly exports the timeGetTime() function, while also being (correctly) exported via libwinmm.a. The end result is that an app trying call this function and correctly linking libwinmm.a and both libkernel32.a will not be linked to winmm.dll at startup, instead the function will be looked up inside kernel32.dll, where it's not present, causing the error: ~no entry point for timeGetTime in kernel32.dll. x86 (32-bit) binaries are unaffected.

Tested with MSYS2, where this packages fails: mingw-w64-x86_64-crt-git-5.0.0.4963.b912d5d1
This worked: mingw-w64-x86_64-crt-git-5.0.0.4889.81b4f0e2

Failing example: https://ci.appveyor.com/api/buildjobs/4lh7whpeaue557b8/artifacts/harbour-snapshot-win.7z
Last known good example: https://ci.appveyor.com/api/buildjobs/qbr6x0vmmimvnmsn/artifacts/harbour-snapshot-win.7z
Look for the binary bin/harbour.exe

Ref: https://msdn.microsoft.com/library/windows/desktop/dd757629
Ref: https://github.com/vszakats/harbour-core/issues/310

Discussion

  • Ozkan Sezer

    Ozkan Sezer - 2017-09-15

    This is the price for 'unification'. Sigh..

    The offending exports seem to have com from arm32 version of kernel32.def
    with commit 9bd6bca15de8622e1e92e493572b4441b22a5edd by Martin Storsjö:
    https://sourceforge.net/p/mingw-w64/mingw-w64/ci/9bd6bca15de8622e1e92e493572b4441b22a5edd/

    If the time functions' export from kernel32 is an arm thing, it will need adjusting
    accordingly.

     

    Last edit: Ozkan Sezer 2017-09-15
  • Martin Storsjö

    Martin Storsjö - 2017-09-15

    Fixed in latest master in https://sourceforge.net/p/mingw-w64/mingw-w64/ci/705bdc43a143e39bb55bfc1369edc769b4271654/ - sorry about this.

    I don't think they really need to be exported on arm, since they did exist in the original arm version of winmm.def as well.

    I'm sorry about the occasional breakage due to the unification - I did a reasonable effort to reduce the risk of breakage but I didn't expect this kind of issue in the source files. Thanks for testing the latest master!

     
  • Anonymous

    Anonymous - 2017-09-15

    Martin, Ozkan: Thank you guys for the quick fix. I've submitted an update for the MSYS2 package: https://github.com/Alexpux/MINGW-packages/pull/2896

     
  • Ozkan Sezer

    Ozkan Sezer - 2017-09-15
    • status: open --> closed-fixed
     
  • Ozkan Sezer

    Ozkan Sezer - 2017-09-15

    sorry about this

    Sch things happen always, so no worries :)

    Fixed in latest master

    Closing as fixed.

     

Log in to post a comment.