-
-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Linux] Clang build issues #289
Comments
Will be fixed with #282 merge. |
Hi. I created branch, based on #282 and fixed building with clang: |
Hmm, wonder, why is this still open, or do I have to write that i've successfully built it on my 18.04 and it runs just fine (I mean, it lags, but the same goes for Windows, so it's laptop trouble) |
I've just followed instructions in wiki, but had to edit files as mentioned here, built from latest commit in xd_dev. Everything is fine, but intro video is just green screen with sound, and menu background sometimes glitches into green as well |
What version of clang used? I just checked on clang-6 from ubuntu 18.04 - the problem remained. |
Sorry for not answering for so long. Checked my apt list, lookls like i have both 5.0 and 6.0 installed. I could try to send my game dir here in .zip, if required, but if i remember correctly, i built it with such arguments:
and then:
(i have
After that i found the issue i mentioned and did this:
And then it started working |
Fatal error while building at Linux Ubuntu 18.04
CLang ver 6.0 used
There's console output:
$ CC=clang-6.0 CXX=clang++-6.0 CFLAGS="-march=native" CXXFLAGS="-march=native" cmake ..
-- The C compiler identification is Clang 6.0.0
-- The CXX compiler identification is Clang 6.0.0
-- Check for working C compiler: /usr/bin/clang-6.0
-- Check for working C compiler: /usr/bin/clang-6.0 -- 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/clang++-6.0
-- Check for working CXX compiler: /usr/bin/clang++-6.0 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- cotire 1.8.0 loaded.
CMake build Release, CFLAGS=-march=native, CXXFLAGS=-march=native -fpermissive --std=c++17 -Wno-attributes -pipe -Wl,--no-undefined -fvisibility=hidden
-- Found GLEW: /usr/include
-- Found FreeImage: /usr/include, /usr/lib/x86_64-linux-gnu/libfreeimage.so
-- Found LockFile: /usr/include, /usr/lib/x86_64-linux-gnu/liblockfile.so
-- Found OpenAL: /usr/lib/x86_64-linux-gnu/libopenal.so
-- Found Crypto++: /usr/include/crypto++, /usr/lib/x86_64-linux-gnu/libcryptopp.so
-- Found PugiXML: /usr/lib/x86_64-linux-gnu/libpugixml.so
-- PugiXML include = /usr/include
-- PugiXML library = /usr/lib/x86_64-linux-gnu/libpugixml.so
-- theora found: includes in /usr/include, library in /usr/lib/x86_64-linux-gnu/libtheora.so;/usr/lib/x86_64-linux-gnu/libogg.so;/usr/lib/x86_64-linux-gnu/libvorbis.so
-- Found Ogg: /usr/lib/x86_64-linux-gnu/libogg.so
-- Found SDL: /usr/lib/x86_64-linux-gnu/libSDL2.so (found version "2.0.8")
-- Found LZO: /usr/lib/x86_64-linux-gnu/liblzo2.so
-- Found JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so
-- Found Intel TBB, includes /usr/include, /usr/lib/x86_64-linux-gnu/libtbb.so;/usr/lib/x86_64-linux-gnu/libtbbmalloc.so;/usr/lib/x86_64-linux-gnu/libtbbmalloc_proxy.so
-- The ASM compiler identification is Clang
-- Found assembler: /usr/bin/clang-6.0
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Found readline: /usr/lib/x86_64-linux-gnu/libreadline.so
-- Found Curses: /usr/lib/x86_64-linux-gnu/libcurses.so
DASM_FLAGS: -D FPU -D HFABI -D P64 -D JIT -D FFI -D SSE2 -D VER=
DASM_ARCH: x86
Build shared lib
adding ./src/GameSpy to GameSpy
adding ./src/GameSpy/common to GameSpy
adding ./src/GameSpy/gcdkey to GameSpy
adding ./src/GameSpy/ghttp to GameSpy
adding ./src/GameSpy/GP to GameSpy
adding ./src/GameSpy/gstats to GameSpy
adding ./src/GameSpy/gt2 to GameSpy
adding ./src/GameSpy/natneg to GameSpy
adding ./src/GameSpy/pt to GameSpy
adding ./src/GameSpy/qr2 to GameSpy
adding ./src/GameSpy/sake to GameSpy
adding ./src/GameSpy/sc to GameSpy
adding ./src/GameSpy/serverbrowsing to GameSpy
adding ./src/GameSpy/webservices to GameSpy
adding . to OPCODE
adding ode/src to ODE
adding include/ode to ODE
adding contrib/msvc7/ode_default to ODE
adding . to xrLCUtil
-- CXX target xrLCUtil cotired.
adding src to xrQSlim
adding . to xrMiscMath
-- CXX target xrMiscMath cotired.
adding . to xrRender_GL
adding ../xrRender to xrRender_GL
adding ../xrRender/blenders to xrRender_GL
adding ../xrRenderGL to xrRender_GL
adding ../xrRenderGL/MSAA to xrRender_GL
adding ../xrRenderGL/GL Rain to xrRender_GL
adding ../../Include/xrRender to xrRender_GL
-- CXX target xrRender_GL cotired.
adding . to xr_3da
adding . to xrAICore
adding Components to xrAICore
adding Navigation to xrAICore
adding Navigation/PatrolPath to xrAICore
adding Navigation/PathManagers to xrAICore
-- CXX target xrAICore cotired.
path /home/lonesimba/Desktop/stalker/xray-16/src/xrUICore
adding . to xrCDB
-- CXX target xrCDB cotired.
adding . to xrCore
adding Animation to xrCore
adding Compression to xrCore
adding Containers to xrCore
adding Crypto to xrCore
adding Math to xrCore
adding Media to xrCore
adding PostProcess to xrCore
adding Text to xrCore
adding Threading to xrCore
adding XML to xrCore
adding ../xrCommon to xrCore
commit: cf1329d
branch: xd_dev
-- CXX target xrCore cotired.
adding . to xrEngine
adding StringTable to xrEngine
-- CXX target xrEngine cotired.
adding . to xrGame
adding ai to xrGame
adding ai/crow to xrGame
adding ai/monsters to xrGame
adding ai/monsters/basemonster to xrGame
adding ai/monsters/bloodsucker to xrGame
adding ai/monsters/boar to xrGame
adding ai/monsters/burer to xrGame
adding ai/monsters/cat to xrGame
adding ai/monsters/chimera to xrGame
adding ai/monsters/controller to xrGame
adding ai/monsters/dog to xrGame
adding ai/monsters/flesh to xrGame
adding ai/monsters/fracture to xrGame
adding ai/monsters/group_states to xrGame
adding ai/monsters/poltergeist to xrGame
adding ai/monsters/pseudodog to xrGame
adding ai/monsters/pseudogigant to xrGame
adding ai/monsters/rats to xrGame
adding ai/monsters/snork to xrGame
adding ai/monsters/states to xrGame
adding ai/monsters/tushkano to xrGame
adding ai/monsters/zombie to xrGame
adding ai/phantom to xrGame
adding ai/stalker to xrGame
adding ai/trader to xrGame
adding CdkeyDecode to xrGame
adding ik to xrGame
adding ui to xrGame
adding gamespy to xrGame
adding ../xrServerEntities to xrGame
-- C CXX target xrGame cotired.
adding . to xrGameSpy
-- CXX target xrGameSpy cotired.
adding . to xrNetServer
adding empty to xrNetServer
-- CXX target xrNetServer cotired.
adding . to xrParticles
-- CXX target xrParticles cotired.
adding . to xrPhysics
adding tri-colliderknoopc to xrPhysics
adding dcylinder to xrPhysics
-- CXX target xrPhysics cotired.
adding . to xrScriptEngine
adding LuaStudio to xrScriptEngine
-- CXX target xrScriptEngine cotired.
adding . to xrSound
-- CXX target xrSound cotired.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/lonesimba/Desktop/stalker/xray-16/bin
$ make -j2
Scanning dependencies of target minilua
Scanning dependencies of target cximage
[ 1%] Building C object Externals/CMakeFiles/minilua.dir/LuaJIT/src/host/minilua.c.o
[ 2%] Building CXX object Externals/cximage/CMakeFiles/cximage.dir/ximacfg.cpp.o
clang: warning: -Wl,--no-undefined: 'linker' input unused [-Wunused-command-line-argument]
In file included from /home/lonesimba/Desktop/stalker/xray-16/Externals/cximage/ximacfg.cpp:1:
In file included from /home/lonesimba/Desktop/stalker/xray-16/Externals/cximage/ximacfg.h:7:
In file included from /home/lonesimba/Desktop/stalker/xray-16/Externals/cximage/../../src/Common/Common.hpp:4:
In file included from /home/lonesimba/Desktop/stalker/xray-16/Externals/cximage/../../src/Common/Platform.hpp:22:
/home/lonesimba/Desktop/stalker/xray-16/Externals/cximage/../../src/Common/PlatformLinux.inl:88:9: error:
void function '_splitpath' should not return a value [-Wreturn-type]
return EINVAL;
^ ~~~~~~
1 error generated.
Externals/cximage/CMakeFiles/cximage.dir/build.make:62: recipe for target 'Externals/cximage/CMakeFiles/cximage.dir/ximacfg.cpp.o' failed
make[2]: *** [Externals/cximage/CMakeFiles/cximage.dir/ximacfg.cpp.o] Error 1
CMakeFiles/Makefile2:305: recipe for target 'Externals/cximage/CMakeFiles/cximage.dir/all' failed
make[1]: *** [Externals/cximage/CMakeFiles/cximage.dir/all] Error 2
make[1]: *** Ожидание завершения заданий…
[ 2%] Linking C executable minilua
[ 2%] Built target minilua
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
The text was updated successfully, but these errors were encountered: