Skip to content
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

Debian 7 building error #1322

Closed
IsaacMvmv opened this issue Apr 1, 2023 · 11 comments
Closed

Debian 7 building error #1322

IsaacMvmv opened this issue Apr 1, 2023 · 11 comments

Comments

@IsaacMvmv
Copy link

[283/564] Compiling engine/common/sequence.c
../engine/client/cl_main.c: In function 'CL_ReadNetMessage':
../engine/client/cl_main.c:2252:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
cc1: some warnings being treated as errors

../engine/client/cl_parse.c: In function 'CL_SendConsistencyInfo':
../engine/client/cl_parse.c:1520:4: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
cc1: some warnings being treated as errors

../engine/client/cl_efrag.c: In function 'R_AddEfrags':
../engine/client/cl_efrag.c:156:2: warning: passing argument 1 of 'Matrix3x4_TransformAABB' from incompatible pointer type [enabled by default]
In file included from ../engine/client/client.h:20:0,
                 from ../engine/client/cl_efrag.c:20:
../public/xash3d_mathlib.h:222:6: note: expected 'const vec_t (*)[4]' but argument is of type 'vec_t (*)[4]'

../engine/client/cl_pmove.c: In function 'CL_WaterEntity':
../engine/client/cl_pmove.c:620:4: warning: passing argument 1 of 'Matrix4x4_VectorITransform' from incompatible pointer type [enabled by default]
In file included from ../engine/client/client.h:20:0,
                 from ../engine/client/cl_pmove.c:17:
../public/xash3d_mathlib.h:233:6: note: expected 'const vec_t (*)[4]' but argument is of type 'vec_t (*)[4]'
../engine/client/cl_pmove.c: At top level:
../engine/client/cl_pmove.c:879:12: warning: function definition has qualified void return type [enabled by default]
../engine/client/cl_pmove.c: In function 'CL_RunUsercmd':
../engine/client/cl_pmove.c:963:17: warning: function with qualified void return type called [enabled by default]

./waf configure --build-type=release --enable-all-renderers
./waf build

Used debian wheezy gcc 4.7

@a1batross
Copy link
Member

You can build with --disable-werror.

But it's better to upgrade your distro.

@IsaacMvmv
Copy link
Author

Thanks, it worked
I wanted to build the engine for an old machine, that's why I used that old version :P

@IsaacMvmv IsaacMvmv reopened this Apr 2, 2023
@IsaacMvmv IsaacMvmv reopened this Apr 2, 2023
@IsaacMvmv
Copy link
Author

Is there a way to build with specific rerderers? I want to discard gles, but at the same time build with all the other renderers (software, nanogl, opengl)

@IsaacMvmv
Copy link
Author

ldd build/3rdparty/vgui_support/libvgui_support.so
	linux-gate.so.1 =>  (0xf7f91000)
	libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7e79000)
	/root/xash3d-fwgs/3rdparty/vgui_support/vgui-dev/lib/vgui.so (0xf7e23000)
	libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xf7d36000)
	libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf7d10000)
	libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf7cf3000)
	libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7ba1000)
	/lib/ld-linux.so.2 (0xf7f93000)
	libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf7b88000)
	libSDL2-2.0.so.0 => /usr/local/lib/libSDL2-2.0.so.0 (0xf79e9000)
	librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xf79e0000)

The linker doesn't work properly, this is sort of a duplicate of "FWGS/hlsdk-portable#267"

@a1batross
Copy link
Member

I don't think I will bother adding a fix for legacy binutils there. You may try to upgrade binutils.

@a1batross
Copy link
Member

a1batross commented Apr 2, 2023

Is there a way to build with specific rerderers? I want to discard gles, but at the same time build with all the other renderers (software, nanogl, opengl)

Yes, read waf configure --help.

@mittorn
Copy link
Member

mittorn commented Apr 3, 2023

linker issue may be fixed manually by elf patching utilities, but this is only related to legacy ports. Building on such old disros is some kind of legacy port :)

@IsaacMvmv
Copy link
Author

Yeah, you're right. I finally could build the thing, on debian 8, Jessie. I also built the legacy engine for a low quality counter strike (1.6) port to xash3d

@mittorn
Copy link
Member

mittorn commented Apr 3, 2023

Also it is possible to build it with modern compiler+linker toolchain but for legacy sysroot, to keep ability using modern compiler optimizations. Just install libsdl2-dev in debian 5/6 chroot (but i prefer ubuntu 12.04 for this) and use it from host system with modern gcc/clang. Maybe some -fno-builtin-xxx options will be needed

@IsaacMvmv
Copy link
Author

Oh, I didn't know that, thanks

@IsaacMvmv
Copy link
Author

Alright, the engine works perfectly, thanks you all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants