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 on Pi4 Fails with unknown CPU #547

Closed 2play closed 1 year ago

2play commented 3 years ago

hi to all,

I tried to compile with both Vulkan scripts and below

git clone --recursive https://github.com/RobertBeckebans/RBDOOM-3-BFG.git
cd RBDOOM-3-BFG && mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DSDL2=ON -DONATIVE=ON -DFFMPEG=OFF -DBINKDEC=ON -DUSE_INTRINSICS=OFF ../neo

or cmake -DCMAKE_BUILD_TYPE=Release -DSDL2=ON -DONATIVE=ON -DFFMPEG=OFF -DUSE_VULKAN=ON -DSPIRV_SHADERC=OFF -DBINKDE-DUSE_INTRINSICS=OFF ../neo

Any comments on how to compile on Pi4 Raspi OS Debian Buster?

coldtobi commented 3 years ago

Any comments on how to compile on Pi4 Raspi OS Debian Buster?

why aren't you just do apt install rbdoom3bfg?

you can try apt source --build rbdoom3bfg as well, if you insist compilng it yourself…

2play commented 3 years ago

@coldtobi does first includes vulkan flag?

coldtobi commented 3 years ago

no, I'm not building the package for Vulkan yet. (sorry, didnt relaize you want vulkan)

I've planned to look into Vulkan for the Debian Bookworm cycle. (However I'm not sure how stable Vulkan support is now…)

(If you managed to make compile it, please let me know with details)

2play commented 3 years ago

thank you @coldtobi very kind of you sharing friend! i will. i just wanted to test wtih Vulkan on my base. but def ill look in to above. prob is with or without vulkan i get cpu unknown on my pi4

PS How do you compile the non vulkan your side? anything diff from above? (1st post)

r-a-sattarov commented 3 years ago

Any comments on how to compile on Pi4 Raspi OS Debian Buster?

Try adding the architecture name of your processor to this line:

This will fix the "unknown CPU" error.

2play commented 3 years ago

Any comments on how to compile on Pi4 Raspi OS Debian Buster?

Try adding the architecture name of your processor to this line:

This will fix the "unknown CPU" error.

I think it makes sense as i can see aarch32 isnt there.

coldtobi commented 3 years ago

thank you @coldtobi very kind of you sharing friend! i will. i just wanted to test wtih Vulkan on my base. but def ill look in to above. prob is with or without vulkan i get cpu unknown on my pi4

The Pi4 can operate in 32bit mode (armhf) and 64bit mode (arm64). For which are you trying to compile? (However, the Debian buildds bilds rbdoom3bfg build for armhf and arm64 fine, so it might be a CPU misdetection)

PS How do you compile the non vulkan your side? anything diff from above? (1st post)

Its automated for the Debian package generation: https://salsa.debian.org/games-team/rbdoom3bfg/-/blob/master/debian/rules has the parameters I pass to cmake.

To try using the packaging, try

apt-get source rbdoom3bfg 
sudo apt install build-essential dpkg-dev
sudo apt build-dep rbdoom3bfg
cd rbdoom3bfg-*
dpkg-buildpackage -uc -us -b

and if that suceeds (it should!) take that as starting point (you can also edit debian/rules for additional cmake flags)

Edit: Especially note that I pass "-DCPU_TYPE=$(DEB_BUILD_ARCH_CPU) " -- possibly that is the bit you need. dpkg-architecture should give you the value you need.

2play commented 3 years ago

I tried something this morning wiht the DCPU_TYPE but i guess wasnt correct. i not on arm64 rpios so i thought that might be the prob. I ll check what you wrote on last lines

2play commented 3 years ago

UPDATE: cmake -DCMAKE_BUILD_TYPE=Release -DSDL2=ON -DONATIVE=ON -DFFMPEG=OFF -DUSE_VULKAN=ON -DSPIRV_SHADERC=OFF -DBINKDE-DUSE_INTRINSICS=OFF -DCPU_TYPE="arm" ../neo @coldtobi this -DCPU_TYPE="arm" eliminates the cpu unknown error. tx for the right direction

now it fails at ...

cmake -DCMAKE_BUILD_TYPE=Release -DSDL2=ON -DONATIVE=ON -DFFMPEG=OFF -DSPIRV_SHADERC=OFF -DBINKDE-DUSE_INTRINSICS=OFF -DCPU_TYPE="arm" ../neo
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_BUILD_TYPE:Release
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
CMake Warning (dev) at idlib/CMakeLists.txt:127 (GET_DIRECTORY_PROPERTY):
  Policy CMP0059 is not set: Do not treat DEFINITIONS as a built-in directory
  property.  Run "cmake --help-policy CMP0059" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found OpenGL: /usr/lib/arm-linux-gnueabihf/libGL.so
-- Found OpenAL: /usr/lib/arm-linux-gnueabihf/libopenal.so
CMake Warning (dev) at CMakeLists.txt:1752 (GET_DIRECTORY_PROPERTY):
  Policy CMP0059 is not set: Do not treat DEFINITIONS as a built-in directory
  property.  Run "cmake --help-policy CMP0059" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    BINKDE-DUSE_INTRINSICS

-- Build files have been written to: /home/pi/code/RBDOOM-3-BFG/build
pi@playbox:~/code/RBDOOM-3-BFG/build $ make -j4
Scanning dependencies of target precomp_header_idlib
[  0%] Creating idlib/precompiled.h.gch for idlib
In file included from precompiled.h:37:
sys/sys_intrinsics.h:33:11: fatal error: emmintrin.h: No such file or directory
  #include <emmintrin.h>
           ^~~~~~~~~~~~~
compilation terminated.
make[2]: *** [idlib/CMakeFiles/precomp_header_idlib.dir/build.make:58: idlib/CMakeFiles/precomp_header_idlib] Error 1
make[1]: *** [CMakeFiles/Makefile2:184: idlib/CMakeFiles/precomp_header_idlib.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
r-a-sattarov commented 3 years ago

-DBINKDE-DUSE_INTRINSICS=OFF

-DBINKDEC=ON -DUSE_INTRINSICS=OFF

2play commented 3 years ago

If i edit the cmake-linux-vulkan-release.sh to have the cpu type

rm -rf build
mkdir build
cd build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DSDL2=ON -DUSE_VULKAN=ON -DSPIRV_SHADERC=OFF -DCPU_TYPE="arm" ../neo```

cmake

-- The C compiler identification is GNU 8.3.0 -- The CXX compiler identification is GNU 8.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- CMAKE_BUILD_TYPE:Release -- Performing Test COMPILER_SUPPORTS_CXX11 -- Performing Test COMPILER_SUPPORTS_CXX11 - Success CMake Warning (dev) at CMakeLists.txt:325 (set): implicitly converting '' to 'STRING' type. Call Stack (most recent call first): CMakeLists.txt:346 (SET_OPTION) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:325 (set): implicitly converting '' to 'STRING' type. Call Stack (most recent call first): CMakeLists.txt:347 (SET_OPTION) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:325 (set): implicitly converting '' to 'STRING' type. Call Stack (most recent call first): CMakeLists.txt:348 (SET_OPTION) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:325 (set): implicitly converting '' to 'STRING' type. Call Stack (most recent call first): CMakeLists.txt:349 (SET_OPTION) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:325 (set): implicitly converting '' to 'STRING' type. Call Stack (most recent call first): CMakeLists.txt:350 (SET_OPTION) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:325 (set): implicitly converting '' to 'STRING' type. Call Stack (most recent call first): CMakeLists.txt:353 (SET_OPTION) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:325 (set): implicitly converting '' to 'STRING' type. Call Stack (most recent call first): CMakeLists.txt:354 (SET_OPTION) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:325 (set): implicitly converting '' to 'STRING' type. Call Stack (most recent call first): CMakeLists.txt:355 (SET_OPTION) This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:325 (set): implicitly converting '' to 'STRING' type. Call Stack (most recent call first): CMakeLists.txt:356 (SET_OPTION) This warning is for project developers. Use -Wno-dev to suppress it.

-- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Check if compiler accepts -pthread -- Check if compiler accepts -pthread - yes -- Found Threads: TRUE -- Using module to find Vulkan -- Found Vulkan: /usr/lib/arm-linux-gnueabihf/libvulkan.so -- /usr/lib/arm-linux-gnueabihf/libvulkan.so -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29") -- Found X11_XCB: /usr/lib/arm-linux-gnueabihf/libX11-xcb.so CMake Warning (dev) at idlib/CMakeLists.txt:127 (GET_DIRECTORY_PROPERTY): Policy CMP0059 is not set: Do not treat DEFINITIONS as a built-in directory property. Run "cmake --help-policy CMP0059" for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it.

-- Found OpenGL: /usr/lib/arm-linux-gnueabihf/libGL.so -- Checking for module 'libavcodec' -- Found libavcodec, version 58.90.100 -- Checking for module 'libavformat' -- Found libavformat, version 58.44.100 -- Checking for module 'libavutil' -- Found libavutil, version 56.49.100 -- Checking for module 'libswscale' -- Found libswscale, version 5.6.101 -- Found FFMPEG or Libav: /usr/local/lib/libavcodec.so;/usr/local/lib/libavformat.so;/usr/local/lib/libavutil.so;/usr/local/lib/libswscale.so, /usr/local/include -- Found OpenAL: /usr/lib/arm-linux-gnueabihf/libopenal.so CMake Warning (dev) at CMakeLists.txt:1752 (GET_DIRECTORY_PROPERTY): Policy CMP0059 is not set: Do not treat DEFINITIONS as a built-in directory property. Run "cmake --help-policy CMP0059" for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring done -- Generating done -- Build files have been written to: /home/pi/code/RBDOOM-3-BFG/build```

gets a little further

make -j4
Scanning dependencies of target precomp_header_idlib
Scanning dependencies of target OGLCompiler
Scanning dependencies of target OSDependent
Scanning dependencies of target SPVRemapper
[  0%] Creating idlib/precompiled.h.gch for idlib
[  0%] Building CXX object extern/glslang/glslang/OSDependent/Unix/CMakeFiles/OSDependent.dir/ossource.cpp.o
[  0%] Building CXX object extern/glslang/OGLCompilersDLL/CMakeFiles/OGLCompiler.dir/InitializeDll.cpp.o
[  0%] Building CXX object extern/glslang/SPIRV/CMakeFiles/SPVRemapper.dir/SPVRemapper.cpp.o
In file included from precompiled.h:37:
sys/sys_intrinsics.h:33:11: fatal error: emmintrin.h: No such file or directory
  #include <emmintrin.h>
           ^~~~~~~~~~~~~
compilation terminated.
make[2]: *** [idlib/CMakeFiles/precomp_header_idlib.dir/build.make:58: idlib/CMakeFiles/precomp_header_idlib] Error 1
make[1]: *** [CMakeFiles/Makefile2:429: idlib/CMakeFiles/precomp_header_idlib.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  0%] Linking CXX static library libOSDependent.a
[  0%] Building CXX object extern/glslang/SPIRV/CMakeFiles/SPVRemapper.dir/doc.cpp.o
[  0%] Built target OSDependent
[  0%] Linking CXX static library libOGLCompiler.a
[  0%] Built target OGLCompiler
In file included from /usr/include/c++/8/vector:69,
                 from /home/pi/code/RBDOOM-3-BFG/neo/extern/glslang/SPIRV/SPVRemapper.h:40,
                 from /home/pi/code/RBDOOM-3-BFG/neo/extern/glslang/SPIRV/SPVRemapper.cpp:36:
/usr/include/c++/8/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_fill_insert(std::vector<_Tp, _Alloc>::iterator, std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = long long unsigned int; _Alloc = std::allocator<long long unsigned int>]’:
/usr/include/c++/8/bits/vector.tcc:478:5: note: parameter passing for argument of type ‘std::vector<long long unsigned int>::iterator’ {aka ‘__gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >’} changed in GCC 7.1
     vector<_Tp, _Alloc>::
     ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/vector:64,
                 from /home/pi/code/RBDOOM-3-BFG/neo/extern/glslang/SPIRV/SPVRemapper.h:40,
                 from /home/pi/code/RBDOOM-3-BFG/neo/extern/glslang/SPIRV/SPVRemapper.cpp:36:
/usr/include/c++/8/bits/stl_vector.h: In member function ‘spv::Id spv::spirvbin_t::localId(spv::Id, spv::Id)’:
/usr/include/c++/8/bits/stl_vector.h:847:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<long long unsigned int*, std::vector<long long unsigned int> >’ changed in GCC 7.1
    _M_fill_insert(end(), __new_size - size(), __x);
    ^~~~~~~~~~~~~~
[  0%] Linking CXX static library libSPVRemapper.a
[  0%] Built target SPVRemapper
make: *** [Makefile:84: all] Error 2
r-a-sattarov commented 3 years ago

Why do you want to use Intel Intrinsics on an architecture that does not support it?

2play commented 3 years ago

Why do you want to use Intel Intrinsics on an architecture that does not support it?

i dont want it. i was playing with default sh files. As per my posts above i want it OFF

2play commented 3 years ago

UPDATE: @r-a-sattarov Thank you! It seems going now 7%. Thank you both gents. ill revert if all go well!

cmake -DCMAKE_BUILD_TYPE=Release -DSDL2=ON -DONATIVE=ON -DFFMPEG=OFF -DUSE_VULKAN=ON -DSPIRV_SHADERC=OFF -DBINKDEC=ON -DUSE_INTRINSICS=OFF -DCPU_TYPE="arm" ../neo

2play commented 3 years ago

RESULT @r-a-sattarov Very close...

[ 98%] Building CXX object CMakeFiles/RBDoom3BFG.dir/renderer/Vulkan/RenderDebug_VK.cpp.o cc1plus: warning: /home/pi/code/RBDOOM-3-BFG/neo/idlib/precompiled.h.gch: not used because CPUSTRING' defined as "arm"' not ` arm' [-Winvalid-pch] cc1plus: some warnings being treated as errors make[2]: [CMakeFiles/RBDoom3BFG.dir/build.make:7018: CMakeFiles/RBDoom3BFG.dir/renderer/Vulkan/Allocator_VK.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... make[1]: [CMakeFiles/Makefile2:210: CMakeFiles/RBDoom3BFG.dir/all] Error 2 make: [Makefile:84: all] Error 2

2play commented 3 years ago

@r-a-sattarov I removed the -DCPU_TYPE= in total and added below to the sys_defines.h file

`#elif defined(arm) || defined(ARM) || defined(armv7l)

define CPUSTRING "armv7l"`

Also fixed the unknown CPU error but also failed at 98% differently. Plus all the warning about `_REENTRANT' is defined [-Winvalid-pch]


[ 98%] Building CXX object CMakeFiles/RBDoom3BFG.dir/renderer/Vulkan/Image_VK.cpp.o cc1plus: warning: /home/pi/code/RBDOOM-3-BFG/neo/idlib/precompiled.h.gch: not used because _REENTRANT' is defined [-Winvalid-pch] /home/pi/code/RBDOOM-3-BFG/neo/renderer/Vulkan/Allocator_VK.cpp: In member function ‘void idVulkanBlock::Print()’: /home/pi/code/RBDOOM-3-BFG/neo/renderer/Vulkan/Allocator_VK.cpp:498:17: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘VkDeviceSize’ {aka ‘long long unsigned int’} [-Werror=format=] idLib::Printf( "Size: %lu\n", size ); ^~~~~~~~~~~~~~~~~~~ ~~~~ /home/pi/code/RBDOOM-3-BFG/neo/renderer/Vulkan/Allocator_VK.cpp:499:17: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘VkDeviceSize’ {aka ‘long long unsigned int’} [-Werror=format=] idLib::Printf( "Allocated: %lu\n", allocated ); ^~~~~~~~~~~~~~~~~~~ ~~~~~~~~~ /home/pi/code/RBDOOM-3-BFG/neo/renderer/Vulkan/Allocator_VK.cpp:508:18: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘VkDeviceSize’ {aka ‘long long unsigned int’} [-Werror=format=] idLib::Printf( "\tSize: %lu\n", current->size ); ^~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~ [ 98%] Building CXX object CMakeFiles/RBDoom3BFG.dir/renderer/Vulkan/RenderBackend_VK.cpp.o /home/pi/code/RBDOOM-3-BFG/neo/renderer/Vulkan/Allocator_VK.cpp:509:18: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘VkDeviceSize’ {aka ‘long long unsigned int’} [-Werror=format=] idLib::Printf( "\tOffset: %lu\n", current->offset ); ^~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ /home/pi/code/RBDOOM-3-BFG/neo/renderer/Vulkan/Allocator_VK.cpp: In member function ‘void idVulkanAllocator::Print()’: /home/pi/code/RBDOOM-3-BFG/neo/renderer/Vulkan/Allocator_VK.cpp:682:17: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘VkDeviceSize’ {aka ‘long long unsigned int’} [-Werror=format=] idLib::Printf( "Buffer Granularity: %lu\n", bufferImageGranularity ); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~ /home/pi/code/RBDOOM-3-BFG/neo/renderer/Vulkan/Allocator_VK.cpp: In function ‘void Vulkan_PrintHeapInfo_f(const idCmdArgs&)’: /home/pi/code/RBDOOM-3-BFG/neo/renderer/Vulkan/Allocator_VK.cpp:705:18: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘VkDeviceSize’ {aka ‘long long unsigned int’} [-Werror=format=] idLib::Printf( "id=%d, size=%lu, flags=", i, heap.size ); ^~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~ cc1plus: warning: /home/pi/code/RBDOOM-3-BFG/neo/idlib/precompiled.h.gch: not used because_REENTRANT' is defined [-Winvalid-pch] cc1plus: some warnings being treated as errors make[2]: [CMakeFiles/RBDoom3BFG.dir/build.make:7018: CMakeFiles/RBDoom3BFG.dir/renderer/Vulkan/Allocator_VK.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... make[1]: [CMakeFiles/Makefile2:210: CMakeFiles/RBDoom3BFG.dir/all] Error 2 make: [Makefile:84: all] Error 2

coldtobi commented 3 years ago

@r-a-sattarov I removed the -DCPU_TYPE= in total and added below to the sys_defines.h file

#elif defined(__arm__) || defined(__ARM__) || defined(__armv7l__) #define CPUSTRING "armv7l"

you should only set CPUSTRING to "arm". ARM comes in so many flavours, so armv7l will be wrong most of the time…

Also fixed the unknown CPU error but also failed at 98% differently. Plus all the warning about `_REENTRANT' is defined [-Winvalid-pch].

My bikeshed color is to compile without pch: My 1st reason for that is that pchs are incompatible with ccache, and during packaging of the Debian package I compile a lot usually. ccache speeds up the process enormoumsly. (The compiler actually tries to tell you that it cant use the precompiled headers; pchs are not benefitial, at least here, at least on gcc when using threads -- as rbdoom3bfg does.)

[ 98%] Building CXX object CMakeFiles/RBDoom3BFG.dir/renderer/Vulkan/Image_VK.cpp.o cc1plus: warning: /home/pi/code/RBDOOM-3-BFG/neo/idlib/precompiled.h.gch: not used because `_REENTRANT' is defined [-Winvalid-pch] /home/pi/code/RBDOOM-3-BFG/neo/renderer/Vulkan/Allocator_VK.cpp: In member function ‘void idVulkanBlock::Print()’: /home/pi/code/RBDOOM-3-BFG/neo/renderer/Vulkan/Allocator_VK.cpp:498:17: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘VkDeviceSize’ {aka ‘long long unsigned int’}

But the error you see is not related to pch. gcc bails out because the "%lu" needs to be replaced with "%llu" (untested) (gcc is instructed to do so because of -Werror=format

2play commented 3 years ago

you should only set CPUSTRING to "arm". ARM comes in so many flavours, so armv7l will be wrong most of the time…

Tried and also fails at 98%

elif defined(arm)

        #define CPUSTRING                       "arm"

My bikeshed color is to compile without pch: My 1st reason for that is that pchs are incompatible with ccache, and during packaging of the Debian package I compile a lot usually. ccache speeds up the process enormoumsly. (The compiler actually tries to tell you that it cant use the precompiled headers; pchs are not benefitial, at least here, at least on gcc when using threads -- as rbdoom3bfg does.)

[ 98%] Building CXX object CMakeFiles/RBDoom3BFG.dir/renderer/Vulkan/Image_VK.cpp.o cc1plus: warning: /home/pi/code/RBDOOM-3-BFG/neo/idlib/precompiled.h.gch: not used because `_REENTRANT' is defined [-Winvalid-pch] /home/pi/code/RBDOOM-3-BFG/neo/renderer/Vulkan/Allocator_VK.cpp: In member function ‘void idVulkanBlock::Print()’: /home/pi/code/RBDOOM-3-BFG/neo/renderer/Vulkan/Allocator_VK.cpp:498:17: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘VkDeviceSize’ {aka ‘long long unsigned int’}

But the error you see is not related to pch. gcc bails out because the "%lu" needs to be replaced with "%llu" (untested) (gcc is instructed to do so because of -Werror=format

Anyone wants to have a look i exported all full process in file compile.txt

coldtobi commented 3 years ago

Probably you missed this part of my message:

But the error you see is not related to pch. gcc bails out because the "%lu" needs to be replaced with "%llu" (untested) (gcc is instructed to do so because of -Werror=format

In your compile.txt I see more of those format errors that needs fixing as well...