-
-
Notifications
You must be signed in to change notification settings - Fork 294
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
gnu/stubs-32.h file not found #1915
Comments
I got no output before but now there's this:
|
Could you post the entire log output of ZLS? Ideally with a debug build. |
i had the same thing happen, im still learning zig so i thought i wrote some bad code, checked it over and over again XD |
Unfortunately I was already on the macOS 15 beta and I would like to avoid booting into linux until I am sure it's not going to break :( |
I just tested your project on my Arch Linux system and everything worked. I didn't even need to install any missing system dependencies. Running ZLS's custom build runner with build runner output at fed56dcb3e17678d905c6108b9e2d9da9bf077dc{
"deps_build_roots": [],
"packages": [
{
"name": "root",
"path": "/home/techatrix/repos/Crates/src/main.zig"
},
{
"name": "config",
"path": "/home/techatrix/repos/Crates/.zig-cache/c/bb3f36a4897a57caa44e307416750dad/options.zig"
}
],
"include_dirs": [
"/usr/include/libadwaita-1",
"/usr/include/gtk-4.0",
"/usr/include/pango-1.0",
"/usr/include/harfbuzz",
"/usr/include/gdk-pixbuf-2.0",
"/usr/include/cairo",
"/usr/include/freetype2",
"/usr/include/graphene-1.0",
"/usr/lib/graphene-1.0/include",
"/usr/include/glib-2.0",
"/usr/lib/glib-2.0/include",
"/usr/include/libmount",
"/usr/include/blkid",
"/usr/include/sysprof-6",
"/usr/include/libpng16",
"/usr/include/pixman-1",
"/usr/include/fribidi",
"/usr/include/appstream",
"/home/techatrix/repos/Crates/cross/x86_64/usr/include",
"/home/techatrix/repos/Crates/cross/aarch64/usr/include"
],
"available_options": {
"dynamic-linker": {
"name": "dynamic-linker",
"type_id": "string",
"description": "Path to interpreter on the target system",
"enum_options": null
},
"version": {
"name": "version",
"type_id": "string",
"description": "Manually specify a value",
"enum_options": null
},
"target": {
"name": "target",
"type_id": "string",
"description": "The CPU architecture, OS, and ABI to build for",
"enum_options": null
},
"build-id": {
"name": "build-id",
"type_id": "int",
"description": "Manually specify a value",
"enum_options": null
},
"cpu": {
"name": "cpu",
"type_id": "string",
"description": "Target CPU features to add or subtract",
"enum_options": null
},
"stable": {
"name": "stable",
"type_id": "bool",
"description": "Configure the application to the stable appearance",
"enum_options": null
},
"optimize": {
"name": "optimize",
"type_id": "enum",
"description": "Prioritize performance, safety, or binary size",
"enum_options": [
"Debug",
"ReleaseSafe",
"ReleaseFast",
"ReleaseSmall"
]
}
}
} build runner output at 4e1f823a036e0b866cd5c519c97b0ebd26a1b49f{
"deps_build_roots": [],
"packages": [
{
"name": "root",
"path": "/home/techatrix/repos/Crates/src/main.zig"
},
{
"name": "config",
"path": "/home/techatrix/repos/Crates/.zig-cache/c/fda2f3ba544bc0fe2d4be908ec70a05f/options.zig"
}
],
"include_dirs": [
"/usr/include/libadwaita-1",
"/usr/include/gtk-4.0",
"/usr/include/pango-1.0",
"/usr/include/harfbuzz",
"/usr/include/gdk-pixbuf-2.0",
"/usr/include/cairo",
"/usr/include/freetype2",
"/usr/include/graphene-1.0",
"/usr/lib/graphene-1.0/include",
"/usr/include/glib-2.0",
"/usr/lib/glib-2.0/include",
"/usr/include/libmount",
"/usr/include/blkid",
"/usr/include/sysprof-6",
"/usr/include/libpng16",
"/usr/include/pixman-1",
"/usr/include/fribidi",
"/usr/include/appstream",
"/home/techatrix/repos/Crates/cross/x86_64/usr/include",
"/home/techatrix/repos/Crates/cross/aarch64/usr/include",
"/usr/include"
],
"available_options": {
"dynamic-linker": {
"name": "dynamic-linker",
"type_id": "string",
"description": "Path to interpreter on the target system",
"enum_options": null
},
"version": {
"name": "version",
"type_id": "string",
"description": "Manually specify a value",
"enum_options": null
},
"target": {
"name": "target",
"type_id": "string",
"description": "The CPU architecture, OS, and ABI to build for",
"enum_options": null
},
"build-id": {
"name": "build-id",
"type_id": "int",
"description": "Manually specify a value",
"enum_options": null
},
"cpu": {
"name": "cpu",
"type_id": "string",
"description": "Target CPU features to add or subtract",
"enum_options": null
},
"stable": {
"name": "stable",
"type_id": "bool",
"description": "Configure the application to the stable appearance",
"enum_options": null
},
"optimize": {
"name": "optimize",
"type_id": "enum",
"description": "Prioritize performance, safety, or binary size",
"enum_options": [
"Debug",
"ReleaseSafe",
"ReleaseFast",
"ReleaseSmall"
]
}
}
} The final Zig file can then be produced with the following command: zig translate-c header.h -I /usr/local/include -I /usr/include/x86_64-linux-gnu -I /usr/include -I/usr/include/libadwaita-1 -I/usr/include/gtk-4.0 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/graphene-1.0 -I/usr/lib/graphene-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/sysprof-6 -I/usr/include/libpng16 -I/usr/include/pixman-1 -I/usr/include/fribidi -I/usr/include/appstream -I/home/techatrix/repos/Crates/cross/x86_64/usr/include -I/home/techatrix/repos/Crates/cross/aarch64/usr/include The first three include paths are added by default on Linux. // header.h
#include <libadwaita-1/adwaita.h> |
Maybe it was using some cached data from earlier x86 cross compilation? I tried deleting both the local and global cache and it didn't help, it only started working again after I renamed that folder. It then kept working even after renaming it back. You do seem to have these in the output:
So if headers for the wrong architecture were to be found first, wouldn't that cause an issue? |
I believe that is possible. I do not have a |
I'm having the exact same issue. Running ZLS 0.13.0 on Ubuntu 23.10 EDIT: adding an include path to the module does not work, but adding the same include path to an exe makes it work. |
Zig Version
0.13.0 (compiled from source a few days ago)
Zig Language Server Version
0.14.0-dev.1+c5ceadf
Client / Code Editor / Extensions
VSCode
Steps to Reproduce and Observed Behavior
I was working on an application and at some point zls stopped working correctly with this error. I've been working on the build.zig for a while so I didn't notice, so I do not know what started causing it. Code suggestions completely stopped working for gtk libraries.
The code is available here https://github.com/TeamPuzel/Crates
I am using Fedora 40 on aarch64 (M2 Mac)
Expected Behavior
This error is incorrect, building with zig works perfectly fine.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: