My favorites | Sign in
Logo
Project hosting will be READ-ONLY Wednesday, 7AM PST due to brief network maintenance
                
Search
for
Updated Aug 01, 2009 by tmator
Labels: Build
MacOSX_Build  
How to build dolphin in Mac OS X.

How To build dolphin on mac osx

In 32 bit

You need :

  1. Xcode
  2. MacPorts for other dependencies
  3. OpenAL >= 1.1 (not in macports)
  4. nvidia cgtoolkit to compile video plugin (http://developer.download.nvidia.com/cg/Cg_2.0/2.0.0015/Cg-2.0_May2008.dmg)
  5. SDL framework : http://libsdl.org/download-1.2.php

All of the following steps happen inside Terminal.app.

Modify the PATH :

If you did not already do this as part of the MacPorts install, add /opt/local/bin to your path:

$ export PATH=/opt/local/bin:$PATH

Install dependencies using MacPorts:

Many of the dependencies needed to build Dolphin can be installed using MacPorts. Note that this will result in a binary that will only run on your system, or will require MacPorts in order to run (so don't go and try to redistribute it).

$ sudo port install libao cairo scons wxwidgets glew

Install OpenAL

Get sources :

$ svn co svn://connect.creativelabs.com/OpenAL/trunk/OpenAL-MacOSX

and compile it with Xcode.

Get dolphin sources :

$ svn checkout http://dolphin-emu.googlecode.com/svn/trunk/ dolphin-emu-read-only

Compile it using scons:

$ cd dolphin-emu-read-only
$ scons

Compile it using Xcode:

(tbd)

Launch it :

Open finder and go to Binary/mac directory and launch Dolphin.

Do not launch Dolphin from the Terminal, or else wxWidgets will not work correctly (?!)

You can also build the NoGui version, which will not crash when run directly.

In 64 bit

To build dolphin in 64bit you need :

  1. g++ (from xcode)
  2. nvidia cgtoolkit to compile video plugin (http://developer.download.nvidia.com/cg/Cg_2.0/2.0.0015/Cg-2.0_May2008.dmg)
  3. libglew : macport version is 32bit, download sources from sf.net and add "-arch x86_64" as compilateur and linker flags (http://glew.sourceforge.net/)
  4. scons (from macport or official website)

Get the source with svn

Type : scons osx64=true

If your video card not support Ogl > 1.3, you can use software renderer (see cocoaGL.m in video gl plugin)

JIT not work in 64bit, and some plugins can't be compiled, use this in dolphin.ini :

GFXPlugin = Plugins/libzeroogl.so

DSPPlugin = Plugins/libdspnull.so

PadPlugin = Plugins/libpadsimple.so

WiiMotePlugin = Plugins/libPlugin_Wiimote.so

UseDynarec = False


Comment by skarmiglione.sk4r, Aug 01, 2008

for mac in ppc? i have a question, is more easy the emulation of gamecube on a mac in powerpc hardware? have the same type of processor, ej: Power G5. that is my ask.

Comment by hrydgard, Aug 08, 2008

Well, maybe a little bit easier if we started from scratch, but now we have quite fast PowerPC emulation code for x86.

You can't just run the code directly, you have to translate all memory accesses and so on. As a result it may not be all that faster, but of course things like flag calculation would be easier.

Comment by celgil...@gmail.com, Oct 08, 2009

Since "Snow Leopard" and before tmator r4374-svn Dolphin (is) was broken... I've installed wxWidgets-2.9.0 from macports 1.8.1 by applying the latest macports patches and even tried wxWidgets-2.9.1 from wxwidgets.org SVN version, but no luck. It compiles almoste everything but just before linking the whole libs the error message is:

`ld: library not found for -lwx_osx_cocoau_aui-2.9 collect2: ld returned 1 exit status scons: Binary/Darwin-i386/Dolphin.app/Contents/MacOS/Dolphin? Error 1 scons: building terminated because of errors. `

P.S. the latest patches for wxWidgets-2.9.0 are here: http://trac.macports.org/attachment/ticket/20952/Portfile http://trac.macports.org/attachment/ticket/20952/patch-textctrl.diff

any help will be greatly appreciated

Comment by celgil...@gmail.com, Oct 11, 2009

Thanks tmator: dolphin-svn since r4389 seems to compile fine on Snow Leopard, except that I didn't figure out how to compile Open AL 1.1 on Snow Leopard. Tried to compile via XCode but there are too many compiling errors, so gave up. Used the command: #svn co svn://connect.creativelabs.com/OpenAL/trunk/

if someone could help, this would be great!

Comment by celgil...@gmail.com, Oct 12, 2009

@cern.dinckol: you need to apply the patches for wxwidgets:

the latest patches for wxWidgets-2.9.0 are here: http://trac.macports.org/attachment/ticket/20952/Portfile http://trac.macports.org/attachment/ticket/20952/patch-textctrl.diff

more info here: http://trac.macports.org/ticket/20952

Comment by cem.dinckol, Oct 12, 2009

celgil, thanks for your reply. How would I apply the patch ? Downloaded as a port file. Sorry mac user but noob.

Thanks a lot.

Comment by celgil...@gmail.com, Oct 14, 2009

On Snow Leopard the 2.9.1-svn version of wxWidgets compiles fine from source....wxWidgets is not yet fixed with Macports.

The new wyxwidgets 2.9.1-svn build will be installed in /usr/local/ but via Macports wxwidgets is installed in /opt/local/ !!!

Create a dir "wxWidgets" in your Downloads directory: #mkdir ~/Downloads/wxWidgets

Then execute this commands:

# cd ~/Downloads/wxWidgets/ # svn checkout http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk ~/Downloads/wxWidgets/

# ./configure --with-osx_cocoa --with-sdl --with-opengl --disable-sdltest --with-libjpeg --with-libtiff --with-libpng --enable-unicode --enable-display #make #make install

Now DOLPHIN needs to know where your new wxwidgets libraries and headers are installed (remember in /usr/local/, so by trying to build dolphin-svn buidl it with the command: # scons verbose=yes wxconfig=/usr/local/bin/wx-config CC=gcc-4.2 CXX=g++-4.2

Comment by cem.dinckol, Oct 15, 2009

Hi, any other way to get 2.9.1 than checkout, tried 5 times it stucks around 132 mb transfered, it's locked and cleanup doesn't help - Thanks.

Comment by celgil...@gmail.com, Oct 16, 2009

dolphin-svn r4428 and before broken on Snow Leopard...tried with wxWidgets 2.9.1-svn which compiles fine...but dolphin-svn has a lot of errors. Here are some excerpts...there are too many to list.

' In file included from /System/Library/Frameworks/AppKit?.framework/Headers/AppKit?.h:28,

from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13, from Source/Plugins/Plugin_VideoSoftware?/Src/../../Plugin_VideoOGL/Src/cocoaGL.h:1, from Source/Plugins/Plugin_VideoSoftware?/Src/GLUtil.h:55, from Source/Plugins/Plugin_VideoSoftware?/Src/HwRasterizer?.h:24, from Source/Plugins/Plugin_VideoSoftware?/Src/DebugUtil?.cpp:27:
/System/Library/Frameworks/AppKit?.framework/Headers/NSFontDescriptor.h:60: error: expected unqualified-id before ',' token /System/Library/Frameworks/AppKit?.framework/Headers/NSFontDescriptor.h:60: confused by earlier errors, bailing out scons: Build/Darwin-i386-release/Source/Plugins/Plugin_VideoSoftware/Src/DebugUtil.os? Error 1 '

Comment by cem.dinckol, Oct 20, 2009

this all doesn't sound much promising. Anyone tried to run the windows version in vmware under Mac ? Guess the performance won't be that great, would appreciate if someone can share his experience before I attempt to install everything.

Thanks.

Comment by Sonicadvance1, Oct 26, 2009

Eh, This is very outdated. Maybe I'll update it once I get my laptop back.

Comment by WestonFagans, Oct 28, 2009

Ok I have gotten up to the compile with scons part and i keep getting this error message plz help macbook-pro-15:dolphin-emu-read-only wes$ cd dolphin-emu-read-only -bash: cd: dolphin-emu-read-only: No such file or directory

Comment by xymostech, Oct 31, 2009

Weston, you don't need to type "cd dolphin-emu-read-only" again because you're already in that directory. Just type "scons" when you get to the point that you're at.

Comment by fhuguet79, Nov 08, 2009

Hi, I have a problem compiling Dolphin on Snow Leopard with the last svn build :

I get these errors :

"In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:8,

from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12, from Source/Plugins/Plugin_VideoSoftware?/Src/../../Plugin_VideoOGL/Src/cocoaGL.h:1, from Source/Plugins/Plugin_VideoSoftware?/Src/GLUtil.h:55, from Source/Plugins/Plugin_VideoSoftware?/Src/HwRasterizer?.h:24, from Source/Plugins/Plugin_VideoSoftware?/Src/DebugUtil?.cpp:27:
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:180: error: stray '@' in program In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:6,
from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:5, from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10, from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12, from Source/Plugins/Plugin_VideoSoftware?/Src/../../Plugin_VideoOGL/Src/cocoaGL.h:1, from Source/Plugins/Plugin_VideoSoftware?/Src/GLUtil.h:55, from Source/Plugins/Plugin_VideoSoftware?/Src/HwRasterizer?.h:24, from Source/Plugins/Plugin_VideoSoftware?/Src/DebugUtil?.cpp:27:
/System/Library/Frameworks/Foundation.framework/Headers/NSZone.h:8: error: stray '@' in program "

I suppose i have to include objective C files but i dont know how to do with scons ...

Can someone help me ? Thank you

Comment by Ikonicm...@gmail.com, Nov 08, 2009

Hi, I'm hitting the same error, having followed all the way up to the comment on Oct 16, 2009 by celgil...@gmail...

It's giving me NameError?? that wxmods is not defined.

I've updated all sources (macports etc) as far as I can,, i'm using dolphin svn 4524 on Snow Leopard, with macbook pro 2.4ghz c2duo 17" geforce 8600M GT

Here's the command I'm running and the result:

# scons verbose=yes wxconfig=/usr/local/bin/wx-config CC=gcc-4.2 CXX=g++-4.2

scons: Reading SConscript files ... Checking for pkg-config version > 0.15.0... yes Looking for macports... (cached) Adding port lib and include path(cached) yes Looking for fink... (cached) no Checking for sdl lib version > 1.0.0... (cached) yes Checking for bluez... (cached) Looking for framework bluez... Using pkg-config for bluez... no Looking for lib bluez... no Checking for ao... (cached) Looking for framework ao... Using pkg-config for ao... yes Checking for alsa... (cached) Looking for framework alsa... Using pkg-config for alsa... no Looking for lib alsa... no Checking for sfml-network... (cached) Looking for framework sfml-network... Using pkg-config for sfml-network... no Looking for lib sfml-network... no NameError??: name 'wxmods' is not defined:

File "/Users/me/dolphin-emu-read-only/SConstruct", line 312: env'HAVE_WX'? = conf.CheckWXConfig('2.8', wxmods, 0)

Can anyone help?
(btw, simply running the Xcode project in the /Sources folder of ~/dolphin-emu-read-only produces 266 errors. How are some getting it to compile in snow leopard?)
Comment by mailiam, Nov 09, 2009

@lkonicm...

try editing line 312 in the SConstruct

to : env'HAVE_WX'? = conf.CheckWXConfig('2.8','core', 'base' , 'gl'?, 0)

Comment by Ikonicm...@gmail.com, Nov 09, 2009

Thanks, ok, on line 312 with your corrections it was giving me an error "TypeError?: CheckWXConfig() takes at most 4 arguments (6 given):"

so I eliminated 'core', and 'base', making line 312 now read: env'HAVE_WX'? = conf.CheckWXConfig('2.8','gl', 0)

and it compiled a little further up to: ... Looking for lib Cg... no Plugin_VideoOGL must have Cg framework from nvidia to be build

scons: File "/Users/me/dolphin-emu-read-only/Source/Plugins/Plugin_VideoSoftware?/Src/SConscript", line 55, in <module>

I have installed the Cg-2.2.0010 package, so I don't know why it cannot find it, any thoughts?

Comment by jamesdonnelly12, Nov 09, 2009

I'm having the exact same problem. However, when I use mailiam's fix, it gives me a syntax error at that line. Help?

Comment by jamesdonnelly12, Nov 09, 2009

Wait, nevermind, I fixed that. But I still get the "takes at most 4 arguments" error, and I don't make it any farther by eliminating core and base.

Comment by Ikonicm...@gmail.com, Nov 09, 2009

what does your line 312 read now? have you also eliminated wxmods? Check out mine above. (btw the ? marks appearing in the text lines in this forum are not to be included, they're extra's from the forum)

Comment by jamesdonnelly12, Nov 09, 2009

I messed with it and I managed to get farther, to where it tells me I don't have cg installed, even though I do... Looks like you're not the only one with that problem.

Comment by seacreat...@rocketmail.com, Nov 09, 2009

Does anyone know why in the terminal: $ svn co svn://connect.creativelabs.com/OpenAL/trunk/OpenAL-MacOSX gets the result of: -bash: svn: command not found? I am not a programmer, and any help is appreciated... Im on tiger, macbook... everything worked untill now...and how does one "compile with Xcode"?

Comment by jamesdonnelly12, Nov 09, 2009

Can't answer your first question because I'm not great at this either, but to compile in xcode, you just have to open up the .xcodeproj file in XCode and select Build. do this after you use scons.

Comment by seacreat...@rocketmail.com, Nov 10, 2009

is there a different svn://connect.creativelabs.com/OpenAL/trunk/OpenAL-MacOSX the terminal app says no such file or directory....

Comment by mailiam, Nov 10, 2009

oops.. sorry there was a typing error before

i meant env['HAVE_WX'] = conf.CheckWXConfig('2.8',['adv', 'core', 'base' , 'gl'], 0)

google translated \[ incorrectedly...

Comment by Ikonicm...@gmail.com, Nov 10, 2009

Yep, that new line works fine. However I'm still hitting the same wall with OpenGL not compiling

"...Plugin_VideoOGL must have Cg framework from nvidia to be build

scons: File "/Users/me/dolphin-emu-read-only/Source/Plugins/Plugin_VideoSoftware?/Src/SConscript", line 55, in <module>"

Line 55 in the sconstruct is " basedir + 'Externals/SOIL'," but that list is fed by a prior path input " include_paths = [ " I wonder if it's just a paths issue, or if there's something happening that no one has mentioned, as in a need to compile some sort of OpenGL plugin prior to trying to compile Dolphin. Interestingly I ran this whole process on my friend's 10.5.8 machine and hit the same exact error. I tried installing both the nvidia developer cg 2.0... and the new cg 2.2, and neither made a difference.

Comment by mailiam, Nov 10, 2009

im not so sure but try removing 'gl' from the arguments

im not expert on this and i'm still having trouble building in 10.5.8

Comment by c4cummings, Nov 11, 2009

Does anyone know how to actually install the cg download? When I try to launch the cg application after downloading it, a notice pops up saying that "This installer requires admin privileges to run." The only option is to click "quit." I've gotten to that same line as Ikonicm...@gmail.com two posts up saying that I need the Cg framework. Thanks.

Comment by Ikonicm...@gmail.com, Nov 11, 2009

yeah I had the same problem with the 2.0, you need the 2.2 available at http://developer.nvidia.com/object/cg_download.html

There's additional stuff to read through at http://www.macscene.net/forums/viewtopic.php?f=6&t=580&st=0&sk=t&sd=a&sid=dd4503046bdf01a8fa15c06d7342f7e9&start=40

Though it seems the latest information is here in this current wiki.

Comment by celgil...@gmail.com, Nov 12, 2009

dolphin-svn seems to be badly broken for Snow Leopard (Mac OS X 10.6) and XCode 3.2.1

I installed 'wxwidgets 2.9-svn', since this version works on Mac OS X 10.6 (and 2.8 doesn't compile from the macports) to /usr/local/ (default) and the required libraries and programs (scons etc.) via Macports 1.8.1

Then trying to compile dolphin-svn with command: #scons verbose=yes wxconfig=/usr/local/bin/wx-config osx=64cocoa

it stops after a while with errors. Here are the last lines of error (there are hundreds more!!!):

/System/Library/Frameworks/AppKit?.framework/Headers/NSFont.h:186: error: expected constructor, destructor, or type conversion before '' token /System/Library/Frameworks/AppKit?.framework/Headers/NSFont.h:190: error: expected constructor, destructor, or type conversion before '' token In file included from /System/Library/Frameworks/AppKit?.framework/Headers/AppKit?.h:28,

from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13, from Source/Plugins/Plugin_VideoSoftware?/Src/../../Plugin_VideoOGL/Src/cocoaGL.h:1, from Source/Plugins/Plugin_VideoSoftware?/Src/GLUtil.h:55, from Source/Plugins/Plugin_VideoSoftware?/Src/HwRasterizer?.h:24, from Source/Plugins/Plugin_VideoSoftware?/Src/DebugUtil?.cpp:27:
/System/Library/Frameworks/AppKit?.framework/Headers/NSFontDescriptor.h:60: error: expected unqualified-id before ',' token /System/Library/Frameworks/AppKit?.framework/Headers/NSFontDescriptor.h:60: confused by earlier errors, bailing out scons: Build/Darwin-i386-release/Source/Plugins/Plugin_VideoSoftware/Src/DebugUtil.os? Error 1 scons: building terminated because of errors.

It seems to be a incompatibility problem, even setting the compiler flag DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_5 doesn't seem to work....

Any suggestions ?

Comment by fhuguet79, Nov 12, 2009

I have the same errors :(

Comment by jamesdonnelly12, Nov 13, 2009

THANK YOU MAILIAM. Your fix got me a lot farther, even past the cg error!! But now it seems like I'm having an OpenAL issue. I now get this error:

Source/Core/AudioCommon?/Src/CoreAudioSoundStream?.cpp:29: warning: unused variable 'remaining' Source/Core/AudioCommon?/Src/CoreAudioSoundStream?.cpp: In member function 'bool CoreAudioSound?::CoreAudioInit?()': Source/Core/AudioCommon?/Src/CoreAudioSoundStream?.cpp:91: error: 'kAudioUnitProperty_ShouldAllocateBuffer?' was not declared in this scope scons: Build/Darwin-i386-release/Source/Core/AudioCommon/Src/CoreAudioSoundStream.o? Error 1 scons: building terminated because of errors.

Comment by Ikonicm...@gmail.com, Nov 15, 2009

@ c4cummings: using celgil..'s build command scons verbose=yes wxconfig=/usr/local/bin/wx-config osx=64cocoa

gets us past the CG framework error and takes us into the actual compile. It terminates now with similar error as celgil.., listed above, but not the same.. actually looks to be a path error in the Plugin_VideoSoftware?/Src h and cpp files?

These are the only error lines I appear to have at this point,, not regarding warning lines, there only appears to be 5 errors lines.

In file included from Source/Plugins/Plugin_VideoSoftware?/Src/HwRasterizer?.h:24,

from Source/Plugins/Plugin_VideoSoftware?/Src/DebugUtil?.cpp:27:
Source/Plugins/Plugin_VideoSoftware?/Src/GLUtil.h:55:21: error: cocoaGL.h: No such file or directory In file included from Source/Plugins/Plugin_VideoSoftware?/Src/HwRasterizer?.h:24,
from Source/Plugins/Plugin_VideoSoftware?/Src/DebugUtil?.cpp:27:
Source/Plugins/Plugin_VideoSoftware?/Src/GLUtil.h:89: error: ISO C++ forbids declaration of 'NSWindow' with no type Source/Plugins/Plugin_VideoSoftware?/Src/GLUtil.h:89: error: expected ';' before '' token Source/Plugins/Plugin_VideoSoftware?/Src/GLUtil.h:90: error: ISO C++ forbids declaration of 'NSOpenGLContext' with no type Source/Plugins/Plugin_VideoSoftware?/Src/GLUtil.h:90: error: expected ';' before '' token Source/Plugins/Plugin_VideoSoftware?/Src/DebugUtil?.cpp: In function 'void DebugUtil?::DumpEfb?(const char)': Source/Plugins/Plugin_VideoSoftware?/Src/DebugUtil?.cpp:126: warning: unused variable 'result' Source/Plugins/Plugin_VideoSoftware?/Src/DebugUtil?.cpp: In function 'void DebugUtil?::DumpDepth?(const char)': Source/Plugins/Plugin_VideoSoftware?/Src/DebugUtil?.cpp:146: warning: unused variable 'result' scons: Build/Darwin-i386-release/Source/Plugins/Plugin_VideoSoftware/Src/DebugUtil.os? Error 1 scons: building terminated because of errors.



I'm running snow leopard 10.6.2, and latest svn of wxwidgets and dolphin as of Nov 15

Comment by celgil...@gmail.com, Nov 16, 2009

@lkonicm: You need to edit line 55 of file "Source/Plugins/Plugin_VideoSoftware??/Src/GLUtil.h" so that it finds "cocoaGL.h". Here is the block code (line 53-56):

#elif defined(HAVE_COCOA) && HAVE_COCOA #include <GL/glew.h> #include "../../Plugin_VideoOGL/Src/cocoaGL.h" #endif // end USE_WX

but then it fails with all the errors I posted on Nov 12, 2009

Comment by celgil...@gmail.com, Nov 17, 2009

Some Mac OS X10.6 Snow Leopard progress: Adding CFLAGS flags '-mmacosx-version-min=10.5', '-isysroot /Developer/SDKs/MacOSX10.5.sdk' to built of "64cocoa" will compile fine (but breaks at Audiocommon errors):

    compileFlags += , 'x86_64', '-m64', '-mmacosx-version-min=10.5', '-isysroot /Developer/SDKs/MacOSX10.5.sdk' 

But before invoking the 'scons' command, you must type this first on Snow Leo:

   export MACOSX_DEPLOYMENT_TARGET="10.5"

So we for SConstruct change "osx 64 specifics" to:

#osx 64 specifics
if sys.platform == 'darwin':
    if env['osx'] == '64cocoa':
        compileFlags += ['-arch' , 'x86_64', '-m64', '-mmacosx-version-min=10.5', '-isysroot /Developer/SDKs/MacOSX10.5.sdk' ]
        conf.Define('MAP_32BIT', 0)
    if env['osx'] == '32cocoa':
    ....
Comment by theevilenginerer, Nov 17, 2009

can somebody explain me how to compile the video plugin and libglew for my 64 bit installation of mac os x leopard? sorry, but i'm noob about compilation!

Comment by jamesdonnelly12, Nov 18, 2009

Could somebody possibly point me to a pre-compiled version of OpenAL that works for dolphin compilation? I think this may be what causes my problem, because when I compiled OAL it gave me like 40 warnings...

Comment by jamesdonnelly12, Nov 18, 2009

It seemed like Terminal couldn't check out the full SVN, and I've tried several times.

Comment by Ikonicm...@gmail.com, Nov 19, 2009

@enginer.. my understanding is that the video plugin gets compiled during your dolphin compile @james .. I don't know of a pre-compiled OpenAL. I think we just need a pro to troubleshoot that area of the compile, and also stay up with the latest svn of OpenAL and 'hope' they're pushing snow leopard compatibility. Mine seemed to have downloaded in full. At the end of the checkout command did it say "checked out revision 1861" (1861 is current version)?

Comment by seiwoong.park, Nov 20, 2009

hi sorry, i know my comment dosen't belong here, but googling the question for a few hours turned up nothing i try running zerowii on snow leopard, but when i double click on the program, the program just closes out before a UI can load does anybody have a solution to this?

Comment by frankrosay, Nov 21, 2009

Hi, i have this error : Error: The following dependencies failed to build: libsdl_mixer tiff Error: Status 1 encountered during processing. After typing "sudo port install libao cairo scons wxwidgets glew" in the terminal. I have install the macport/OpenAL/Nvidia toolkik and drag the sdl.framework in the right folder. Someone can help me, please ?

Comment by theevilenginerer, Nov 22, 2009

can somebody explain me what means "add "-arch x86_64" as compilateur and linker flags"?

Comment by faqer8890, Nov 23, 2009

NameError?: name 'wxmods' is not defined:

File "/Users/me/dolphin-emu-read-only/SConstruct", line 311:
env'HAVE_WX'? = conf.CheckWXConfig('2.8', wxmods, 0)

What does this mean? And if I were to edit anything, how would I do it?

Comment by k-fran...@hotmail.fr, Nov 24, 2009

@celgil congrats! you are doing a nice job I got up to your message of November 17 but I can't figure out where to implement all these lines

Comment by celgil...@gmail.com, Nov 24, 2009

@k-fran...@hotmail.fr you are right! You need to edit "SConstruct" on top of the root directory of dolphin-emu-read-only/ then you will see the #os 64 specifics, like this:

Edit "SConstruct"

#osx 64 specifics
if sys.platform == 'darwin':
    if env['osx'] == '64cocoa':
        # compileFlags += ['-arch' , 'x86_64', '-m64', '-mmacosx-version-min=10.5', '-isysroot /Developer/SDKs/MacOSX10.5.sdk' ]
        compileFlags += ['-arch' , 'x86_64', '-m64', '-mmacosx-version-min=10.5', '-isysroot /Developer/SDKs/MacOSX10.5.sdk' ]
        conf.Define('MAP_32BIT', 0)
    if env['osx'] == '32cocoa':
        compileFlags += ['-arch' , 'i386', '-m32', '-mmacosx-version-min=10.5', '-isysroot /Developer/SDKs/MacOSX10.5.sdk' ]
    if not env['osx'] == '32x11':
        env['HAVE_X11'] = 0
        env['HAVE_COCOA'] = 
Comment by k-fran...@hotmail.fr, Nov 24, 2009

@celgil

Thanks i got that working (i used command-f to find the lines) now I am having this error, probably the same as yours:

Source/Core/AudioCommon?/Src/WaveFile?.h:35: error: ISO C++ forbids declaration of 'FILE' with no type Source/Core/AudioCommon?/Src/WaveFile?.h:35: error: expected ';' before '' token In file included from Source/Core/AudioCommon?/Src/AOSoundStream.h:24,

from Source/Core/AudioCommon?/Src/AOSoundStream.cpp:20:
/opt/local/include/ao/ao.h:81: error: ISO C++ forbids declaration of 'FILE' with no type /opt/local/include/ao/ao.h:81: error: expected ';' before '' token Source/Core/AudioCommon?/Src/AOSoundStream.cpp: In member function 'virtual void AOSound::SoundLoop?()': Source/Core/AudioCommon?/Src/AOSoundStream.cpp:39: error: 'NULL' was not declared in this scope Source/Core/AudioCommon?/Src/AOSoundStream.cpp: In function 'void soundThread(void)': Source/Core/AudioCommon?/Src/AOSoundStream.cpp:67: error: 'NULL' was not declared in this scope Source/Core/AudioCommon?/Src/AOSoundStream.cpp: In member function 'virtual bool AOSound::Start()': Source/Core/AudioCommon?/Src/AOSoundStream.cpp:72: error: 'memset' was not declared in this scope Source/Core/AudioCommon?/Src/AOSoundStream.cpp: In member function 'virtual void AOSound::Clear()': Source/Core/AudioCommon?/Src/AOSoundStream.cpp:87: error: 'memset' was not declared in this scope Source/Core/AudioCommon?/Src/AOSoundStream.cpp: In member function 'virtual void AOSound::Stop()': Source/Core/AudioCommon?/Src/AOSoundStream.cpp:100: error: 'NULL' was not declared in this scope scons: Build/Darwin-i386-release/Source/Core/AudioCommon/Src/AOSoundStream.o? Error 1 scons: building terminated because of errors.

Is there a way to compile without audio or something? thanks

Comment by c4cummings, Nov 25, 2009

Made an attempt at bypassing the cg admin requirement and made all (I think) of the edits in SConstruct that have been posted and came up with this error. I have no idea what do do about this.

scons: Path for option wxconfig does not exist: /usr/local/bin/wx-config File "/Users/chad/dolphin-emu-read-only/SConstruct", line 160, in <module>

Thanks

Comment by celgil...@gmail.com, Nov 25, 2009

@c4cummings: the error you get is that you don't have wxwidgets installed in /usr/local/bin yet (SConstruct checks if the application "wx-config" is there):

If you have Mac OS X 10.5.x just install wxWidgets 2.8.9 via Macports 1.8.1, this will install it in /opt/local/bin/ (use command "sudo port install wxwidgets")

If you have Mac OS X 10.6.x wxWidgets 2.8.9 from Macports will not compile...but you can download from the wxWidgets-2.9-svn (the development version), which will then install by default in /usr/local/bin (Install wxWidgets-2.9-svn with this small script:

#!/bin/bash
WXWIDGETS_DIR=/Downloads/wxwidgets-2.9/wxWidgets/

svn checkout http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk $WXWIDGETS_DIR

cd $WXWIDGETS_DIR
./configure --with-osx_cocoa --with-sdl --with-opengl --disable-sdltest --with-libjpeg --with-libtiff --with-libpng --enable-unicode --enable-display

Then on OS X 10.6 to compile dolphin-svn with wxWidgets-2.9-svn (after svn checkout, of course :-)

scons verbose=yes wxconfig=/usr/local/bin/wx-config osx=64cocoa noao=true

Ok we get compilation problems for AudioCommon? etc. (check k-fran...@hotmail.fr post), but anyway this could be fixed...need more time though

On OS X 10.5.x if you have wxWidgets 2.8.9 via Macports installed, compile dolphin-svn via:

scons verbose=yes wxconfig=/opt/local/bin/wx-config CC=gcc-4.2 CXX=g++-4.2

hope this helps

Comment by webmas...@ibctx.org, Nov 25 (6 days ago)

Im stuck at:

Plugin_VideoOGL must have Cg framework from nvidia to be build

scons: File "/Users/davidvanronk/dolphin-emu-read-only/Source/Plugins/Plugin_VideoSoftware?/Src/SConscript", line 55, in <module>

Please help

Comment by metalldragon, Nov 26 (6 days ago)

@celgil, not every SnowLeopard? Installation ist 64bit! so I had to change Sconstruct from

if sys.platform == 'darwin':
    if env['osx'] == '64cocoa':
        wxmods = ['adv', 'core', 'base']

to:

if sys.platform == 'darwin':
    if env['osx'] == '64cocoa':
        wxmods = ['adv', 'core', 'base']
    if env['osx'] == '32cocoa':
        wxmods = ['adv', 'core', 'base']

(don't know how to do an "or" in those scripts, "||" doesn't seem to work)

Now, I get this error:

/usr/local/include/wx-2.9/wx/event.h: In member function 'void CFrame::PostEvent(wxCommandEvent&)':
/usr/local/include/wx-2.9/wx/event.h:2961: error: 'virtual void wxEvtHandler::AddPendingEvent(const wxEvent&)' is inaccessible
Source/Core/DolphinWX/Src/Frame.cpp:527: error: within this context
/usr/local/include/wx-2.9/wx/event.h: In member function 'void CFrame::PostMenuEvent(wxMenuEvent&)':
/usr/local/include/wx-2.9/wx/event.h:2961: error: 'virtual void wxEvtHandler::AddPendingEvent(const wxEvent&)' is inaccessible
Source/Core/DolphinWX/Src/Frame.cpp:534: error: within this context
/usr/local/include/wx-2.9/wx/event.h: In member function 'void CFrame::PostUpdateUIEvent(wxUpdateUIEvent&)':
/usr/local/include/wx-2.9/wx/event.h:2961: error: 'virtual void wxEvtHandler::AddPendingEvent(const wxEvent&)' is inaccessible
Source/Core/DolphinWX/Src/Frame.cpp:538: error: within this context
Source/Core/DolphinWX/Src/Frame.cpp: In member function 'virtual void CFrame::Update()':
Source/Core/DolphinWX/Src/Frame.cpp:776: warning: unused variable 'CompareTime'
scons: *** [Build/Darwin-i386-release/Source/Core/DolphinWX/Src/Frame.o] Error 1

while browsing the SConstruct file I found "nowx" so I did

scons nowx=true osx=32cocoa noao=true

which gives me:

In file included from Source/Plugins/Plugin_VideoSoftware/Src/HwRasterizer.h:24,
                 from Source/Plugins/Plugin_VideoSoftware/Src/DebugUtil.cpp:27:
Source/Plugins/Plugin_VideoSoftware/Src/GLUtil.h:55:21: error: cocoaGL.h: No such file or directory
In file included from Source/Plugins/Plugin_VideoSoftware/Src/HwRasterizer.h:24,
                 from Source/Plugins/Plugin_VideoSoftware/Src/DebugUtil.cpp:27:
Source/Plugins/Plugin_VideoSoftware/Src/GLUtil.h:89: error: ISO C++ forbids declaration of 'NSWindow' with no type
Source/Plugins/Plugin_VideoSoftware/Src/GLUtil.h:89: error: expected ';' before '*' token
Source/Plugins/Plugin_VideoSoftware/Src/GLUtil.h:90: error: ISO C++ forbids declaration of 'NSOpenGLContext' with no type
Source/Plugins/Plugin_VideoSoftware/Src/GLUtil.h:90: error: expected ';' before '*' token
Source/Plugins/Plugin_VideoSoftware/Src/DebugUtil.cpp: In function 'void DebugUtil::DumpEfb(const char*)':
Source/Plugins/Plugin_VideoSoftware/Src/DebugUtil.cpp:126: warning: unused variable 'result'
Source/Plugins/Plugin_VideoSoftware/Src/DebugUtil.cpp: In function 'void DebugUtil::DumpDepth(const char*)':
Source/Plugins/Plugin_VideoSoftware/Src/DebugUtil.cpp:146: warning: unused variable 'result'
scons: *** [Build/Darwin-i386-release/Source/Plugins/Plugin_VideoSoftware/Src/DebugUtil.os] Error 1
scons: building terminated because of errors.

Now I wonder why it can't find "cocoaGL.h" any clues?

Comment by celgil...@gmail.com, Nov 26 (5 days ago)

Just add "cocoaGL.h" from "Source/Plugins/Plugin_VideoOGL/Src/" I tried to fix this but then it stops for AudioCommon? error...

Comment by metalldragon, Nov 26 (5 days ago)

where should I add it? I copied it over from the Src folder you mentioned to "Source/Plugins/Plugin_VideoSoftware?/Src/" now I get like a million errors, all are something like these:

/System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:235: error: expected constructor, destructor, or type conversion before 'extern'
/System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:236: error: expected constructor, destructor, or type conversion before '*' token
Comment by rasatavohary, Nov 27 (4 days ago)

THIS DOES NOT BUILD UNDER MACOSX !!!! WHY IS THERE NOT A DIFFERENT SVN BRANCH FOR MACOXS AND WINDOWS ?????????!!!!!!

Comment by ApPeL268576, Nov 29 (2 days ago)
jamesdonnelly12, I seem to be getting the same error as you.

Did you find a way around that yet?

Regards

Comment by matthijndijkstra, Nov 29 (2 days ago)

I get this error as well

Plugin_VideoOGL must have Cg framework from nvidia to be build

scons: *** 
File "/Users/matthijn/Desktop/source/dolphin-emu-read-only/Source/Plugins/Plugin_VideoSoftware/Src/SConscript", line 55, in <module>

But I have installed the CG install from above, tried multiple versions.. And when I look in de Library/Framworks path there is a dir with the files CG.frameworks, so it should be there is suppose.

Comment by tavys.ashcroft, Nov 29 (2 days ago)

I've gone through most of the errors on this page, but step by step I get a little farther.

I'm now using wxWidgets that I built from (top of trunk) source to make sure it has cocoa support. I used some hints from this page http://wiki.wxwidgets.org/Development:_wxMac

$ svn checkout http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk wxWidgets
$ cd wxWidgets 
$ arch_flags="-arch i386"
$ ./configure CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" LDFLAGS="$arch_flags" OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags" -with-osx_cocoa
$ make
$ sudo make install

Then, when I go to build dolphin

$ scons verbose=yes wxconfig=/usr/local/bin/wx-config osx=64cocoa`

I get this error.

scons: building associated VariantDir targets: Build/Darwin-i386-release
g++ -o Build/Darwin-i386-release/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.o -c -fno-exceptions -fno-strict-aliasing -msse2 -Wall -Wwrite-strings -Wshadow -Wpointer-arith -Wpacked -Wno-conversion -fvisibility-inlines-hidden -fno-exceptions -fno-strict-aliasing -msse2 -Wall -Wwrite-strings -Wshadow -Wpointer-arith -Wpacked -Wno-conversion -arch x86_64 -m64 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DGCC_HASCLASSVISIBILITY -D_GNU_SOURCE=1 -D_THREAD_SAFE -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__ -ISource/Core/Common/Src -ISource/Core/DiscIO/Src -ISource/PluginSpecs -ISource/Core/Core/Src -ISource/Core/DebuggerWX/Src -IExternals/Bochs_disasm -IExternals/LZO -IExternals/SOIL -IExternals/Lua -IExternals/WiiUseSrc/Src -ISource/Core/VideoCommon/Src -ISource/Core/InputCommon/Src -ISource/Core/AudioCommon/Src -ISource/Core/DebuggerUICommon/Src -ISource/Core/DSPCore/Src -I/opt/local/include -I/opt/local/include/SDL -I/usr/local/lib/wx/include/osx_cocoa-unicode-2.9 -I/usr/local/include/wx-2.9 Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp
In file included from Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp:53:
Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_stm.h: In member function 'virtual bool CWII_IPC_HLE_Device_stm_immediate::IOCtl(u32)':
Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_stm.h:74: warning: unused variable 'BufferIn'
Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_stm.h:75: warning: unused variable 'BufferInSize'
In file included from Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp:57:
Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.h: In constructor 'CWII_IPC_HLE_Device_usb_oh1_57e_305::CtrlBuffer::CtrlBuffer(u32)':
Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.h:155: warning: NULL used in arithmetic
Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp: In function 'void WII_IPC_HLE_Interface::Reset(bool)':
Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp:118: error: no matching function for call to 'std::map<unsigned int, IWII_IPC_HLE_Device*, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, IWII_IPC_HLE_Device*> > >::erase(std::_Rb_tree_const_iterator<std::pair<const unsigned int, IWII_IPC_HLE_Device*> >&, std::_Rb_tree_iterator<std::pair<const unsigned int, IWII_IPC_HLE_Device*> >)'
/usr/include/c++/4.2.1/bits/stl_map.h:453: note: candidates are: void std::map<_Key, _Tp, _Compare, _Alloc>::erase(typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename _Alloc::rebind<std::pair<const _Key, _Tp> >::other>::iterator) [with _Key = unsigned int, _Tp = IWII_IPC_HLE_Device*, _Compare = std::less<unsigned int>, _Alloc = std::allocator<std::pair<const unsigned int, IWII_IPC_HLE_Device*> >]
/usr/include/c++/4.2.1/bits/stl_map.h:468: note:                 typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename _Alloc::rebind<std::pair<const _Key, _Tp> >::other>::size_type std::map<_Key, _Tp, _Compare, _Alloc>::erase(const _Key&) [with _Key = unsigned int, _Tp = IWII_IPC_HLE_Device*, _Compare = std::less<unsigned int>, _Alloc = std::allocator<std::pair<const unsigned int, IWII_IPC_HLE_Device*> >]
/usr/include/c++/4.2.1/bits/stl_map.h:483: note:                 void std::map<_Key, _Tp, _Compare, _Alloc>::erase(typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename _Alloc::rebind<std::pair<const _Key, _Tp> >::other>::iterator, typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename _Alloc::rebind<std::pair<const _Key, _Tp> >::other>::iterator) [with _Key = unsigned int, _Tp = IWII_IPC_HLE_Device*, _Compare = std::less<unsigned int>, _Alloc = std::allocator<std::pair<const unsigned int, IWII_IPC_HLE_Device*> >]
Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp: In function 'void WII_IPC_HLE_Interface::Update()':
Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp:429: warning: NULL used in arithmetic
Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp:438: warning: NULL used in arithmetic
Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp:450: warning: declaration of '_Reply' shadows a previous local
Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp:428: warning: shadowed declaration is here
Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp:451: warning: NULL used in arithmetic
scons: *** [Build/Darwin-i386-release/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.o] Error 1
scons: building terminated because of errors.

This is different form any of the errors I've seen on this discussion so far.

Comment by celgil...@gmail.com, Nov 30 (2 days ago)

If you follow SonicAdvance1? advice it should work on OSX with Snow Leopard, but without wxWidgets...though I couldn't find out...see here: http://code.google.com/p/dolphin-emu/issues/detail?id=889

I tried with these built commands (nowx=true > turns OFF wxWidgets) on Snow Leo, but get a lot of errors: #scons verbose=yes osx=64cocoa jittest=true nowx=true #scons verbose=yes jittest=true nowx=true

any help greatly appreciated :-)

Comment by evertonrubronegro, Nov 30 (46 hours ago)

Resident Evil Code Veronica ha you could fix graphical glitches in both plugins

Comment by the.phan...@verizon.net, Yesterday (18 hours ago)

Sorry, I mean:

Source/Core/DolphinWX/Src/Frame.cpp:297: warning:   when initialized here
Source/Core/DolphinWX/Src/Frame.h:196: warning: 'CFrame::m_bNoDocking' will be initialized after
Source/Core/DolphinWX/Src/Frame.h:78: warning:   'bool CFrame::bRenderToMain'
Source/Core/DolphinWX/Src/Frame.cpp:297: warning:   when initialized here
Source/Core/DolphinWX/Src/Frame.h:112: warning: 'CFrame::bFloatConsoleWindow' will be initialized after
Source/Core/DolphinWX/Src/Frame.h:99: warning:   'bool CFrame::HaveLeds'
Source/Core/DolphinWX/Src/Frame.cpp:297: warning:   when initialized here
Source/Core/DolphinWX/Src/Frame.cpp:375: warning: declaration of 'aNormalFile' shadows a member of 'this'
Source/Core/DolphinWX/Src/Frame.cpp:396: warning: declaration of 'int pos' shadows a parameter
Source/Core/DolphinWX/Src/Frame.cpp:297: warning: shadowed declaration is here
/usr/local/include/wx-2.9/wx/event.h: In member function 'void CFrame::PostEvent(wxCommandEvent&)':
/usr/local/include/wx-2.9/wx/event.h:2968: error: 'virtual void wxEvtHandler::AddPendingEvent(const wxEvent&)' is inaccessible
Source/Core/DolphinWX/Src/Frame.cpp:527: error: within this context
/usr/local/include/wx-2.9/wx/event.h: In member function 'void CFrame::PostMenuEvent(wxMenuEvent&)':
/usr/local/include/wx-2.9/wx/event.h:2968: error: 'virtual void wxEvtHandler::AddPendingEvent(const wxEvent&)' is inaccessible
Source/Core/DolphinWX/Src/Frame.cpp:534: error: within this context
/usr/local/include/wx-2.9/wx/event.h: In member function 'void CFrame::PostUpdateUIEvent(wxUpdateUIEvent&)':
/usr/local/include/wx-2.9/wx/event.h:2968: error: 'virtual void wxEvtHandler::AddPendingEvent(const wxEvent&)' is inaccessible
Source/Core/DolphinWX/Src/Frame.cpp:538: error: within this context
Source/Core/DolphinWX/Src/Frame.cpp: In member function 'virtual void CFrame::Update()':
Source/Core/DolphinWX/Src/Frame.cpp:776: warning: unused variable 'CompareTime'
scons: *** [Build/Darwin-i386-release/Source/Core/DolphinWX/Src/Frame.o] Error 1
scons: building terminated because of errors.
Comment by the.phan...@verizon.net, Yesterday (18 hours ago)

OK, here's how far I got in Snow Leopard on a Whitebook (x64 Macbook)

I was able to compile for a long time by using this command:

scons verbose=yes wxconfig=/usr/local/bin/wx-config CC=gcc-4.2 CXX=g++-4.2 jittest=true osx=64cocoa

But eventually failed because of the errors above

Comment by josh.jpenguin, Today (4 hours ago)

+nowx=true

I got further

now it's complain the apples frameworks don't have correct syntax


Sign in to add a comment
Hosted by Google Code