What's new

Compiling 1.99.3 on OS X (errors)

HDL

New member
I understand that there's a binary available (what a godsend), but I wanted to try my hand at compiling from source too. I've read the instructions found here carefully, many times, but everything I try turns up some kind of error. I thought I'd post the shell output here and perhaps Auria or someone who's done this successfully can pinpoint the root problem.

My system is 10.6.4, if that matters.

Here's what I get when attempting to run the included "m64p_build.sh" script:

"Emulation64" forum skin stretches this out a lot, use another skin to fix.

Code:
Last login: Sat Aug  7 15:02:44 on ttys000
HDLs-MacBook:~ HDL$ cd /Users/HDL/Desktop/mupen64plus-bundle-src-1.99.3
HDLs-MacBook:mupen64plus-bundle-src-1.99.3 HDL$ ./m64p_build.sh
************************************ Building core library
rm -f -rf libmupen64plus.dylib  ./_obj
cc -o _obj/api/callbacks.o -Wall -ffast-math -funroll-loops -fexpensive-optimizations -fno-strict-aliasing -I../../src -pipe -O3 -mmmx -msse -arch i686 -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk -fomit-frame-pointer -I/opt/local/include/SDL -D_THREAD_SAFE -I/opt/local/include/freetype2 -I/opt/local/include -DDYNAREC -c ../../src/api/callbacks.c
cc -o _obj/api/common.o -Wall -ffast-math -funroll-loops -fexpensive-optimizations -fno-strict-aliasing -I../../src -pipe -O3 -mmmx -msse -arch i686 -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk -fomit-frame-pointer -I/opt/local/include/SDL -D_THREAD_SAFE -I/opt/local/include/freetype2 -I/opt/local/include -DDYNAREC -c ../../src/api/common.c
cc -o _obj/api/config.o -Wall -ffast-math -funroll-loops -fexpensive-optimizations -fno-strict-aliasing -I../../src -pipe -O3 -mmmx -msse -arch i686 -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk -fomit-frame-pointer -I/opt/local/include/SDL -D_THREAD_SAFE -I/opt/local/include/freetype2 -I/opt/local/include -DDYNAREC -c ../../src/api/config.c
cc -o _obj/api/debugger.o -Wall -ffast-math -funroll-loops -fexpensive-optimizations -fno-strict-aliasing -I../../src -pipe -O3 -mmmx -msse -arch i686 -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk -fomit-frame-pointer -I/opt/local/include/SDL -D_THREAD_SAFE -I/opt/local/include/freetype2 -I/opt/local/include -DDYNAREC -c ../../src/api/debugger.c
cc -o _obj/api/frontend.o -Wall -ffast-math -funroll-loops -fexpensive-optimizations -fno-strict-aliasing -I../../src -pipe -O3 -mmmx -msse -arch i686 -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk -fomit-frame-pointer -I/opt/local/include/SDL -D_THREAD_SAFE -I/opt/local/include/freetype2 -I/opt/local/include -DDYNAREC -c ../../src/api/frontend.c
cc -o _obj/api/vidext.o -Wall -ffast-math -funroll-loops -fexpensive-optimizations -fno-strict-aliasing -I../../src -pipe -O3 -mmmx -msse -arch i686 -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk -fomit-frame-pointer -I/opt/local/include/SDL -D_THREAD_SAFE -I/opt/local/include/freetype2 -I/opt/local/include -DDYNAREC -c ../../src/api/vidext.c
../../src/api/vidext.c: In function ‘VidExt_GL_SetAttribute’:
../../src/api/vidext.c:282: error: ‘SDL_GL_SWAP_CONTROL’ undeclared (first use in this function)
../../src/api/vidext.c:282: error: (Each undeclared identifier is reported only once
../../src/api/vidext.c:282: error: for each function it appears in.)
make: *** [_obj/api/vidext.o] Error 1
HDLs-MacBook:mupen64plus-bundle-src-1.99.3 HDL$

EDIT: I found and posted the solution in post #5.

I also tried building the Glide64 plugin from here. That gives me some strange messages as well:

Code:
Last login: Sat Aug  7 15:13:16 on ttys000
HDLs-MacBook:~ HDL$ cd /Users/HDL/Desktop/mupen64plus-bundle-src-1.99.3/source/mupen64plus-video-glide64/projects/unix
HDLs-MacBook:unix HDL$ make all
    CC  _obj/osal_dynamiclib_unix.o
    CXX _obj/3dmath.o
In file included from ../../src/wrapper/glide.h:42,
                 from ../../src/rdp.h:48,
                 from ../../src/3dmath.h:37,
                 from ../../src/3dmath.cpp:42:
../../src/wrapper/3dfx.h:101:4: warning: #warning define FX_ENTRY & FX_CALL for your compiler
    CXX _obj/CRC.o
    CXX _obj/Combine.o
In file included from ../../src/wrapper/glide.h:42,
                 from ../../src/rdp.h:48,
                 from ../../src/Util.h:41,
                 from ../../src/Combine.cpp:45:
../../src/wrapper/3dfx.h:101:4: warning: #warning define FX_ENTRY & FX_CALL for your compiler
    CXX _obj/Config.o
    CXX _obj/Debugger.o
In file included from ../../src/wrapper/glide.h:42,
                 from ../../src/rdp.h:48,
                 from ../../src/Util.h:41,
                 from ../../src/Debugger.cpp:41:
../../src/wrapper/3dfx.h:101:4: warning: #warning define FX_ENTRY & FX_CALL for your compiler
    CXX _obj/DepthBufferRender.o
In file included from ../../src/wrapper/glide.h:42,
                 from ../../src/Gfx1.3.h:98,
                 from ../../src/DepthBufferRender.cpp:43:
../../src/wrapper/3dfx.h:101:4: warning: #warning define FX_ENTRY & FX_CALL for your compiler
    CXX _obj/Ini.o
In file included from ../../src/wrapper/glide.h:42,
                 from ../../src/Gfx1.3.h:98,
                 from ../../src/Ini.cpp:44:
../../src/wrapper/3dfx.h:101:4: warning: #warning define FX_ENTRY & FX_CALL for your compiler
    CXX _obj/Main.o
In file included from ../../src/wrapper/glide.h:42,
                 from ../../src/rdp.h:48,
                 from ../../src/Util.h:41,
                 from ../../src/Main.cpp:37:
../../src/wrapper/3dfx.h:101:4: warning: #warning define FX_ENTRY & FX_CALL for your compiler
    CXX _obj/TexBuffer.o
In file included from ../../src/wrapper/glide.h:42,
                 from ../../src/rdp.h:48,
                 from ../../src/TexBuffer.cpp:42:
../../src/wrapper/3dfx.h:101:4: warning: #warning define FX_ENTRY & FX_CALL for your compiler
    CXX _obj/TexCache.o
In file included from ../../src/wrapper/glide.h:42,
                 from ../../src/Gfx1.3.h:98,
                 from ../../src/Combine.h:38,
                 from ../../src/TexCache.cpp:43:
../../src/wrapper/3dfx.h:101:4: warning: #warning define FX_ENTRY & FX_CALL for your compiler
    CXX _obj/Util.o
In file included from ../../src/wrapper/glide.h:42,
                 from ../../src/rdp.h:48,
                 from ../../src/Util.h:41,
                 from ../../src/Util.cpp:41:
../../src/wrapper/3dfx.h:101:4: warning: #warning define FX_ENTRY & FX_CALL for your compiler
    CXX _obj/rdp.o
In file included from ../../src/wrapper/glide.h:42,
                 from ../../src/rdp.h:48,
                 from ../../src/3dmath.h:37,
                 from ../../src/rdp.cpp:42:
../../src/wrapper/3dfx.h:101:4: warning: #warning define FX_ENTRY & FX_CALL for your compiler
    CXX _obj/wrapper/2xsai.o
In file included from ../../src/wrapper/glide.h:42,
                 from ../../src/wrapper/../Gfx1.3.h:98,
                 from ../../src/wrapper/2xsai.cpp:22:
../../src/wrapper/3dfx.h:101:4: warning: #warning define FX_ENTRY & FX_CALL for your compiler
    CXX _obj/wrapper/combiner.o
In file included from ../../src/wrapper/glide.h:42,
                 from ../../src/wrapper/combiner.cpp:30:
../../src/wrapper/3dfx.h:101:4: warning: #warning define FX_ENTRY & FX_CALL for your compiler
    CXX _obj/wrapper/config.o
In file included from ../../src/wrapper/glide.h:42,
                 from ../../src/wrapper/config.cpp:25:
../../src/wrapper/3dfx.h:101:4: warning: #warning define FX_ENTRY & FX_CALL for your compiler
    CXX _obj/wrapper/filter.o
In file included from ../../src/wrapper/glide.h:42,
                 from ../../src/wrapper/main.h:93,
                 from ../../src/wrapper/filter.cpp:27:
../../src/wrapper/3dfx.h:101:4: warning: #warning define FX_ENTRY & FX_CALL for your compiler
    CXX _obj/wrapper/geometry.o
In file included from ../../src/wrapper/glide.h:42,
                 from ../../src/wrapper/geometry.cpp:24:
../../src/wrapper/3dfx.h:101:4: warning: #warning define FX_ENTRY & FX_CALL for your compiler
    CXX _obj/wrapper/hq2x.o
    CXX _obj/wrapper/hq4x.o
    CXX _obj/wrapper/main.o
In file included from ../../src/wrapper/glide.h:42,
                 from ../../src/wrapper/main.cpp:32:
../../src/wrapper/3dfx.h:101:4: warning: #warning define FX_ENTRY & FX_CALL for your compiler
    CXX _obj/wrapper/textures.o
In file included from ../../src/wrapper/glide.h:42,
                 from ../../src/wrapper/textures.cpp:25:
../../src/wrapper/3dfx.h:101:4: warning: #warning define FX_ENTRY & FX_CALL for your compiler
    LD  mupen64plus-video-glide64.dylib
strip -x  mupen64plus-video-glide64.dylib
HDLs-MacBook:unix HDL$

The file is generated, so I decided to try it even with all those warnings. This is what I get when I try to run the emulator:

Code:
Last login: Sat Aug 14 12:16:26 on ttys000
HDLs-MacBook:~ HDL$ cd ~/Desktop
HDLs-MacBook:Desktop HDL$ ./glide.sh "/Users/HDL/Desktop/Main/Emulators/N64/Conker's Bad Fur Day.z64"
 __  __                         __   _  _   ____  _             
|  \/  |_   _ _ __   ___ _ __  / /_ | || | |  _ \| |_   _ ___ 
| |\/| | | | | '_ \ / _ \ '_ \| '_ \| || |_| |_) | | | | / __|  
| |  | | |_| | |_) |  __/ | | | (_) |__   _|  __/| | |_| \__ \  
|_|  |_|\__,_| .__/ \___|_| |_|\___/   |_| |_|   |_|\__,_|___/  
             |_|         http://code.google.com/p/mupen64plus/  
Mupen64Plus Console User-Interface Version 1.99.3

UI-console: attached to core library 'Mupen64Plus Core' version 1.99.3
            Includes support for Dynamic Recompiler.
Core: Goodname: Conker's Bad Fur Day (U) [!]
Core: Name: CONKER BFD
Core: MD5: 00E2920665F2329B95797A7EAABC2390
Core: CRC: 30c7ac50 7704072d
Core: Imagetype: .z64 (native)
Core: Rom size: 67108864 bytes (or 64 Mb or 512 Megabits)
Core: Version: 1447
Core: Manufacturer: Nintendo
Core: Country: USA
UI-Console: Cheat codes disabled.
UI-console: using Video plugin: 'Glide64' v1.99.3
UI-console: using Audio plugin: 'Mupen64Plus SDL Audio Plugin' v1.99.3
UI-console: using Input plugin: 'Mupen64Plus SDL Input Plugin' v1.99.3
UI-console: using RSP plugin: 'Hacktarux/Azimer High-Level Emulation RSP Plugin' v1.99.3
Core Error: broken Video plugin; function(s) not found.
UI-Console: error from core while attaching Video plugin.
Core Status: Rom closed.
HDLs-MacBook:Desktop HDL$

EDIT: Finally got Glide working. It turns out it wouldn't work with an older version of the core library for whatever reason (even though it was only a week old, more or less). Compiling the most recent core allows Glide to run properly, though I still can't get rid of those warnings.
 
Last edited:

LazerTag

Leap of Faith
You did satisfy all dependencies as noted (including the ones from the 1.x section) ?

Also you are using the 64 bit build script, yes?

Lastly have you simply tried running the build scripts as root?
 
OP
H

HDL

New member
As far as I know, these are the dependencies needed and the ones I have:

SDL, SDL_ttf, freetype, fontconfig, and libpng. I also have GTK+ from when I used Mupen64Plus 1.5, but I read that it's not needed for the new version.

I've tried building 64 and 32-bit.

Yes, I've tried root also.
 

LazerTag

Leap of Faith
Since you are 10.6.4 make sure to stick to the 64 bit build script.

I've understood that making sure SDL is installed after Xcode is pretty important (I have no clue why but during all my reading on this that is what I gathered). Do make sure to SDL first, latest version would be recommended, and though the site you checked here on the how to doesn't specifically state it (that I can see) I would install SDL-devel too. I'm fairly sure that will take care of that 'SDL_GL_SWAP_CONTROL' error in the compile.
 
OP
H

HDL

New member
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.
 
Last edited:

Top