[4.26.1] Opening C++ Windows Projects in Linux Always Fails

I’m working on a game devlopment team for a non-profit project, and am rather new to Unreal and C++, myself.

Most of my teammates use Windows, and I use Linux, and am partly responsible for ensuring that the project will compile and run for Linux in the future.

One way I felt that this would make sense to do, is to simply do what I usually do, and work on the system I use daily; however, I came to a surprising yet irritating issue where I couldn’t open the project due to a few nasty compiling issues:

  • The Linux compiled engine claims that my team and I are using different engine versions, so it forces me to “convert” the project even though we’re all using the same release version of the engine (4.26.1)
  • When it does try to “convert” the project, it either fails claiming that it can’t complete the compilation because doing so would “replace engine files(??)” and ask if I want to open the log with “NullSourceAcess(???);” or it claims that “Linux isn’t a valid build target”
  • If I try to run the Makefile in the project myself, then it compiles what it wants, but attempting to open the project afterwards just crashes the editor
  • I looked around a little bit about this issue somewhere (it was very difficult to find info regarding this and was I heard of this thirdhand) but supposedly this unnecessary “project conversion” for this particular circumstance is due to some kind of oversight in the engine code that perceives in a wide-swathe that ALL different versions and operating systems are different versions of the engine instead of just different versions
  • This aside, there’s also the project C++ module that also refuses to compile for, what I imagine might even be the same reason, but I honestly wouldn’t know
  • And as for the “NullSourceAcess” oddity I mentioned, it supposedly doesn’t detect what installed IDE I have? (I have KDevelop installed)

All of this has made my 1st experience with UE4 hell, in a manner of speaking.
These are gaping holes in Linux-editor compatibility and even Unity does this better…

I hope these issues get fixed ASAP, but in the meantime if anyone can help me, I’d greatly appreciate it.

One last bit… since you have a c++ project you might want to run the compilation from the CLI and see where it fails something like this will work
It attempts to chmod two files to change permissions, fails to do so, then fails on trying to build the project’s “ModuleRules” dll, then stops the build script.

chmod: changing permissions of ‘bin/mcs’: Operation not permitted
chmod: changing permissions of ‘bin/xbuild’: Operation not permitted
^

on 4.26 there is currently an issue with vulkan defragmenter, so I tend to recommend to disable that in Config/DefaultEngine.ini
Also, the DefaultEngine.ini didn’t exist so I created it with what you suggested

The crash is curious, and would need to see the crash log to be able to help out with that
As for this, it’s super easy to reproduce, but I’ll wait until we figure this out to see if by the end of fixing this that it doesn’t do that again; but this issue and the build issue does prevent straightforward operation of the engine

It attempts to chmod two files to change permissions, fails to do so, then fails on trying to build the project’s “ModuleRules” dll, then stops the build script.
I just tried it again and it worked for some reason :confused:

Maybe because UE4 triggers gamemode when it runs normally?
I simulated this by running a terminal with gamemode then running the script but then it failed with that specifically; just doing it from the terminal normally actually causes some progress

It seems to have worked, and the project opens, but the window isn’t appearing properly; it’s completely transparent and isn’t maximized (not that it matters since I can’t touch it at all?)

And if I try to close the window, it claims it’s not responding

To fix the NullSourceAcess issue add this to the /Config/DefaultEditorSettings.ini

[/Script/SourceCodeAccess.SourceCodeAccessSettings]
PreferredAccessor=KDevelop

If the ini does not exist create it. The default is the Null one because you never know what people have installed on their machines.

As for the conversion. If you are sure that you are using the same engine version you can skip the conversion(it is under more options in that window)

The crash is curious, and would need to see the crash log to be able to help out with that, but on 4.26 there is currently an issue with vulkan defragmenter, so I tend to recommend to disable that in Config/DefaultEngine.ini

[SystemSettings]
r.Vulkan.EnableDefrag=0

One last bit… since you have a c++ project you might want to run the compilation from the CLI and see where it fails something like this will work

<PATH TO ENGINE>/Engine/Build/BatchFiles/Linux/Build.sh <PROJECT NAME>Editor Linux Development -Project=<PATH TO PROJECT>/<PROJET NAME>.uproject

Obviously fill in the blanks

Attempting to open it a second time worked when I removed the DefaultEngine ini file

However, the editor crashes upon exiting every time :confused: