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

Compile error in Ubuntu 22.04 LTS #791

Closed AFFLiCTED1 closed 7 months ago

AFFLiCTED1 commented 11 months ago

I made sure to install all dependencies as outlined in the instructions: sudo apt-get install cmake libsdl2-dev libopenal-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libvulkan-dev

When I try to generate makefiles I get this error:

default_user@GTF0V5:~/_git/RBDOOM-3-BFG-1.5.1/neo$ ./cmake-linux-release.sh
-- The C compiler identification is GNU 11.3.0
-- The CXX compiler identification is GNU 11.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_BUILD_TYPE:Release
-- Performing Test COMPILER_SUPPORTS_CXX17
-- Performing Test COMPILER_SUPPORTS_CXX17 - Success
-- Using module to find Vulkan and components
-- Found Vulkan: /usr/lib/x86_64-linux-gnu/libvulkan.so  
-- Using Vulkan: /usr/lib/x86_64-linux-gnu/libvulkan.so
CMake Error at CMakeLists.txt:426 (add_subdirectory):
  The source directory

    /home/default_user/_git/RBDOOM-3-BFG-1.5.1/neo/extern/nvrhi

  does not contain a CMakeLists.txt file.

CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Cannot find a SPIR-V capable DXC executable.  Please provide a valid path
  through the DXC_SPIRV_EXECUTABLE variable.  (missing: DXC_SPIRV_EXECUTABLE)
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindDXCspirv.cmake:41 (find_package_handle_standard_args)
  CMakeLists.txt:439 (find_package)
SRSaunders commented 10 months ago

Looks like two issues:

  1. The extern/nvrhi directory does not appear to be populated. Did you use the --recursive option when getting the code? If not, you can run the following git commands to fix the issue:
    > git submodule init
    > git submodule update --recursive
  2. You will need to install dxc. You can do this either by: a) manually getting the linux executable from https://github.com/microsoft/DirectXShaderCompiler and setting the DXC_SPIRV_EXECUTABLE cmake path variable, or b) installing the Vulkan SDK from lunarG and setting the VULKAN_SDK env variable to the installation path (which should also include the dxc component).
AFFLiCTED1 commented 10 months ago

I downloaded the "RBDOOM-3-BFG-1.5.1" stable source from the releases page, I didn't clone from GitHub. I'll be honest, I'm not a developer and so the second part of your reply has me scratching my head. I'll have to research how to set env variables. I thank you for the reply, though!

ericwomer commented 7 months ago

Looks like two issues:

  1. The extern/nvrhi directory does not appear to be populated. Did you use the --recursive option when getting the code? If not, you can run the following git commands to fix the issue:
> git submodule init
> git submodule update --recursive
  1. You will need to install dxc. You can do this either by: a) manually getting the linux executable from https://github.com/microsoft/DirectXShaderCompiler and setting the DXC_SPIRV_EXECUTABLE cmake path variable, or b) installing the Vulkan SDK from lunarG and setting the VULKAN_SDK env variable to the installation path (which should also include the dxc component).

You can truncate that down to one line

git submodule update --init --recursive