[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Re: Mac OS X MIDI support success (MacPorts)




The problem I'm having is that it insists on trying to use Mac OS X 10.5 SDK, which doesn't even exist on my operating system (I'm trying to build this on Mac OS X 10.4, to assure backward compatibility, and I only have 10.3.9 and 10.4 SDKs installed). That's clearly not going to work.

I have tried everything I can think of, based on google searches, including:
$ export MACOSX_DEPLOYMENT_TARGET=10.4
$ export CMAKE_OSX_DEPLOYMENT_TARGET=10.4
$ export CMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.4.sdk
and even running the CMake GUI and overriding the path to the SDK before pressing Generate. It ignores everying and always uses a path to the nonexistent 10.5 SDK.

I don't know if this is a bug in CMake 2.8.6 or if portmidi's config insists on 10.5 or later.

It's presumably practical to build a binary installer for python.org's 64-bit python (Mac OS X 10.6 and later) that includes portmidi. I'm not sure it's doable for the 32-bit python.org python (MacOS X 10.3.9 and later) -- at least not without giving up 10.4 compatibility.

-- Russell

On Mar 5, 2012, at 11:53 AM, Christopher Arndt (by way of "Russell E. Owen" <rowen@xxxxxx>) wrote:

> On 02.03.2012 01:07, Russell E. Owen wrote:
>> My problem is that I just can't figure out how to build portmidi from 
>> source -- at least on Mac OS X 10.4 (which is my usual platform for 
>> building such installers, as it turns out to be more reliably backward 
>> compatible) with gcc 4.0.1 (required for Mac OS X 10.4). The 
>> instructions are here: 
>> <http://sourceforge.net/apps/trac/portmedia/wiki/Installing%20portmidi%20
>> on%20Mac> but they don't work.
> 
> What exactly isn't working? The instructions on the wiki are bogus, yes,
> but I was able to build portmidi from SVN on 10.6 with the following
> sequence of commands:
> 
> svn co
> https://portmedia.svn.sourceforge.net/svnroot/portmedia/portmidi/trunk
> portmidi
> cd portmidi
> cmake -G "Unix Makefiles"
> make
> 
> (Note: there's no '.' (dot) after the make command.)
> 
> This gives me libportmidi_s.a and libportmidi.dynlib, libpmjni.dynlib
> and the test programs compiled as well. I tested MIDI output with the
> 'test' program and fluidsynth and everything seemed ok.
> 
> I had installed a few programs and libraries with MacPorts before so I
> already had all the dependencies, in particular "cmake". I think cmake
> used the default C compiler gcc-4.2, but you should be able to specify
> the compiler to use with:
> 
> cmake -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc-4.0 -G "Unix Makefiles"
> 
> (I'm not sure if this is the correct way to do this, but it seems to 
> work.)
> 
> You may also need to set the SDK and the min OS X version (whatever that
> means) to use:
> 
> cmake -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc-4.0 \
>    -DCMAKE_C_FLAGS:STRING=-mmacosx-version-min=10.4 \
>    -DCMAKE_OSX_SYSROOT:PATH=/Developer/SDKs/MacOSX10.4u.sdk \
>    -G "Unix Makefiles"
> 
> Let me know, if these instructions work for you on 10.4 or if you want
> me to send you the static library compiled with gcc-4.0 and the above
> settings, to check if they work on 10.4.
> 
> 
> 
> Chris