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

Linux (Fedora), issues with "- -isystemThirdParty/Unix/LibCxx/include/c++/v1" #16

Closed
chriztheanvill opened this issue Aug 8, 2024 · 8 comments

Comments

@chriztheanvill
Copy link

Hi!!!
Upgrading to the new plugin and UE, I got some issues with it. After some tries, I found that .clangd file, has this line, I removed and everything works fine:

- -isystemThirdParty/Unix/LibCxx/include/c++/v1

Should I edit or leave it with out this line ?

This is for Fedora Linux

@boocs
Copy link
Owner

boocs commented Aug 9, 2024

Dang. Yeah I test mine with Ubuntu. That error could mean a lot of things though.

  1. What UE version are you running?
  2. Can you check if that directory exists? Should be under /UnrealEngineDir/Engine/Source
  3. Is there anything in /UnrealEngineDir/Engine/Source/ThirdParty/Unix ?
  4. If it doesn't exist the error might be because it doesn't exist? maybe...
  5. When you remove that .clangd line, maybe Unreal includes the correct c++ lib for Fedora already?
  6. Or maybe the source code you're looking at doesn't error because it's not hitting any c++ lib that will error if that c++ lib isn't included. I actually think completionHelper.cpp should error without that c++ lib but I forget. Will have to test.

In Ubuntu I'll try to find a source file that will error when that lib isn't included.

My testing will have to be tomorrow though since I'm about to head to bed.

Edit: Updated question 3

@chriztheanvill
Copy link
Author

Yep, that path exist: /UnrealEngineDir/Engine/Source/ThirdParty/Unix/LibCxx/include/c++/v1, in my case its in: ~/Documents/My_Pkgs/Unreal_Engine/Engine/Source/ThirdParty/Unix/LibCxx/include/c++/v1.

I am trying to edit that line, but looks like no matter what I test, looks like it works:

- -Isystem/ThirdParty/Unix/LibCxx/include/c++/v1
- -I/ThirdParty/Unix/LibCxx/include/c++/v1

@boocs
Copy link
Owner

boocs commented Aug 9, 2024

So you're saying it works when you prepend a / to the start of the path?

What version of UE are you using?

@chriztheanvill
Copy link
Author

Yep, I tried even using wrong paths and works like: .../c++/v2

Jaja, sorry I am using 5.4.3

Also, one thing, could you remove the last pop up message to setup clang, or set by default for linux OS, the path /usr/bin/clangd

@boocs
Copy link
Owner

boocs commented Aug 9, 2024

Cool! If it works on Ubuntu I'll prepend it with / as default.

For /usr/bin/clangd , there could be problems with that since different Unreal version need different clangd versions to be the most compatible. What clangd version does /usr/bin/clangd have if someone had multiple clangd versions installed? For example in Ubuntu/UE5.4.# I installed llvm 16.0.6 and used the llvm-16 directory for clangd. In previous Unreal versions I used llvm-15, llvm-14 and so on with their specific versions.

If you scroll down on this page for 'Compiler' you can see what version of clang/clangd is best/most compatible with the engine version.
https://dev.epicgames.com/documentation/en-us/unreal-engine/linux-development-requirements-for-unreal-engine?application_version=5.4

@boocs
Copy link
Owner

boocs commented Aug 10, 2024

In Ubuntu, using 5.4.3, I removed the line and got errors. I added the line and prepended the path with a / and it failed.

Your error could be because you're using an older or newer version of clangd that only works with relative paths when prepended with a / or something of that sort.

  1. Is it possible to check which version of clangd is in your /usr/bin/clangd? You can do so by using: clangd -version

@chriztheanvill
Copy link
Author

clangd --version                                                                                                            ──(Sat,Aug10)─┘
clangd version 18.1.6 (Fedora 18.1.6-3.fc40)
Features: linux
Platform: x86_64-unknown-linux-gnu; target=x86_64-redhat-linux-gnu

@boocs
Copy link
Owner

boocs commented Aug 11, 2024

I've run into problems before using different clang/clangd versions. I've also run into problems running the same clang/clangd versions but a different version then was recommended by Epic. Of course I've also had success.

That said I probably won't fix this. For best compatibility I would run clang/clangd 16.0.6 for UE 5.4.3.

I will look out for this for whenever UE5 starts supporting future clang/clangd versions. Thanks!

@boocs boocs closed this as completed Aug 11, 2024
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

2 participants