source-engine icon indicating copy to clipboard operation
source-engine copied to clipboard

Build failure if snappy is installed.

Open MaddTheSane opened this issue 1 year ago • 3 comments

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.

MaddTheSane avatar Oct 06 '23 04:10 MaddTheSane

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?

nillerusr avatar Oct 08 '23 17:10 nillerusr

Build log: snappybuildfailure.log

MaddTheSane avatar Oct 10 '23 07:10 MaddTheSane

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.

MaddTheSane avatar Mar 29 '24 02:03 MaddTheSane