RobertBeckebans / RBDOOM-3-BFG

Doom 3 BFG Edition source port with updated DX12 / Vulkan renderer and modern game engine features
https://www.moddb.com/mods/rbdoom-3-bfg
GNU General Public License v3.0
1.38k stars 247 forks source link

Won't build on Linux #884

Open Kr3m opened 2 weeks ago

Kr3m commented 2 weeks ago
In function ‘void* memcpy(void*, const void*, size_t)’,
    inlined from ‘bool idDataQueue<maxItems, maxBuffer>::Append(int, const byte*, int, const byte*, int) [with int maxItems = 64; int maxBuffer = 8000]’ at idlib/../idlib/DataQueue.h:112:8,
    inlined from ‘void idPacketProcessor::VerifyEmptyReliableQueue(byte, byte)’ at /home/kevin/GitHub/RBDOOM-3-BFG/neo/sys/PacketProcessor.cpp:660:16:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:29:33: error: argument 2 null where non-null expected [-Werror=nonnull]
   29 |   return __builtin___memcpy_chk (__dest, __src, __len,
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
   30 |                                  __glibc_objsize0 (__dest));
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:29:33: note: in a call to built-in function ‘void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)’
cc1plus: some warnings being treated as errors
make[2]: *** [CMakeFiles/RBDoom3BFG.dir/build.make:7678: CMakeFiles/RBDoom3BFG.dir/sys/PacketProcessor.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:195: CMakeFiles/RBDoom3BFG.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Kr3m commented 2 weeks ago

With more lax error checking, it will build, but it will not run.

----- Initializing Render Shaders -----
Sys_Error: Couldn't read the binary file for shader renderprogs2/spirv/builtin/gui.vs.bin
RobertBeckebans commented 2 weeks ago

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:

  1. Run in a terminal $ git clone --recursive https://github.com/RobertBeckebans/RBDOOM-3-BFG.git DoomCode
  2. Run cmake-linux-release.sh in DoomCode/neo/
  3. Run make -j<number of your cores> in DoomCode/build/
  4. Copy DoomCode/build/RBDoom3BFG to DoomCode/ or symlink it
  5. Copy the base folder of your Steam\steamapps\common\DOOM 3 BFG Edition over to DoomCode/base/
  6. [OPTIONAL] Download https://www.moddb.com/mods/rbdoom-3-bfg/downloads/rbdoom-3-bfg-130 and unpack it over your DoomCode/ folder and then run git checkout . in DoomCode/ so the local git files are newer for the files that have the same names
  7. Run the engine in DoomCode/
Kr3m commented 2 weeks ago

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:

  1. Run in a terminal $ git clone --recursive https://github.com/RobertBeckebans/RBDOOM-3-BFG.git DoomCode
  2. Run cmake-linux-release.sh in DoomCode/neo/
  3. Run make -j<number of your cores> in DoomCode/build/
  4. Copy DoomCode/build/RBDoom3BFG to DoomCode/ or symlink it
  5. Copy the base folder of your Steam\steamapps\common\DOOM 3 BFG Edition over to DoomCode/base/
  6. [OPTIONAL] Download https://www.moddb.com/mods/rbdoom-3-bfg/downloads/rbdoom-3-bfg-130 and unpack it over your DoomCode/ folder and then run git checkout . in DoomCode/ so the local git files are newer for the files that have the same names
  7. Run the engine in DoomCode/

Only way I can seem to get it to build at all is two comment out these two lines in CMakeLists.txt

#add_definitions(-Werror=format-security)
#add_definitions(-Werror=format)

I'll try it again using your method in combination with this, and see what happens.

Kr3m commented 2 weeks ago

Still having issues even after that build.

Sys_Error: Couldn't find the required shader permutation in the blob, or the blob is corrupted.
Required permutation key: 
USE_GPU_SKINNING=0;
Permutations available in the blob:
USE_GPU_SKINNING=0 
USE_GPU_SKINNING=1 
RobertBeckebans commented 2 weeks ago

Which Linux system are you using?

Kr3m commented 2 weeks ago

Which Linux system are you using?

I'm on Ubuntu 24.04 at the moment.

naggie commented 2 weeks ago

I have the same runtime error, after building master (33b74a7b25542b2a66d69e1c63e69ec9a1986ae8) instead of using 1.5.1 to work around https://github.com/RobertBeckebans/RBDOOM-3-BFG/pull/787 on NixOS 23.11

image

Kr3m commented 1 week ago

I have the same runtime error, after building master (33b74a7) instead of using 1.5.1 to work around #787 on NixOS 23.11

Definitely odd. I remember building this a few years ago with no issues at all. Ran the script, ran make, and was off to the races without using error suppression or anything...

RobertBeckebans commented 1 week ago

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.

RobertBeckebans commented 1 week ago

Here is the link, sorry: https://drive.google.com/file/d/1M0HhGfkK1viQz3HktusFjaqNS8lALxDO/view?usp=drive_link

Kr3m commented 1 week ago

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.

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.

RobertBeckebans commented 1 week ago

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.

naggie commented 1 week ago

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.

RobertBeckebans commented 1 week ago

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

SRSaunders commented 1 week ago

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.

Kr3m commented 8 hours ago

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.