nillerusr / source-engine

Modified source engine (2017) developed by valve and leaked in 2020. Not for commercial purporses
Other
1.13k stars 175 forks source link

Build failure if snappy is installed. #297

Open MaddTheSane opened 9 months ago

MaddTheSane commented 9 months ago

If snappy is install via e.g. MacPorts, the build fails. This could be because the project either includes Snappy or headers named Snappy's public headers.

nillerusr commented 9 months ago

What compiler version are you using? That shouldn't be a problem.

➜  source-engine git:(master) ✗ grep -rn "#include.*snappy" *
engine/common.cpp:46:#include "tier1/snappy.h"
public/tier1/snappy.h:52:#include "snappy-stubs-public.h"
tier1/snappy-internal.h:34:#include "snappy-stubs-internal.h"
tier1/snappy-sinksource.cpp:31:#include "snappy-sinksource.h"
tier1/snappy-stubs-internal.cpp:35:#include "snappy-stubs-internal.h"
tier1/snappy-stubs-internal.h:50:#include "snappy-stubs-public.h"
tier1/snappy.cpp:29:#include "snappy.h"
tier1/snappy.cpp:30:#include "snappy-internal.h"
tier1/snappy.cpp:31:#include "snappy-sinksource.h"

When file included like that( #include <> )compiler should search first in system headers. When file included like that( #include "" ) compiler should search in user-defined include search path.

Can you provide build log?

MaddTheSane commented 8 months ago

Build log: snappybuildfailure.log

MaddTheSane commented 3 months ago

The reason for the failure is because I include -I/opt/local/include to work around another issue if I'm building with MacPorts: it tries to use MacPorts' libiconv library, but not MacPorts' libiconv header.