Closed randalero closed 7 months ago
Do you have all dependencies needed to build openxray installed? It should be: Build-Depends: cmake, build-essential, libglew-dev, libegl1-mesa-dev, libgles2-mesa-dev, libopenal-dev, libcrypto++-dev, libfreeimage-dev, libfreeimageplus-dev, libogg-dev, libtheora-dev, libvorbis-dev, liblzo2-dev, libjpeg-dev, libncurses5-dev, gcc-10, libpcre3-dev, libsdl2-dev, g++-10, debhelper,
Make sure you are using installed compiler: -DCMAKE_C_COMPILER=gcc-10 \ -DCMAKE_CXX_COMPILER=g++-10 \
It should be better if you tried to compile deb package, it have all needed configurations(or borrow them if you prefer to do it yourself)
@sobkas, this is correct, this issue is reproducible on our AppVeyor. For some reason, GCC-10 doesn't want to compile that code, while GCC-11 does compile it.
Собирается без ошибок на clang-13.0.1, но в итоге получается хлам. Нужен как минимум gcc-10.3.1
I'm using gcc 10.5.0-2 and see no problems with compiling it.
CC=gcc-9 CXX=g++-9 cmake -DCMAKE_C_COMPILER=gcc-9 -DCMAKE_CXX_COMPILER=g++-9 -G "Unix Makefiles" -DMEMORY_ALLOCATOR=standard -DCMAKE_BUILD_TYPE=Release -H. -Bbin
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc-9 - 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/g++-9 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_SYSTEM_PROCESSOR: x86_64
-- MASTER_GOLD: ON
-- STATIC_BUILD: ON
-- USE_ADDRESS_SANITIZER: OFF
-- Performing Test GOLD_LINKER_AVAILABLE
-- Performing Test GOLD_LINKER_AVAILABLE - Success
-- Performing Test LLD_LINKER_AVAILABLE
-- Performing Test LLD_LINKER_AVAILABLE - Success
CMake build Release, CFLAGS= -mfpmath=sse -msse3, CXXFLAGS= -Wno-attributes -Wl,--no-undefined -mfpmath=sse -msse3
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
-- Found GLEW: /usr/include (found version "2.1.0")
-- Found OpenAL: /usr/lib/x86_64-linux-gnu/libopenal.so
-- Found JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (found version "62")
-- Found Ogg: /usr/lib/x86_64-linux-gnu/libogg.so
-- Found Vorbis: /usr/lib/x86_64-linux-gnu/libvorbis.so
-- Found Theora: /usr/lib/x86_64-linux-gnu/libtheora.so
-- Found LZO: /usr/lib/x86_64-linux-gnu/liblzo2.so
-- Could NOT find mimalloc (missing: mimalloc_DIR)
Using standard memory allocator
git commit: c8cb6d38a0230733076099c18f4dc179ed5df4c8
git branch: dev
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/gcc-9
rm -f luajit libluajit.a libluajit.so host/minilua host/buildvm lj_vm.S lj_bcdef.h lj_ffdef.h lj_libdef.h lj_recdef.h lj_folddef.h host/buildvm_arch.h jit/vmdef.lua *.o host/*.o *.obj *.lib *.exp *.dll *.exe *.manifest *.pdb *.ilk
-- Configuring done
-- Generating done
-- Build files have been written to: /home/wrt/Documents/test/g/xray-16/bin
cmake --build bin -j4
Scanning dependencies of target xrMiscMath
Scanning dependencies of target buildvm_arch
Scanning dependencies of target cximage
Scanning dependencies of target GameSpy-oxr
[ 0%] Generating HostBuildTools/minilua/minilua
[ 0%] Building CXX object src/utils/xrMiscMath/CMakeFiles/xrMiscMath.dir/cmake_pch.hxx.gch
-- The C compiler identification is GNU 10.2.1
[ 0%] Building CXX object Externals/cximage/CMakeFiles/cximage.dir/ximacfg.cpp.o
-- The CXX compiler identification is GNU 10.2.1
-- 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
-- Configuring done
-- Generating done
-- Build files have been written to: /home/wrt/Documents/test/g/xray-16/bin/Externals/LuaJIT-proj/HostBuildTools/minilua
gmake[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
Scanning dependencies of target minilua
[ 50%] Building C object CMakeFiles/minilua.dir/home/wrt/Documents/test/g/xray-16/Externals/LuaJIT/src/host/minilua.c.o
На втором этапе уже неважно какую версию компилятора использовать? Сначала gcc-9.3.0 потом gcc-10.2.1
Должно было быть починено в марте 2023, закрываю. Можно открыть заново или создать новую Issue, если проблема сохраняется.
gcc (Debian 10.2.1-6) 10.2.1 20210110 g++ (Debian 10.2.1-6) 10.2.1 20210110 cmake version 3.18.4 GNU Make 4.3 GLEW 2.1.0