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

1. In included file: 'sys/lock.h' file not found [pp_file_not_found] #546

Open
MarcosIgnacioo opened this issue Jul 27, 2024 · 4 comments
Open

Comments

@MarcosIgnacioo
Copy link

this one is weird,
i have this problem where the lsp indicates me that, but when i compile the code it compiles and it really works at the moment of using the 3dsx in citra; i looked for that header file in the repo and in my system but it doesn't seem to appear

Environment?

  • What host OS are you using?
    i am using Pop!_OS 22.04 LTS x86_64
    6.9.3-76060903-generic
@DacoTaco
Copy link
Member

@MarcosIgnacioo : does this also happen with one of the examples we have? i could spin up a Pop!_OS VM to try and replicate this

@WinterMute
Copy link
Member

WinterMute commented Jul 28, 2024

I've deleted your comment where you "solved" your issue @MarcosIgnacioo since what you did is massively inappropriate and will mainly cause other problems. You shoud never set CPATH globally in your environment as this will affect all the compilers on your system potentially causing them to parse incorrect include paths. The cross compilers we use should never be told to use /usr/include - that's only for the host compiler. There is absolutely no requirement for you to compile newlib in order to have your LSP parse headers. <sys/lock.h> is a compiler header.

The problem is that you haven't configured your LSP properly to allow it to query the compiler for include paths and afaik it will default to using the host compiler. How you do this rather depends on your IDE and how it's configured to use LSP/clangd.

Which editor are you using?

@WinterMute
Copy link
Member

@MarcosIgnacioo please stop adding your inappropriate "fixes" in the comments. Your configuration is wrong. You should not add random paths to your LSP config file. Seems to work fine and actually does work fine are two entirely different things.

What IDE are you using?

@MarcosIgnacioo
Copy link
Author

@MarcosIgnacioo please stop adding your inappropriate "fixes" in the comments. Your configuration is wrong. You should not add random paths to your LSP config file. Seems to work fine and actually does work fine are two entirely different things.

What IDE are you using?

neovim

@devkitPro devkitPro deleted a comment from xzn Aug 16, 2024
@devkitPro devkitPro locked and limited conversation to collaborators Aug 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants