Skip to content

zig: unable to find zig installation directory #269

Open
niclas opened this issue Jan 19, 2024 · 3 comments · Fixed by #270
Open

zig: unable to find zig installation directory #269

niclas opened this issue Jan 19, 2024 · 3 comments · Fixed by #270
Assignees

Comments

@niclas
Copy link
Contributor

niclas commented Jan 19, 2024

> cat hello.zig 
const std = @import("std");

pub fn main() void {
    std.debug.print("hello, world!\n", .{});
}
> prun zig-0.11.0-0 zig version
0.11.0
> prun zig-0.11.0-0 zig run hello.zig 
error: unable to find zig installation directory: FileNotFound
@niclas niclas self-assigned this Jan 19, 2024
niclas added a commit that referenced this issue Jan 19, 2024
niclas added a commit that referenced this issue Jan 19, 2024
This fixes #269.

Values for `CMAKE_INSTALL_RPATH`, `CMAKE_PREFIX_PATH` and
`LLD_INCLUDE_DIRS` were wrong or unnecessary.
niclas added a commit that referenced this issue Jan 23, 2024
This fixes #269.

Values for `CMAKE_INSTALL_RPATH`, `CMAKE_PREFIX_PATH` and
`LLD_INCLUDE_DIRS` were wrong or unnecessary. Alse use
Release mode instead of Debug.
@donald
Copy link
Contributor

donald commented Feb 6, 2024

This turned out to be a bug in std.fs.Dir.

https://lore.kernel.org/linux-xfs/c171c058-fc69-4e47-aca1-c1a35a774038@molgen.mpg.de/t/#u

We need to report this upstream. Fix is not trivial an needs a design decision: Fix the iterator std.fs.Dir.Iterator.linux.nextLinux() or fix the caller std.fs.Dir.Walker.next().

@donald
Copy link
Contributor

donald commented Feb 6, 2024

I've wrote a small test program, which uses getdents64() and displays the d_type.

buczek@theinternet:~/w$ ssh baconseed ~buczek/w/test9 /scratch/local | head -3
? .
? ..
? J
buczek@theinternet:~/w$ ssh baconseed ~buczek/w/test9 /scratch/local2 | head -3
D .
D ..
D fontawesome-free-6.1.1-web

as expected.

Now this is interesting:

buczek@theinternet:~/w$ ~buczek/w/test9 ~buczek/w | head -30
D .
D ..
F die.s
F .gdb_history
F die.c
F 2do
F dumpit
F Async.cc
F fixsoft
F Async.cc,v
F fixit.pl
F Async.h
F gd.pl
F Async.h,v
F genver
F Callback.h
F gid-tagcert.c
F Callback.h,v
L get-hostconfig
F Lock.pl
F gid-tagcert
? LockManager.pl
? gtk-test
? Makefile
? gtk-test.c
? a.out
? host2.log
? acc.dat
? hostconfig
? acc.pl

buczek@theinternet:~/w$ ssh claptrap ~buczek/w/test9 ~buczek/w | head -30
D .
D ..
F die.s
F .gdb_history
F die.c
F 2do
F dumpit
F Async.cc
F fixsoft
F Async.cc,v
F fixit.pl
F Async.h
F gd.pl
F Async.h,v
F genver
F Callback.h
F gid-tagcert.c
F Callback.h,v
L get-hostconfig
F Lock.pl
F gid-tagcert
F LockManager.pl
F gtk-test
F Makefile
F gtk-test.c
F a.out
F host2.log
F acc.dat
F hostconfig
F acc.pl

So over nfs only the first few files habe d_type. Possibly related: https://bugzilla.redhat.com/show_bug.cgi?id=1248140

@donald
Copy link
Contributor

donald commented Feb 6, 2024

https://github.com/ziglang/zig/issues/18838

@donald donald reopened this Feb 6, 2024
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants