source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

BUG: Failure to compile on Linux due to GCC on the sdk container

Open sinsandrocks18 opened this issue 10 months ago • 6 comments

Expected Behaviour

  • Compilation and works perfectly without any issues

actual Behaviour

  • Ninja Erroring Out due to GCC
  • Log here

how to repoduce the issue

  • Build the Source SDK on a Zen 1 CPU, like a ryzen 1700

Potential Cause?

From what i've seen it always hangs on gcc randomly, potentially due to the build of GCC that's used for the podman container.

sinsandrocks18 avatar Feb 19 '25 00:02 sinsandrocks18

You could try forcing GCC14 with

export CC=gcc-14
export CXX=g++-14

(or gcc14... if that is wrong.)

misyltoad avatar Feb 19 '25 01:02 misyltoad

Will do

sinsandrocks18 avatar Feb 19 '25 01:02 sinsandrocks18

Unless if i'm supposed to do that in the container, it resulted in the same error

sinsandrocks18 avatar Feb 19 '25 02:02 sinsandrocks18

Sorry, you'd need to place that after the run_in_sniper invocation in the buildallprojects file, and clear out vpc.

It is known however that Zen 1 CPUs just have issues compiling things on some GCC versions and I forget the root cause.

Hopefully the newer GCC fixes it for you if it works. You can check what is being invoked in the generated ninja file.

misyltoad avatar Feb 19 '25 02:02 misyltoad

did what you said and its resulting in mod_tf_linux64 and mod_hl2mp_linux64 build errors

log

sinsandrocks18 avatar Feb 19 '25 02:02 sinsandrocks18

UPDATE: from troubleshooting with people on a discord server, Apparently for some reason using the default GCC that the container uses with qemu-x86_64 /usr/bin/bash ./buildallprojects (Thanks Sulfrix!) it compiles normally

sinsandrocks18 avatar Feb 19 '25 13:02 sinsandrocks18