shguids.obj (from uuid.lib) wrong version? help me troubleshoot this linker error

Andrew  Kelley's Avatar

Andrew Kelley

04 Jan, 2018 09:23 PM

First off, I love AppVeyor. Thank you for this amazing service which I am using to test the Zig programming language.

I'm getting a link error on AppVeyor that I'm not getting on my Windows laptop. Could you help?

Here's an example build: https://ci.appveyor.com/project/andrewrk/zig-d3l86/build/1.0.742

The error is:
lld: error: unknown file type: d:\rs1.obj.amd64fre\shell\published\uuid\objfre\amd64\shguids.obj

I'm guessing that shguids.obj came from uuid.lib, which is one of the system dependencies of the executable I'm trying to link (which is the zig self hosted compiler). I'm further guessing that "unknown file type" means that there are multiple uuid.lib files in the appveyor environment and somehow the linker is picking up the wrong version.

Do you have any more information about this or suggestions on how to resolve? As a reminder this problem does not occur on my Windows laptop, so I think there is something funky going on in the AppVeyor environment.

  1. 1 Posted by Andrew Kelley on 04 Jan, 2018 09:35 PM

    Andrew Kelley's Avatar

    On my laptop I see:

    C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x64\Uuid.lib
    C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib\x64\Uuid.lib

    I suppose I can push commits to the project to print debug info of finding this uuid.lib file, so that I can find out what the paths are in appveyor.

  2. 2 Posted by Andrew Kelley on 05 Jan, 2018 05:29 PM

    Andrew Kelley's Avatar

    I figured it out.

    Microsoft accidentally released Windows SDK 10.0.26624.0 as version 10.0.10240.0.
    https://developer.microsoft.com/en-us/windows/downloads/sdk-archive

    On my laptop I compiled LLVM+clang 5.0.1 with this Windows SDK, and provided it to appveyor as a cached .tar.xz.

    On appveyor, zig looked for the most recent Windows SDK by comparing version numbers. Because both Windows 10 SDK 10.0.14393 and Windows 10 SDK 10.0.10240 are installed on AppVeyor, Zig found 10.0.14393 as the latest instead of 10240 as the latest, because of the version mixup.

    So I added a workaround to detect this particular version of the Windows SDK:
    https://github.com/zig-lang/zig/commit/2c35e24bd95fa8ad9af1c6a712293163232a8b3c

    Now we have a passing build! https://ci.appveyor.com/project/andrewrk/zig-d3l86/build/0.1.1.2c35e24b

  3. Support Staff 3 Posted by Ilya Finkelshte... on 05 Jan, 2018 08:40 PM

    Ilya Finkelshteyn's Avatar

    Thanks a lot for the update!

  4. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:26 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac