Skip to content

Windows Dev Kit: ability for it to upgrade itselfΒ #7392

Open

Description

@ehaas

Ran into this building Zig on Windows using the compiler dev kit tarball, on a system that does have MSVC installed (not sure if that matters)

According to git bisect the problem was introduced in commit a579f8a

dev kit: zig+llvm+lld+clang-x86_64-windows-gnu-0.7.0+1afea36a1

 C:\Users\Evan\Downloads\zig+llvm+lld+clang-x86_64-windows-gnu-0.7.0+1afea36a1\bin\zig.exe build -Dstage1 -Dtarget=native-native-gnu --search-prefix C:\Users\Evan\Downloads\zig+llvm+lld+clang-x86_64-windows-gnu-0.7.0+1afea36a1
.\src\link\MachO.zig:1819:34: error: container 'std.macho' has no member called 'EXPORT_SYMBOL_FLAGS_KIND_REGULAR'
            .export_flags = macho.EXPORT_SYMBOL_FLAGS_KIND_REGULAR,
                                 ^
.\src\link\MachO.zig:315:13: note: referenced here
            try self.writeExportTrie();
            ^
.\src\link.zig:479:13: note: referenced here
            try base.flushModule(comp);
            ^
.\src\Compilation.zig:1249:5: note: referenced here
    try self.bin_file.flush(self);
    ^
.\src\main.zig:1927:5: note: referenced here
    try comp.update();
    ^
.\src\main.zig:1789:49: note: referenced here
    updateModule(gpa, comp, zir_out_path, hook) catch |err| switch (err) {
                                                ^

Activity

  1. andrewrk commented on Dec 11, 2020

    @andrewrk
    Member

    ok so the unsolved problem with the dev kit is that every time we update the compiler in certain ways, you have to refresh the dev kit in order to keep it working. I have some ideas on how to improve this, but for now the solution is that I need to upload a new dev kit .zip file.

  2. andrewrk commented on Dec 11, 2020

    @andrewrk
    Member

    FYI the dev kit link is updated: https://github.com/ziglang/zig/wiki/Building-Zig-on-Windows

    It solves this particular problem, but I'm going to keep the issue open to track the fact that we don't have a way to update the dev kit using the dev kit.

  3. added
    enhancementSolving this issue will likely involve adding new logic or components to the codebase.
    on Dec 11, 2020
  4. added this to the 0.8.0 milestone on Dec 11, 2020
  5. changed the title [-]error: container 'std.macho' has no member called 'EXPORT_SYMBOL_FLAGS_KIND_REGULAR'[/-] [+]Windows Dev Kit: ability for it to upgrade itself[/+] on Dec 11, 2020
  6. ehaas commented on Dec 12, 2020

    @ehaas
    SponsorContributorAuthor

    One workaround for now is to additionally pass --override-lib-dir path\to\zig checkout\lib (e.g. --override-lib-dir C:\Users\Evan\projects\zig\lib) when using the compiler kit. This will work if trying to compile Zig when it uses new standard library features. It may not help if the compiler or build tools change in other ways though.

    I confirmed that this workaround allows compiler kit 8076894d8 to build latest master 6ab5beb (without the additional flag it breaks due to missing std.fs.path.extension

  7. andrewrk commented on Dec 12, 2020

    @andrewrk
    Member

    I updated the wiki instructions to suggest the --override-lib-dir tip.

  8. modified the milestones: 0.8.0, 0.9.0 on Jun 4, 2021
  9. modified the milestones: 0.9.0, 0.10.0 on Nov 24, 2021
  10. modified the milestones: 0.10.0, 0.11.0 on Apr 16, 2022
  11. modified the milestones: 0.11.0, 0.12.0 on Jun 19, 2023
  12. modified the milestones: 0.14.0, unplanned on Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSolving this issue will likely involve adding new logic or components to the codebase.os-windowsMicrosoft Windows

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions