I'm currently trying to compile armagetron on OSX 10.11.
I was compiling the stable branch of 0.2.8 from LaunchPad when I came across across a linker error that looked like this:
Code: Select all
> sudo make -j6 install
Making install in src
Making install in first
...blahblah...
g++ -I../../src/tools -I../../src/render -I../../src/ui -I../../src/network -I../../src/engine -I../../src/thirdparty/particles -I../../src/tron -O2 -Wno-long-long -o armagetronad_main tron/armagetronad_main-gFloor.o libtron.a libenginecore.a libengine.a libnetwork.a libui.a librender.a libtools.a -lSDL_image -L/usr/local/lib -lSDLmain -lSDL -Wl,-framework,Cocoa -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib -lxml2 -lz -lpthread -licucore -lm -lpng16
Undefined symbols for architecture x86_64:
"_glAlphaFunc", referenced from:
sr_ResetRenderState(bool) in librender.a(librender_a-rScreen.o)
"_glBegin", referenced from:
glRenderer::BeginLines() in librender.a(librender_a-rGLRender.o)
glRenderer::BeginTriangles() in librender.a(librender_a-rGLRender.o)
glRenderer::BeginQuads() in librender.a(librender_a-rGLRender.o)
glRenderer::BeginLineStrip() in librender.a(librender_a-rGLRender.o)
glRenderer::BeginTriangleStrip() in librender.a(librender_a-rGLRender.o)
glRenderer::BeginQuadStrip() in librender.a(librender_a-rGLRender.o)
glRenderer::BeginTriangleFan() in librender.a(librender_a-rGLRender.o)
"_glBindTexture", referenced from:
...blah blah blah a lot more traceback errors in a similar format...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [armagetronad_main] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
This confused me a bit but I was essentially able to quickly patch over this simply by changing a line in the Makefile located in 0.2.8/build/src from:
Code: Select all
armagetronad_main_LDADD = libtron.a libenginecore.a libengine.a libnetwork.a libui.a librender.a libtools.a
Code: Select all
armagetronad_main_LDADD = libtron.a libenginecore.a libengine.a libnetwork.a libui.a librender.a libtools.a -framework OpenGL
However I will say that this post is still a question somewhat. After I added this fix everything compiled perfectly (though not into an app bundle as I expected from make install). When I tried to execute the binary, the app crashes almost immediately. Since I don't know enough about the whole compilation process I can't rule out that the two errors are related. Thus I will link to a separate post explaining the crashing issue momentarily.
Update: link to post-compilation crash issue here: http://forums3.armagetronad.net/viewtop ... 49&t=24632