GDC on Mac OS X 10.5?

Anders F Björklund afb at algonet.se
Fri Apr 4 00:25:22 PDT 2008


Jacob Carlborg wrote:

> My first question:
> does GDC on Mac OS X 10.5 works?

Yes. If you are on PowerPC (or compiling for, such as making Universal
Binaries) you need to patch the linker though or it will crash with D...

http://www.opensource.apple.com/darwinsource/tarballs/apsl/ld64-77.1.tar.gz
http://www.algonet.se/~afb/d/ld64-77.1-powerpc_nosection.patch

> To my second question:
> I'm using Mac OS X 10.5.2 and have installed the developer tools, 
> downloaded gdc for mac and run the installation. When I tried to compile 
> a simple hello world program I got the following error:
> 
> object.d: module object cannot read file 'object.d'
> 
> If I remember correctly that means that the gdc can't find the Phobos 
> lib but I don't know how to fix that.

GDC tries to find the Phobos imports relative to its library,
so if the library (or its directory) is missing it will fail:

/usr/lib/gcc/i686-apple-darwin8/4.0.1/*
/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/*

> I did the same installation procedure on Mac OS X 10.4 and that worked. 
> Have they changed something in Mac OS X 10.5 that breaks the current gdc?

They changed the OS version, so you need the old version of
the GCC runtime (normally expected to be available from Xcode)

It is available in the tarball from the "dgcc" binary section:
http://downloads.sourceforge.net/dgcc/gdc-0.24-macosx-universal-gcc-5363.tar.bz2

--anders

PS.
A version for gcc-5465 (the Leopard compiler) is planned for GDC 0.25
But it should be possible to use gcc-5363 (Tiger compiler) meanwhile.


More information about the D.gnu mailing list