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.37k stars 244 forks source link

I can't build a project for Ubuntu Arm64 #838

Closed ArtemS2 closed 1 month ago

ArtemS2 commented 4 months ago

artem@artem-desktop:~/builds/RBDOOM-3-BFG/build$ cmake -DCMAKE_BUILD_TYPE=Release -DSDL2=ON -DONATIVE=ON -DUSE_INTRINSICS_SSE=OFF ../neo -- The C compiler identification is GNU 11.4.0 -- The CXX compiler identification is GNU 11.4.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/aarch64-linux-gnu/libvulkan.so
-- Using Vulkan: /usr/lib/aarch64-linux-gnu/libvulkan.so CMake Warning (dev) at extern/nvrhi/CMakeLists.txt:33 (option): Policy CMP0077 is not set: option() honors normal variables. Run "cmake --help-policy CMP0077" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

For compatibility with older versions of CMake, option is clearing the normal variable 'NVRHI_INSTALL'. This warning is for project developers. Use -Wno-dev to suppress it.

-- cxxopts version 2.2.0 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:454 (find_package)

-- Configuring incomplete, errors occurred! See also "/home/artem/builds/RBDOOM-3-BFG/build/CMakeFiles/CMakeOutput.log".

ArtemS2 commented 4 months ago

CMakeOutput.log

SRSaunders commented 4 months ago

You will need to download and install DXC. See the README Compiling on Linux Step 1.

https://github.com/RobertBeckebans/RBDOOM-3-BFG#compiling-on-linux-

Given you are running on Arm64, you may need to build DXC yourself - I'm not sure if there is a pre-built binary for Linux/Arm64.

There is one other option if available: check your distro for availability of package "directx-shader-compiler" or "DirectXShaderCompiler". If present you can install it the same as any other package and it will satisfy the dependency for building RBDoom3BFG.

ArtemS2 commented 2 months ago

@SRSaunders Please tell me, can I roll back the commits and build a project without shaders from Microsoft?

SRSaunders commented 2 months ago

Yes, you can use https://github.com/RobertBeckebans/RBDOOM-3-BFG/releases/tag/v1.4.0 instead. This older version is based on OpenGL (with some Vulkan support).

However, if you want to use the current master, you can try building DXC yourself using:

> git clone https://github.com/microsoft/DirectXShaderCompiler.git
> cd DirectXShaderCompiler/
> git submodule init; git submodule update
> mkdir build; cd build
> cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -C ../cmake/caches/PredefinedParams.cmake
> ninja
> cd bin
> ./dxc --version

Then put the dxc binary in your path and build RBDoom3BFG with Robert's instructions. It should work on Linux/Arm64 since it compiles and runs successfully on Apple Silicon (also arm64).

ArtemS2 commented 2 months ago

Thank you, thanks to you I was able to move forward. Unfortunately, I encountered the following errors during assembly: BUILDRB.log

ArtemS2 commented 2 months ago

RBDOOM-3-BFG v1.4.0 assembled successfully

SRSaunders commented 2 months ago

dxc failed : error code 0x80004005.

I think this is a general file access error. Do you have recursive read permission at .../RBDOOM-3-BFG/neo/shaders as well as recursive write permission at .../RBDOOM-3-BFG/base/renderprogs2/spirv ?