-
Notifications
You must be signed in to change notification settings - Fork 253
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
Won't build on Linux #884
Comments
With more lax error checking, it will build, but it will not run.
|
The README should be updated with instructions that align more with the full Windows builds. Right now it is just how you get the minimal version of RBDoom running. This is usually what I do under Linux:
|
Only way I can seem to get it to build at all is two comment out these two lines in CMakeLists.txt
I'll try it again using your method in combination with this, and see what happens. |
Still having issues even after that build.
|
Which Linux system are you using? |
I'm on Ubuntu 24.04 at the moment. |
This is the latest official build for the Discord people for testing. Could you copy the base/renderprogs2/ folder from there into your local setup and run the engine? It's maybe a problem with the DXC compiler build for Linux. |
Here is the link, sorry: https://drive.google.com/file/d/1M0HhGfkK1viQz3HktusFjaqNS8lALxDO/view?usp=drive_link |
That works great. Sadly, it is only good for testing or playing the game. With the DXC compiler busted and the binary only building with error suppression on, I won't be able to use this for development much outside of Windows. I guess the error suppression issue isn't that big of a deal. Unfortunately, the only compiler I've fixed for Linux is the q3lcc compiler for Quake 3 and that was just one line of code lol. I'm not even sure where I'd start with the DXC compiler, but I'll take a look at it when I have some time. |
Can you try these DXC compiler binaries from October? https://drive.google.com/file/d/1LdQxsXicIp_W5Y5GsNWgzB7MGwCxzypp/view?usp=drive_link If that works then I will link it to the README. |
I can also confirm that the 1.6.0.6 build shaders work perfectly. Thanks @RobertBeckebans (and for the whole project, it's incredible and fantastic) -- I will wait for the main release on github. |
Thanks man |
What version of dxc is failing? I can confirm that version 1.7 (dev;4006-69e54e29) still works fine on linux. On macOS I am using version 1.8 (dev;4508-263a7733) without any issues. |
I was using 1.8 on Linux. |
Can we hope that you will provide a Linux binary for the next release? Linux users are like Windows users, they appreciate being able to download and launch their applications directly without having to compile them first. Thank you for your attention to my request. |
I've tried compiling the latest RBDoom3BFG with these versions of DXC:
And all gave me the blob error:
|
@hemebond which Linux distribution are you using? |
Debian Linux x86_64
|
I just compiled RBDoom3BFG with success, did you follow all theses steps?
The folder where you stored git code should not contains space or special characters. Did you obtain errors messages at step 8? If so copy the log here. My config: |
@legluondunet Sorry, the compilation is fine. The error I get is the same runtime error others are getting:
I just did #884 (comment) and the game runs now. Would the tools mentioned in #887 be an alternative method of compiling the shaders? |
I still get
as an error message when running RBDoom3BFG |
I've added this definitions in cmake:
|
The problem appears to be lying elsewhere. I used several builds of DXC and was always met with the same problem.
|
This issue seems to have arisen following the incorporation of ShaderMake into the code base. I am wondering whether there are subtle differences in shader blob construction from old to new. I would like to ask @DistantThunder to perform a very simple test if you have not already done so: do a make clean and then rebuild from scratch (dxc version should not matter, but I guess it is possible). This will force the new ShaderMake code to run and rebuild the shader blob. Please let me know if this helps. FYI - there is a known make dependency issue where the blob will not be rebuilt even with changes in dxc version as well as other changes. For instance, when building initially off of master, then switching branches and building incrementally, the blob will not be rebuilt even though in some cases it should be (e.g. with #855). |
@SRSaunders My rebuild command across DXC versions was:
I cloned the repo for the first time just yesterday. |
Thanks @DistantThunder for the extra info.
Should actually be
I am beginning to regret reporting that internal error message in compileshaders.cmake about setting |
@SRSaunders I finally understood my mistake: I was using master against latest stable v1.5.1 which is more than 1 year old. So I surmise there was some mismatch between the compiled shader binaries in v1.5.1 vs the binary build from master.
TLDR: RBDOOM binary from master is not necessarily compatible with current stable patched game content. |
@DistantThunder thanks for coming back with this info.
You can't mix RBDOOM-3-BFG binaries from one version with shader binaries from another. Either use the v1.5.1 tag or the current master branch (1.6 preview), but don't mix the two. That's also why I asked you to rebuild from scratch with a consistent version of dxc, i.e. to make sure the shader binaries match the version of the code you are running. |
Yes but since I wasn't running v1.5.1 anyway this was never going to work. I don't know how to produce the shader binaries with the build. I don't see any ".bin" files produced when running make or even |
The shaders are compiled automatically as part of the build (that's what dxc is for). There is no separate action required on your part. The compiled shader .bin files are located in FYI:
I am glad you have a solution working now. However I believe there is a use case that causes failures, and I suspect that is when you compile the code base (or use a precompiled version) and then checkout a new branch and incrementally build without doing a build clean. This can happen if you are trying to checkout master against an old 1.5.1 build, or any other scenario where there are shader updates. The old shader binaries will then mismatch the new application binary and things will not run. The make dependencies for shader builds should instead detect and handle this case, and force a rebuild of the shaders without a manual build clean by the user. |
Ah! So they're not under the Since it's customary to have all the build artifacts of the whole runtime in the same build dir, I didn't suspect I had to copy over the base directory. I compiled directly master and only copied over the produced binary in build dir. I didn't check to v1.5.1 before I understood what was going on. The shaders are systematically compiled, I don't believe they are ever cached. So if there's anything worth correcting with the build system, I'd say is to put all of the built runtime in the same directory (both RBDOOM binary and the "base" content matching the binary) or update the doc? |
Yes, the docs should probably be updated to reflect that built shaders are written to the FYI, the game generates other assets into the base directory as you play - i.e. baked lighting data (into |
I was able to get RBDoom3BFG to compile and run with the latest release version of DXC. RBDoom3BFG branch: master Note: Added the following lines to the neo/CMakeLists.txt file
after the line |
@ericwomer what compiler are you using? gcc or clang and which versions? Thanks. |
Both with clang and gcc. GCC:
CLang/CLang++:
|
I just followed the new Linux instructions in the README on a fresh Fedora 40 installation and everything works out of the box. Therefore I'm closing this. |
The text was updated successfully, but these errors were encountered: