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

fanotify_init failed due to old kernel; requires 5.17+ #2040

Closed
mocompute opened this issue Sep 29, 2024 · 1 comment · Fixed by #2086
Closed

fanotify_init failed due to old kernel; requires 5.17+ #2040

mocompute opened this issue Sep 29, 2024 · 1 comment · Fixed by #2086
Labels
bug Something isn't working

Comments

@mocompute
Copy link

Zig Version

0.14.0-dev.1671+085cc54aa

ZLS Version

0-14-0.dev

Client / Code Editor / Extensions

emacs eglot

Steps to Reproduce and Observed Behavior

Mistakenly thought this was a zig issue, migrating it here. (From ziglang/zig#21543)

I ran into this trying to diagnose a zls problem, where it is not recognizing any of my package dependencies. Watching the zls.log, I see it invokes a build executable, which generates some JSON output with deps_build_roots, packages, etc. Basically the metadata that zls needs.

However, immediately after the JSON, this error is printed, and it exits with status 1. So zls gives up and it won't navigate to types or declarations in my dependencies.

fanotify_init failed due to old kernel; requires 5.17+

My uname -a:

Linux nixos 5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29 23:14:13 UTC 2024 x86_64 GNU/Linux

Expected Behavior

Possibly don't invoke watch mode on old kernels.

Relevant log output

error (store ): Failed to execute build runner to collect build configuration, command:
/run/current-system/sw/bin/zig build --build-runner /home/mo/.cache/zls/build_runner/4ebeb852873127b5ece4bcd8e405fc28/build_runner.zig
Error: error: fanotify_init failed due to old kernel; requires 5.17+
@mocompute mocompute added the bug Something isn't working label Sep 29, 2024
@mocompute
Copy link
Author

Seems a simple fix: catch the error from Build.init and return:

if (!watch_suported) return;
var w = try Watch.init();

mocompute added a commit to mocompute/zls that referenced this issue Sep 29, 2024
mocompute added a commit to mocompute/zls that referenced this issue Oct 15, 2024
mocompute added a commit to mocompute/zls that referenced this issue Oct 30, 2024
mocompute added a commit to mocompute/zls that referenced this issue Nov 7, 2024
mocompute added a commit to mocompute/zls that referenced this issue Nov 7, 2024
mocompute added a commit to mocompute/zls that referenced this issue Nov 15, 2024
Techatrix added a commit that referenced this issue Nov 17, 2024
Watch Mode is not yet being used but this change is going to be necessary anyway.

fixes #2040
closes #2041
Techatrix added a commit that referenced this issue Nov 18, 2024
Watch Mode is not yet being used but this change is going to be necessary anyway.

fixes #2040
closes #2041
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant