SDL uses some functions that no longer work using the MacOSX10.7 SDK. I am not very familiar with MacPorts and I would like to know if there is a way to tell macports to build SDL using the 10.6 SDK instead.
If this is not possible, I can download the source and compile it myself, but again, I am not familiar with how to set the flags that I need. I would like a 32-bit build of SDL that uses the 10.6 SDK but runs on Lion.
I have successfully built SDL framework for ppc, i386 and x86_64 using the following diff: http://r.research.att.com/sdl-1.2.14.diff
and the project in SDL-1.2.14/Xcode/SDL/SDL.xcodeproj. The diff uses 10.5 SDK so if you don't have that, you can simply change the 10.5 line to 10.6 and remove ppc.
If you don't want to build it, a binary is available at http://r.research.att.com/libs/SDL-1.2.14-fw-darwin9-bin3.tar.gz - it works on OS X 10.5 and higher (i.e., including Lion).
(I gave up to trying to fix the configure + make build which is broken for OS X since it has a lot of stuff hard-coded that is many years out of date, because I needed it quickly...)
Related
Hi I would like to try out wxWidgets on Mac OS 9. Are there any directions on how to do this? I am looking at developing an application using the wxWidgets framework.
To target Mac OS 9 you will have to use an old (2.8 or maybe even earlier) Carbon-based wxMac version. Latest versions of wxWidgets use Cocoa and while 3.0 still includes Carbon support, it only targets 10.4 or later versions.
You will almost certainly need to find the corresponding vintage compiler to build it.
I'm trying to install/update my clang from Apple clang version 1.7 (tags/Apple/clang-77) (based on LLVM 2.9svn) to clang version 3.3. I've downloaded the pre-compiled binaries into usr/bin/, as suggested by other posts (How can I update clang to 3.3 on Mac OS X 10.6).
The point of this installation/update is to be able to use C++ code (not written by me, and written for a newer machine OS 10.8.x) on my mac. I would preferentially use Xcode to update this, but unfortunately, Apple has not made the necessary version of Xcode available for free without a developer's subscription.
I've edited my PATH and LD_LIBRARY_PATH to include clang3.3/bin/ and clang3.3/lib, but I get an "Illegal Instruction" error and it's not clear to me why this is.
What I'd really like is to try the whole process again from the beginning with a step-by-step outline of the process, like is seen here (How to install clang pre-built binaries ubuntu 12.04), except for Mac OSX system, not Ubuntu.
I realize there are some previous threads that ask almost the same question, but I am asking specifically for these versions (and from a standpoint that includes very little experience installing via terminal/understanding pathways/etc.).
Thanks for any help.
The readme for Xcode 3.2.5 (PDF) says:
Using the LLVM compiler requires the 10.6 SDK
Does this mean that the LLVM compiler (not LLVM GCC) can only be used to compile applications targeted at 10.6 and up, or just that the 10.6 SDK has to be present for the LLVM compiler to work?
You can target 10.5 using the LLVM compiler in either Xcode 3.2 or 4. I have been doing this for our control software for more than half a year, and it runs just fine on the Leopard machines we've deployed on.
As with all cases where you build with one SDK and target another, you'll need to verify that you don't use any features specific to the newer OS without appropriate runtime checks and / or weak linking of certain frameworks.
Based on a quick test, I was able to build a 10.5 app with LLVM using the latest Xcode, 3.2.5, which includes the 10.6 SDK. Having checked the product, the Info.plist records the minimum OS version as 10.5 and as far as I'm aware, the original choice of compiler has no effect on the way the OS runs the end product (as you'd expect). Unfortunately I don't have a 10.5 machine to test it on.
I'd therefore imagine that Apple just mean that LLVM ships with the 10.6 SDK.
I've spent some time today playing with getting the source for python 3.1.1 to build on my MacBook Pro using the --enable-framework and --enable-universalsdk options with no success. I will humbly admit that I have no real clue why I can't compile 3.1.1 on Snow Leopard, I did make sure to get the new Xcode version for Snow Leopard, and made sure I also installed the 10.4u SDK. It seems to be choking on the 10.4 SDK during the make stage, and has several error regarding headers for wchar, cursor, and ncursor during the configure stage. I have been able to get a make from a plain configure, and most the test pass, but that just isn't challenging enough. Has anyone else attempted to build python 3.1.1 on a Mac running Snow Leopard
There is an automated installer here: http://python.org/ftp/python/3.1.1/python-3.1.1.dmg
You need to set MACOSX_DEPLOYMENT_TARGET if you actually want to use an older SDK.
If you target 10.6, it may be that PPC building is not supported anymore, according to this bug report. In fact, that may be the case even if you target 10.4, using XCode 3.2 (haven't tried myself).
I don't have 10.6 installed yet so I can't say for sure it will work without issue but, in general, if you want to build a batteries-included framework build optimized for 10.6 of Python on OS X, you're best off using the installer build script in the source tree at Mac/BuildScript/build-installer.py after applying the patch in the bug report Martin referred to. Something like this should work [untested]:
./build-installer.py --sdk-path=/Developer/SDKs/MacOSX10.6.sdk --universal-archs=intel --dep-target=10.6 --src-dir=... --build-dir=...
That will build everything including dependent third-party libraries and the documentation but, be forewarned, you'll probably have to tweak things until you get it right and a few things aren't supported yet in 64-bit, most notably, tkinter. As mentioned above, the standard python.org 3.1.1 installer should likely work OK as long as you don't need 64-bit support.
[EDIT: I should clarify that, WRT 64-bit support, the problem isn't in tkinter, rather that the Apple-supplied versions of Tk in 10.5 and earlier were 32-bit only and so there was code in setup.py to prevent attempting to build a 64-bit version of tkinter on OSX. Perhaps that check can be removed now if the 10.6 Tk is 64-bit.]
Kenneth Reitz's soluton doesn't work for me. In fact, the install works fine but my default PATH still points to /usr/bin/python (v2.6.1.). I vaguely recall that we should be modifying our ~/.profile to point to /.../Frameworks and I expected the installer to do this for me (nope).
Anyway, /Library/Frameworks/Python.framework/Versions/3.1/bin exists so we could add it.
But I'm curious why the python bin in there does a crash and burn on me.
No time to resolve this now. Bye.
Before you ask, yes, I have a very good reason for wanting something to run on 10.3. It's a very small in-house project that must run on a very important person's machine, which cannot be upgraded for a very good reason. =)
The 10.6 DVD doesn't seem to offer an option to install the 10.3 SDK, only 10.4+. I also can't seem to find it on Apples website.
I found this tip about how to install it on 10.5, via the Xcode optional installs, but that doesn't seem to be the case for 10.6?
http://www.cocoabuilder.com/archive/cocoa/201508-10-3-9-sdk-with-xcode-2-5-on-leopard.html
Is it incompatible, or just not offered because it's so old? Must I use an earlier version of Xcode? Can I just try to install it via a <10.6 DVD?
You don't need the Mac OS X 10.3 SDK to build for Mac OS X 10.3. Just install the optional Mac OS X 10.4 (Universal) SDK, then:
Set your Base SDK to the Mac OS X 10.4 (Universal) SDK
Set your Compiler Version to GCC 4.0
Set your Mac OS X Deployment Target to Mac OS X 10.3 for the PowerPC architecture (using build setting conditions)
Carefully avoid any API that isn't on Mac OS X 10.3
This should be sufficient for building a Mac OS X application that will run on Mac OS X 10.3.9, even on Snow Leopard.
The 10.3.9 version number is important; if you're using any C++ in this application, Mac OS X 10.3.9 is the first version (and the only version of 10.3) that includes the Standard C++ Library in shared library form, which is required for using GCC 4.0 or later. Otherwise you'd have to use GCC 3.3, which is neither included nor supported with Xcode 3.2 on Snow Leopard.
On the other hand, C and Objective-C code may even run on earlier releases of Mac OS X 10.3. I can't think of a reason it wouldn't, but I haven't tried it myself. Even people sticking with a 6-year-old version of Mac OS X will use the most recent version of it, right?
If the 10.3 system is running 10.3.9, you may be able to use the optional 10.4u SDK for your build on 10.6 by setting the deployment target to 10.3 and sticking to gcc-4.0, rather than gcc-4.2, the 10.6 default. The python.org installers for OS X are intended to be built that way, that is, one executable that works on 10.3.9 through 10.6 (although, at the moment, there are still a few problems with building all variants on 10.6 so 10.5 is still used). Also the python builds are primarily using Carbon frameworks rather than Cocoa and they do not use Xcode to manage the building of the product. If you can't get Xcode to do it directly, you might be able to build from the command line.
export MACOSX_DEPLOYMENT_TARGET=10.3
/usr/bin/gcc-4.0 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc ...
It may be that the 10.3 SDK isn’t supported on 10.6 because 10.6 is intel-only. Also, 10.3 doesn’t support intel. Remember that 10.4 was the first OS to support intel, which is why that’d be the earliest OS supported on 10.6. However, I could be wrong.