I have SDL installed, as I also use it for SDLMAME and can see it in /Library/Frameworks. Just in case, I got SDL-devel too. When I type "sdl-config --version" in the shell, it turns up 1.3.0. To my understanding, there is no stable release of that version yet, so it must be the developer package. I downloaded it with MacPorts. According to the Mac build page for Mupen, you're supposed to add flags at the end of each make command since MacPorts installs things in a separate path. I tried with and without those flags, both fail.
EDIT: I located part of the problem. It seems that SDL 1.3.0 does not have "SDL_GL_SWAP_CONTROL" in its SDL_video.h file, part of the changes they've made to the new version I guess. I compiled SDL 1.2.14 from source and that installed the development libraries for 1.2.14 instead, which took care of the vidext.c and SDL_GL_SWAP_CONTROL issue.
I've successfully compiled and installed SDL, zlib, freetype, fontconfig, libpng, and SDL_ttf from their sources, and they have gotten rid of some of the errors I was having previously.
Most of the modules build now. There's one warning after building the Mupen core, but otherwise it seemed to compile fine.
Here are the ones that still don't compile properly: Rice (edit: got it working, see below), Glide (got this working too, see first post), Arachnoid (this one too), Z64.
I have tested the modules that compiled and they all seem to work properly, at least immediately. I was able to run games normally (using the old, already built video plugins, of course). Here are the various shell outputs I get from trying to compile them:
Arachnoid
Code:
Last login: Fri Aug 13 17:00:21 on ttys000
HDLs-MacBook:~ HDL$ cd /Users/HDL/Desktop/mupen64plus-bundle-src-1.99.3/source/mupen64plus-video-arachnoid/projects/unix
HDLs-MacBook:unix HDL$ make all ARCH_DETECTED=64BITS CXX _obj/main.o
In file included from ../../src/OpenGLManager.h:32,
from ../../src/GraphicsPlugin.h:27,
from ../../src/main.cpp:25:
../../src/OpenGL.h:27:19: error: GL/gl.h: No such file or directory
../../src/OpenGL.h:29:26: error: GL/glext.h: No such file or directory
In file included from ../../src/GraphicsPlugin.h:27,
from ../../src/main.cpp:25:
../../src/OpenGLManager.h:33:20: error: GL/glu.h: No such file or directory
In file included from ../../src/GraphicsPlugin.h:27,
from ../../src/main.cpp:25:
../../src/OpenGLManager.h: In member function ‘void OpenGLManager::setClearColor(float, float, float)’:
../../src/OpenGLManager.h:97: error: ‘glClearColor’ was not declared in this scope
make: *** [_obj/main.o] Error 1
HDLs-MacBook:unix HDL$
EDIT: Took care of this one by opening the files containing includes like "GL/glu.h" and pasting the entire path to where those header files are located on my system specifically.
Rice
Code:
Last login: Fri Aug 13 17:01:50 on ttys000
HDLs-MacBook:~ HDL$ cd /Users/HDL/Desktop/mupen64plus-bundle-src-1.99.3/source/mupen64plus-video-rice/projects/unix
HDLs-MacBook:unix HDL$ make all ARCH_DETECTED=64BITScc -o _obj/liblinux/BMGImage.o -Wall -ffast-math -funroll-loops -fexpensive-optimizations -fno-strict-aliasing -I../../src -fpic -DPIC -fvisibility=hidden -pipe -O3 -arch x86_64 -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -DPIC -I../../../mupen64plus-core/src/api -c ../../src/liblinux/BMGImage.c
cc -o _obj/liblinux/bmp.o -Wall -ffast-math -funroll-loops -fexpensive-optimizations -fno-strict-aliasing -I../../src -fpic -DPIC -fvisibility=hidden -pipe -O3 -arch x86_64 -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -DPIC -I../../../mupen64plus-core/src/api -c ../../src/liblinux/bmp.c
cc -o _obj/liblinux/pngrw.o -Wall -ffast-math -funroll-loops -fexpensive-optimizations -fno-strict-aliasing -I../../src -fpic -DPIC -fvisibility=hidden -pipe -O3 -arch x86_64 -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -DPIC -I../../../mupen64plus-core/src/api -c ../../src/liblinux/pngrw.c
../../src/liblinux/pngrw.c:37:17: error: png.h: No such file or directory
../../src/liblinux/pngrw.c: In function ‘Expand2to4’:
../../src/liblinux/pngrw.c:66: warning: implicit declaration of function ‘memcpy’
../../src/liblinux/pngrw.c:66: warning: incompatible implicit declaration of built-in function ‘memcpy’
../../src/liblinux/pngrw.c: At top level:
../../src/liblinux/pngrw.c:75: error: expected ‘)’ before ‘png_read’
../../src/liblinux/pngrw.c:82: error: expected ‘)’ before ‘png_write’
../../src/liblinux/pngrw.c:89: error: expected ‘)’ before ‘png_read’
../../src/liblinux/pngrw.c: In function ‘ReadPNG’:
../../src/liblinux/pngrw.c:120: error: ‘jmp_buf’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:120: error: (Each undeclared identifier is reported only once
../../src/liblinux/pngrw.c:120: error: for each function it appears in.)
../../src/liblinux/pngrw.c:120: error: expected ‘;’ before ‘err_jmp’
../../src/liblinux/pngrw.c:131: error: ‘png_structp’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:131: error: expected ‘;’ before ‘volatile’
../../src/liblinux/pngrw.c:132: error: ‘png_infop’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:132: error: expected ‘;’ before ‘volatile’
../../src/liblinux/pngrw.c:133: error: expected ‘;’ before ‘volatile’
../../src/liblinux/pngrw.c:134: error: ‘png_colorp’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:134: error: expected ‘;’ before ‘PNGPalette’
../../src/liblinux/pngrw.c:135: error: ‘png_color_16’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:135: error: ‘ImageBackground’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:136: error: ‘png_bytep’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:136: error: expected ‘;’ before ‘trns’
../../src/liblinux/pngrw.c:139: error: ‘png_color_16p’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:139: error: expected ‘;’ before ‘TransColors’
../../src/liblinux/pngrw.c:140: error: ‘png_uint_32’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:140: error: expected ‘;’ before ‘Width’
../../src/liblinux/pngrw.c:154: warning: implicit declaration of function ‘setjmp’
../../src/liblinux/pngrw.c:154: error: ‘err_jmp’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:157: error: ‘end_info’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:158: warning: implicit declaration of function ‘png_destroy_read_struct’
../../src/liblinux/pngrw.c:158: error: expected expression before ‘)’ token
../../src/liblinux/pngrw.c:159: error: ‘info_ptr’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:160: error: expected expression before ‘)’ token
../../src/liblinux/pngrw.c:161: error: ‘png_ptr’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:162: error: expected expression before ‘)’ token
../../src/liblinux/pngrw.c:178: warning: implicit declaration of function ‘longjmp’
../../src/liblinux/pngrw.c:185: warning: implicit declaration of function ‘png_sig_cmp’
../../src/liblinux/pngrw.c:189: warning: implicit declaration of function ‘png_create_read_struct’
../../src/liblinux/pngrw.c:189: error: ‘PNG_LIBPNG_VER_STRING’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:194: warning: implicit declaration of function ‘png_create_info_struct’
../../src/liblinux/pngrw.c:212: warning: implicit declaration of function ‘png_set_read_fn’
../../src/liblinux/pngrw.c:212: error: ‘png_voidp’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:212: error: expected ‘)’ before ‘file’
../../src/liblinux/pngrw.c:215: warning: implicit declaration of function ‘png_set_sig_bytes’
../../src/liblinux/pngrw.c:218: warning: implicit declaration of function ‘png_read_info’
../../src/liblinux/pngrw.c:221: warning: implicit declaration of function ‘png_get_IHDR’
../../src/liblinux/pngrw.c:221: error: ‘Width’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:221: error: ‘Height’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:226: warning: implicit declaration of function ‘png_get_channels’
../../src/liblinux/pngrw.c:239: error: ‘PNG_COLOR_MASK_ALPHA’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:239: error: ‘PNG_COLOR_MASK_COLOR’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:246: warning: implicit declaration of function ‘png_set_strip_16’
../../src/liblinux/pngrw.c:249: warning: implicit declaration of function ‘png_get_valid’
../../src/liblinux/pngrw.c:249: error: ‘PNG_INFO_bKGD’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:250: warning: implicit declaration of function ‘png_get_bKGD’
../../src/liblinux/pngrw.c:253: error: ‘PNG_INFO_tRNS’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:254: warning: implicit declaration of function ‘png_get_tRNS’
../../src/liblinux/pngrw.c:254: error: ‘trns’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:254: error: ‘TransColors’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:288: warning: implicit declaration of function ‘png_set_packing’
../../src/liblinux/pngrw.c:301: error: ‘PNG_COLOR_MASK_PALETTE’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:321: warning: implicit declaration of function ‘png_get_PLTE’
../../src/liblinux/pngrw.c:321: error: ‘PNGPalette’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:370: warning: implicit declaration of function ‘memset’
../../src/liblinux/pngrw.c:370: warning: incompatible implicit declaration of built-in function ‘memset’
../../src/liblinux/pngrw.c:382: warning: implicit declaration of function ‘png_read_update_info’
../../src/liblinux/pngrw.c:389: warning: implicit declaration of function ‘png_get_rowbytes’
../../src/liblinux/pngrw.c:398: warning: implicit declaration of function ‘png_read_image’
../../src/liblinux/pngrw.c:413: warning: incompatible implicit declaration of built-in function ‘memcpy’
../../src/liblinux/pngrw.c:434: warning: incompatible implicit declaration of built-in function ‘memset’
../../src/liblinux/pngrw.c:455: error: expected ‘;’ before ‘pal’
../../src/liblinux/pngrw.c:456: error: ‘pal’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:509: warning: implicit declaration of function ‘png_read_end’
../../src/liblinux/pngrw.c:510: error: expected expression before ‘)’ token
../../src/liblinux/pngrw.c: In function ‘WritePNG’:
../../src/liblinux/pngrw.c:536: error: ‘jmp_buf’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:536: error: expected ‘;’ before ‘err_jmp’
../../src/liblinux/pngrw.c:540: error: ‘png_structp’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:540: error: expected ‘;’ before ‘png_ptr’
../../src/liblinux/pngrw.c:541: error: ‘png_infop’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:541: error: expected ‘;’ before ‘info_ptr’
../../src/liblinux/pngrw.c:542: error: ‘png_colorp’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:542: error: expected ‘;’ before ‘PNGPalette’
../../src/liblinux/pngrw.c:556: error: ‘err_jmp’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:560: error: ‘png_ptr’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:561: warning: implicit declaration of function ‘png_destroy_write_struct’
../../src/liblinux/pngrw.c:570: error: ‘PNGPalette’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:619: warning: implicit declaration of function ‘png_create_write_struct’
../../src/liblinux/pngrw.c:619: error: ‘PNG_LIBPNG_VER_STRING’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:624: error: ‘info_ptr’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:636: warning: implicit declaration of function ‘png_set_write_fn’
../../src/liblinux/pngrw.c:636: error: ‘png_voidp’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:636: error: expected ‘)’ before ‘outfile’
../../src/liblinux/pngrw.c:643: error: ‘PNG_COLOR_TYPE_GRAY’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:645: error: ‘PNG_COLOR_TYPE_RGB_ALPHA’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:647: error: ‘PNG_COLOR_TYPE_RGB’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:649: error: ‘PNG_COLOR_TYPE_PALETTE’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:652: warning: implicit declaration of function ‘png_set_IHDR’
../../src/liblinux/pngrw.c:652: error: ‘PNG_INTERLACE_NONE’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:652: error: ‘PNG_COMPRESSION_TYPE_BASE’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:652: error: ‘PNG_FILTER_TYPE_BASE’ undeclared (first use in this function)
../../src/liblinux/pngrw.c:657: error: expected ‘;’ before ‘png_malloc’
../../src/liblinux/pngrw.c:668: warning: implicit declaration of function ‘png_set_PLTE’
../../src/liblinux/pngrw.c:675: warning: implicit declaration of function ‘png_write_info’
../../src/liblinux/pngrw.c:697: warning: incompatible implicit declaration of built-in function ‘memcpy’
../../src/liblinux/pngrw.c:720: warning: implicit declaration of function ‘png_write_rows’
../../src/liblinux/pngrw.c:725: warning: implicit declaration of function ‘png_write_end’
make: *** [_obj/liblinux/pngrw.o] Error 1
HDLs-MacBook:unix HDL$
EDIT: I got it working by typing "make all NO-ASM=1 C_INCLUDE_PATH=/usr/local/include"
Z64
Code:
Last login: Thu Aug 19 15:54:42 on ttys000
HDLs-MacBook:~ HDL$ cd /Users/HDL/Desktop/mupen64plus-bundle-src-1.99.3/source/mupen64plus-video-z64/projects/unix
HDLs-MacBook:unix HDL$ make all ARCH_DETECTED=64BITS CC _obj/osal_dynamiclib_unix.o
CXX _obj/rgl.o
../../src/rgl.cpp: In function ‘void rglPrepareFramebuffer(rglRenderBuffer_t&)’:
../../src/rgl.cpp:372: warning: ‘restoreFbid’ may be used uninitialized in this function
CXX _obj/rgl_settings.o
../../src/rdp.h:87: warning: ‘rdpImageFormats’ defined but not used
CXX _obj/rgl_tiles.o
CXX _obj/rgl_rendermode.o
../../src/rgl_rendermode.cpp:217:21: warning: "/*" within comment
../../src/rgl_rendermode.cpp: In function ‘void rglSetCombiner(rglRenderChunk_t&, int)’:
../../src/rgl_rendermode.cpp:285: warning: comparison between signed and unsigned integer expressions
../../src/rgl_rendermode.cpp:170: warning: unused variable ‘sbRGB’
../../src/rgl_rendermode.cpp:227: warning: ‘write’ may be used uninitialized in this function
../../src/rdp.h: At global scope:
../../src/rdp.h:87: warning: ‘rdpImageFormats’ defined but not used
CXX _obj/rgl_geometry.o
../../src/rdp.h:87: warning: ‘rdpImageFormats’ defined but not used
CXX _obj/rgl_debugger.o
../../src/rdp.h:87: warning: ‘rdpImageFormats’ defined but not used
../../src/rgl_debugger.cpp:33: warning: ‘sbRGBText’ defined but not used
CXX _obj/rgl_osdep.o
../../src/rdp.h:87: warning: ‘rdpImageFormats’ defined but not used
CXX _obj/rdp.o
../../src/rdp.h:87: warning: ‘rdpImageFormats’ defined but not used
CXX _obj/glshader.o
../../src/rdp.h:87: warning: ‘rdpImageFormats’ defined but not used
CXX _obj/disasm.o
CXX _obj/maingl.o
../../src/rdp.h:87: warning: ‘rdpImageFormats’ defined but not used
LD mupen64plus-video-z64.dylib
ld: warning: in /usr/local/lib/libGLEW.dylib, file was built for i386 which is not the architecture being linked (x86_64)
Undefined symbols:
"___glewGenFramebuffersEXT", referenced from:
rglPrepareFramebuffer(rglRenderBuffer_t&) in rgl.o
"___glewDeleteRenderbuffersEXT", referenced from:
rglClearRenderBuffers() in rgl.o
rglClose() in rgl.o
"___glewBlendFuncSeparate", referenced from:
rglSetCombiner(rglRenderChunk_t&, int) in rgl_rendermode.o
"___glewCreateShaderObjectARB", referenced from:
rglCreateShader(char const*, char const*)in glshader.o
"___glewUseProgramObjectARB", referenced from:
rglUseShader(rglShader_t*) in glshader.o
"___glewShaderSourceARB", referenced from:
rglCreateShader(char const*, char const*)in glshader.o
"___glewCreateProgramObjectARB", referenced from:
rglCreateShader(char const*, char const*)in glshader.o
"___glewDeleteObjectARB", referenced from:
rglDeleteShader(rglShader_t*) in glshader.o
"___glewFramebufferRenderbufferEXT", referenced from:
rglPrepareFramebuffer(rglRenderBuffer_t&) in rgl.o
"___glewCompileShaderARB", referenced from:
rglCreateShader(char const*, char const*)in glshader.o
"___glewFramebufferTexture2DEXT", referenced from:
rglPrepareFramebuffer(rglRenderBuffer_t&) in rgl.o
rglRenderChunks(int) in rgl.o
"_glewInit", referenced from:
rglInit() in rgl.o
"___glewMultiTexCoord2fARB", referenced from:
rglRenderChunks(int) in rgl.o
rglRenderChunks(int) in rgl.o
"___glewGetInfoLogARB", referenced from:
printInfoLog(unsigned int, char const*)in glshader.o
"___glewUniform1iARB", referenced from:
rglSetCombiner(rglRenderChunk_t&, int) in rgl_rendermode.o
"___glewBindFramebufferEXT", referenced from:
rglDisplayFramebuffers() in rgl.o
rglDisplayFramebuffers() in rgl.o
rglPrepareFramebuffer(rglRenderBuffer_t&) in rgl.o
rglPrepareFramebuffer(rglRenderBuffer_t&) in rgl.o
rglRenderChunks(int) in rgl.o
rglUpdate() in rgl.o
rglFramebuffer2Rdram(rglRenderBuffer_t&, unsigned int, unsigned int)in rgl.o
"___glewAttachObjectARB", referenced from:
rglCreateShader(char const*, char const*)in glshader.o
"___glewActiveTextureARB", referenced from:
rglDisplayFramebuffers() in rgl.o
rglRenderChunks(int) in rgl.o
rglRenderChunks(int) in rgl.o
rglRenderChunks(int) in rgl.o
rglRenderChunks(int) in rgl.o
rglRenderChunks(int) in rgl.o
rglSetCombiner(rglRenderChunk_t&, int) in rgl_rendermode.o
"___glewGetObjectParameterivARB", referenced from:
printInfoLog(unsigned int, char const*)in glshader.o
"___glewCheckFramebufferStatusEXT", referenced from:
rglRenderChunks(int) in rgl.o
"___glewLinkProgramARB", referenced from:
rglCreateShader(char const*, char const*)in glshader.o
"___glewGetUniformLocationARB", referenced from:
rglSetCombiner(rglRenderChunk_t&, int) in rgl_rendermode.o
"___glewDeleteFramebuffersEXT", referenced from:
rglDeleteRenderBuffer(rglRenderBuffer_t&) in rgl.o
rglClearRenderBuffers() in rgl.o
rglClose() in rgl.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [mupen64plus-video-z64.dylib] Error 1
HDLs-MacBook:unix HDL$
Glide64
First post. 
EDIT: Even though I figured all this bologna out I left most of it intact just in case someone else encounters similar problems and would like to compare my solutions with theirs.