Skip to content
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

fetch fails on Windows with "error: FileNotFound" #41

Closed
earthnuker opened this issue Dec 21, 2021 · 13 comments
Closed

fetch fails on Windows with "error: FileNotFound" #41

earthnuker opened this issue Dec 21, 2021 · 13 comments

Comments

@earthnuker
Copy link

Hello everyone,

I'm using zig version 0.9.0 and zigmod version v87.1995ca2 windows x86_64 gnu. Trying to run zigmod-x86_64-windows.exe fetch in a clone of https://github.com/lun-4/obsidian2web at commit cf75283 results in the following stack trace:

error: FileNotFound
/zig-linux-x86_64-0.9.0-dev.1815+20e19e75f/lib/std/heap.zig:150:9: 0x7ff6e4134735 in std.heap.CAllocator::std.heap.CAllocator.resize (zigmod-x86_64-windows.obj)
/zig-linux-x86_64-0.9.0-dev.1815+20e19e75f/lib/std/heap.zig:150:9: 0x7ff6e4134735 in std.heap.CAllocator::std.heap.CAllocator.resize (zigmod-x86_64-windows.obj)
/zig-linux-x86_64-0.9.0-dev.1815+20e19e75f/lib/std/heap.zig:150:9: 0x7ff6e4134735 in std.heap.CAllocator::std.heap.CAllocator.resize (zigmod-x86_64-windows.obj)
/zig-linux-x86_64-0.9.0-dev.1815+20e19e75f/lib/std/heap.zig:150:9: 0x7ff6e4134735 in std.heap.CAllocator::std.heap.CAllocator.resize (zigmod-x86_64-windows.obj)
/zig-linux-x86_64-0.9.0-dev.1815+20e19e75f/lib/std/heap.zig:150:9: 0x7ff6e4134735 in std.heap.CAllocator::std.heap.CAllocator.resize (zigmod-x86_64-windows.obj)
/zig-linux-x86_64-0.9.0-dev.1815+20e19e75f/lib/std/heap.zig:150:9: 0x7ff6e4134735 in std.heap.CAllocator::std.heap.CAllocator.resize (zigmod-x86_64-windows.obj)
/zig-linux-x86_64-0.9.0-dev.1815+20e19e75f/lib/std/heap.zig:150:9: 0x7ff6e4134735 in std.heap.CAllocator::std.heap.CAllocator.resize (zigmod-x86_64-windows.obj)
/zig-linux-x86_64-0.9.0-dev.1815+20e19e75f/lib/std/heap.zig:150:9: 0x7ff6e4134735 in std.heap.CAllocator::std.heap.CAllocator.resize (zigmod-x86_64-windows.obj)
/zig-linux-x86_64-0.9.0-dev.1815+20e19e75f/lib/std/heap.zig:150:9: 0x7ff6e4134735 in std.heap.CAllocator::std.heap.CAllocator.resize (zigmod-x86_64-windows.obj)
/zig-linux-x86_64-0.9.0-dev.1815+20e19e75f/lib/std/heap.zig:150:9: 0x7ff6e4134735 in std.heap.CAllocator::std.heap.CAllocator.resize (zigmod-x86_64-windows.obj)
/zig-linux-x86_64-0.9.0-dev.1815+20e19e75f/lib/std/fs.zig:1590:39: 0x7ff6e421325a in std.fs.Dir::std.fs.Dir.openDirAccessMaskW (zigmod-x86_64-windows.obj)
/zig-linux-x86_64-0.9.0-dev.1815+20e19e75f/lib/std/fs.zig:1529:9: 0x7ff6e414e5fd in std.fs.Dir::std.fs.Dir.openDirW (zigmod-x86_64-windows.obj)
/zig-linux-x86_64-0.9.0-dev.1815+20e19e75f/lib/std/fs.zig:1457:13: 0x7ff6e414d258 in std.fs.Dir::std.fs.Dir.openDir (zigmod-x86_64-windows.obj)
/home/circleci/zigmod/src/common.zig:218:79: 0x7ff6e4169cc9 in .zigmod.common.get_module_from_dep (zigmod-x86_64-windows.obj)
/home/circleci/zigmod/src/common.zig:41:13: 0x7ff6e4166a82 in .zigmod.common.collect_deps_deep (zigmod-x86_64-windows.obj)
/home/circleci/zigmod/src/cmd/fetch.zig:29:24: 0x7ff6e413d3fb in .zigmod.cmd.fetch.execute (zigmod-x86_64-windows.obj)
/home/circleci/zigmod/src/main.zig:54:13: 0x7ff6e4137c81 in main (zigmod-x86_64-windows.obj)

this seems to not be related to #38

(also the path to the debug symbols file seems to be hardcoded in the zigmod executable so i had to create D:\home\circleci\zigmod\zig-cache\o\e7e9c8ee0d4909e4216ef5bee9f26177\ and move zigmod-x86_64-windows.pdb there, might be an issue for people without a D drive)

best regards,

Earthnuker

@earthnuker
Copy link
Author

Seems like merging #40 would fix this

@lun-4
Copy link
Contributor

lun-4 commented Dec 22, 2021

I can reproduce this issue (on x86_64-linux.5.15.6...5.15.6-gnu.2.32) with the fixes from #40.

One possible temporary fix I found to make zigmod fetch finish successfully is to manually create the .zigmod/deps folder on the repository folder.

@lun-4
Copy link
Contributor

lun-4 commented Dec 22, 2021

This smells like #34. Tested with the aforementioned patch in zigmod v87.1995ca2 linux x86_64 musl.

@nektro
Copy link
Owner

nektro commented Dec 25, 2021

what is the contents of your zig.mod ?

@yrashk
Copy link

yrashk commented Dec 27, 2021

@nektro
Copy link
Owner

nektro commented Dec 27, 2021

oh its only failing on windows, interesting. thanks for the run/file. additionally it seems to only be failing on the cross compiled version.

https://github.com/nektro/zigmod/runs/4630241454?check_suite_focus=true

GH Action is using natively compiled debug build, actions-setup-zigmod is downloading the x86_64-windows-gnu binary

@nektro
Copy link
Owner

nektro commented Dec 27, 2021

oh wait @yrashk yours seems slightly different

@yrashk
Copy link

yrashk commented Dec 27, 2021

Here's the failing run with extra info https://github.com/yrashk/zig-generator/runs/4638493958

@yrashk
Copy link

yrashk commented Dec 27, 2021

I also tried to use a prebuilt version of zigmod on my Windows machine and it worked fine.

@yrashk
Copy link

yrashk commented Dec 27, 2021

I've tried pre-creating .zigmod/deps in CI, didn't help. Same error.

@lun-4
Copy link
Contributor

lun-4 commented Dec 28, 2021

I was doing some weird zig.mod shenanigans back on the mentioned issue, and was able to make it work after without changes on zigmod's side. @earthnuker can you confirm?

@nektro
Copy link
Owner

nektro commented Jan 6, 2022

yrashk's issue was fixed in another thread, will give @earthnuker a little more time to confirm but this should otherwise be fixed now

@earthnuker
Copy link
Author

Hi, sorry for the late reply, yes with the latest of the repo zigmod fetch works fine on windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants