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

[OSX] 64-bit Build failing at various different points.

Open wunnr opened this issue 3 years ago • 4 comments

Attempting to make a 64-bit OSX build on a ARM/M1 Macbook pro, running Ventura 13.1 and Xcode 14.2. Build fails at a different point depending on what options are used.

With default options, on 'release' build type:

Build failed -> task in 'tier2' failed with exit status 1: {task 4390633872: cxx renderutils.cpp -> renderutils.cpp.33.o} ['/usr/bin/clang++', '-fno-strict-aliasing', '-fvisibility=hidden', '-O2', '-funsafe-math-optimizations', '-ftree-vectorize', '-ffast-math', '-pipe', '-fPIC', '-L/Users/[USERNAME]/Downloads/source-engine/lib/darwin/aarch64/', '-pthread', '-fsigned-char', '-std=c++11', '-fpermissive', '-Itier2', '-I../tier2', '-Icommon', '-I../common', '-Ipublic', '-I../public', '-Ipublic/tier0', '-I../public/tier0', '-Ipublic/tier1', '-I../public/tier1', '-Ipublic/tier2', '-I../public/tier2', '-I/opt/homebrew/include', '-I/opt/homebrew/include/SDL2', '-I../common', '-DDX_TO_GL_ABSTRACTION', '-DGL_GLEXT_PROTOTYPES', '-DBINK_VIDEO', '-DUSE_SDL=1', '-DPLATFORM_64BITS=1', '-DOSX=1', '-D_OSX=1', '-DPOSIX=1', '-D_POSIX=1', '-DPLATFORM_POSIX=1', '-DGNUC', '-DNO_HOOK_MALLOC', '-D_DLL_EXT=.dylib', '-DNDEBUG', '-DGIT_COMMIT_HASH="9586dc98"', '-DHAVE_SDL2=1', '-DHAVE_FT2=1', '-DHAVE_FC=1', '-DHAVE_JPEG=1', '-DHAVE_PNG=1', '-DHAVE_CURL=1', '-DHAVE_ZLIB=1', '../tier2/renderutils.cpp', '-c', '-o/Users/[USERNAME]/Downloads/source-engine/build/tier2/renderutils.cpp.33.o']

With SDL disabled:

Build failed -> task in 'togl' failed with exit status 1: {task 4331789888: cxx glmgr.cpp -> glmgr.cpp.46.o} ['/usr/bin/clang++', '-fno-strict-aliasing', '-fvisibility=hidden', '-O2', '-funsafe-math-optimizations', '-ftree-vectorize', '-ffast-math', '-pipe', '-fPIC', '-L/Users/[USERNAME]/Downloads/source-engine/lib/darwin/aarch64/', '-pthread', '-fsigned-char', '-std=c++11', '-fpermissive', '-fPIC', '-Itogl', '-I../togl', '-Ipublic', '-I../public', '-Ipublic/tier0', '-I../public/tier0', '-Ipublic/tier1', '-I../public/tier1', '-I../common', '-DDX_TO_GL_ABSTRACTION', '-DGL_GLEXT_PROTOTYPES', '-DBINK_VIDEO', '-DPLATFORM_64BITS=1', '-DOSX=1', '-D_OSX=1', '-DPOSIX=1', '-D_POSIX=1', '-DPLATFORM_POSIX=1', '-DGNUC', '-DNO_HOOK_MALLOC', '-D_DLL_EXT=.dylib', '-DNDEBUG', '-DGIT_COMMIT_HASH="9586dc98"', '-DHAVE_FT2=1', '-DHAVE_FC=1', '-DHAVE_JPEG=1', '-DHAVE_PNG=1', '-DHAVE_CURL=1', '-DHAVE_ZLIB=1', '-DTOGL_DLL_EXPORT=1', '-Dstrncpy=use_Q_strncpy_instead', '-D_snprintf=use_Q_snprintf_instead', '../togl/linuxwin/glmgr.cpp', '-c', '-o/Users/[USERNAME]/Downloads/source-engine/build/togl/linuxwin/glmgr.cpp.46.o']

With SDL and ToGL disabled:

Build failed -> task in 'bitmap' failed with exit status 1: {task 4329908368: cxx ImageByteSwap.cpp -> ImageByteSwap.cpp.1.o} ['/usr/bin/clang++', '-fno-strict-aliasing', '-fvisibility=hidden', '-O2', '-funsafe-math-optimizations', '-ftree-vectorize', '-ffast-math', '-pipe', '-fPIC', '-L/Users/[USERNAME]/Downloads/source-engine/lib/darwin/aarch64/', '-pthread', '-fsigned-char', '-std=c++11', '-fpermissive', '-Ibitmap', '-I../bitmap', '-Ipublic', '-I../public', '-Ipublic/tier0', '-I../public/tier0', '-Ipublic/tier1', '-I../public/tier1', '-Ithirdparty/stb', '-I../thirdparty/stb', '-I../common', '-DPLATFORM_64BITS=1', '-DOSX=1', '-D_OSX=1', '-DPOSIX=1', '-D_POSIX=1', '-DPLATFORM_POSIX=1', '-DGNUC', '-DNO_HOOK_MALLOC', '-D_DLL_EXT=.dylib', '-DNDEBUG', '-DGIT_COMMIT_HASH="9586dc98"', '-DHAVE_FT2=1', '-DHAVE_FC=1', '-DHAVE_JPEG=1', '-DHAVE_PNG=1', '-DHAVE_CURL=1', '-DHAVE_ZLIB=1', '../bitmap/ImageByteSwap.cpp', '-c', '-o/Users/[USERNAME]/Downloads/source-engine/build/bitmap/ImageByteSwap.cpp.1.o'] -> task in 'bitmap' failed with exit status 1: {task 4329910160: cxx imageformat.cpp -> imageformat.cpp.1.o} ['/usr/bin/clang++', '-fno-strict-aliasing', '-fvisibility=hidden', '-O2', '-funsafe-math-optimizations', '-ftree-vectorize', '-ffast-math', '-pipe', '-fPIC', '-L/Users/[USERNAME]/Downloads/source-engine/lib/darwin/aarch64/', '-pthread', '-fsigned-char', '-std=c++11', '-fpermissive', '-Ibitmap', '-I../bitmap', '-Ipublic', '-I../public', '-Ipublic/tier0', '-I../public/tier0', '-Ipublic/tier1', '-I../public/tier1', '-Ithirdparty/stb', '-I../thirdparty/stb', '-I../common', '-DPLATFORM_64BITS=1', '-DOSX=1', '-D_OSX=1', '-DPOSIX=1', '-D_POSIX=1', '-DPLATFORM_POSIX=1', '-DGNUC', '-DNO_HOOK_MALLOC', '-D_DLL_EXT=.dylib', '-DNDEBUG', '-DGIT_COMMIT_HASH="9586dc98"', '-DHAVE_FT2=1', '-DHAVE_FC=1', '-DHAVE_JPEG=1', '-DHAVE_PNG=1', '-DHAVE_CURL=1', '-DHAVE_ZLIB=1', '../bitmap/imageformat.cpp', '-c', '-o/Users/[USERNAME]/Downloads/source-engine/build/bitmap/imageformat.cpp.1.o']

I believe I have all the required dependencies. Not great at reading build errors though, so not sure if it's anything I'm missing or if M1 just isn't supported.

build.log config.log

wunnr avatar Jan 29 '23 07:01 wunnr

Can you send full logs? File names isn't enough to see what's wrong.

er2off avatar Jan 29 '23 10:01 er2off

Updated OP with full build and config logs. The build log is pretty basic, let me know if you need a more verbose one.

wunnr avatar Jan 29 '23 20:01 wunnr

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers/glext.h:2410:13: error: conflicting types for 'glShaderSourceARB'
extern void glShaderSourceARB(GLhandleARB shaderObj, GLsizei count, const GLcharARB* const *string, const GLint *length);
            ^
/opt/homebrew/include/SDL2/SDL_opengl_glext.h:4450:21: note: previous declaration is here
GLAPI void APIENTRY glShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB **string, const GLint *length);
                    ^
In file included from ../tier2/renderutils.cpp:15:
In file included from ../public/togl/rendermechanism.h:53:
In file included from ../public/togl/linuxwin/glmgrext.h:34:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers/glext.h:3227:13: error: conflicting types for 'glTexParameterIivEXT'
extern void glTexParameterIivEXT( GLenum target, GLenum pname, GLint *params );
            ^
/opt/homebrew/include/SDL2/SDL_opengl_glext.h:8819:21: note: previous declaration is here
GLAPI void APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params);
                    ^
In file included from ../tier2/renderutils.cpp:15:
In file included from ../public/togl/rendermechanism.h:53:
In file included from ../public/togl/linuxwin/glmgrext.h:34:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers/glext.h:3228:13: error: conflicting types for 'glTexParameterIuivEXT'
extern void glTexParameterIuivEXT( GLenum target, GLenum pname, GLuint *params );
            ^

wrong OpenGL version? how about update macos sdk or sdl?

er2off avatar Jan 30 '23 17:01 er2off

@wunnr well, that's deprecated opengl extensions.

nillerusr avatar Jan 31 '23 09:01 nillerusr