Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Mac OSX PPC install issues / question

Moderators: kris

Posted: 09/24/07 18:06:08 Modified: 09/27/07 18:38:21


I've tried installing tango in two different ways and have not been able to get tango installed and programs to compile (yet).

First, I tried installing gdc with MacPorts? and then compiling and installing tango myself. I could not get tango to compile with any of the included scripts -- the problem seemed to boil down to where the scripts looked for the d language / gdc install...the tango scripts seemed to look in /usr/local and I couldn't figure out how to get them to look is /opt/local.

Second, I installed gdc from the binary available at which installs gdc in /usr/local by default. I then used DSSS net install and tango downloaded and compiled and installed correctly...or at least without errors. I then created one of the simple default tango example programs (using Cout) and attempted to compile it with DSSS. It does not compile, producing error output that the tango lib (I think) cannot be found.

This seems like it should be something obvious I am missing about the install process. Does anyone have tango installed and working with a macports-installed gdc? Have I just completely missed the proper flag to be setting for the compile script that ships with tango? Anyone have a DSSS-based tango / d language setup working on a PPC mac?

Apologies in advance if this turns out to be something ridiculously obvious -- any configuration help is greatly appreciated.


Author Message

Posted: 09/25/07 08:54:27

Since your Mac is PPC based, you may be somewhat in unknown territory. I haven't heard any reports for a while, but GDC used to have trouble on that platforms (similar to those on x86-64).

As for the build scripts, they expect GDC to be in the path. The install scripts ( should accept --prefix as an argument (see --help) for where you want/need to install.

For any further help, please post your error messages and steps to reproduce?

Posted: 09/25/07 15:43:54 -- Modified: 09/25/07 15:50:43 by

Thanks for the response.

I don't think I've been having any trouble with gdc itself -- before trying to install tango I made my way through the phobos-based examples and everything seemed to compile just fine. I haven't tried anything particularly exotic, though.

I get the same error when running the build script (either the -mac or plain gdc variant) with --prefix=/opt/local and if I try to install tango with DSSS. My gdc installation is in /opt/local (i.e. gdc in /opt/local/bin and /opt/local/include/d for libraries)

Here are the errors:

dgccmain2.d:234: Error: no property 'file' for type 'object.Exception'
dgccmain2.d:237: Error: no property 'file' for type 'object.Exception'
dgccmain2.d:237: Error: no property 'line' for type 'object.Exception'
dgccmain2.d:242: Error: no property 'toUtf8' for type 'object.Exception'
dgccmain2.d:244: Error: no property 'next' for type 'object.Exception'
dgccmain2.d:244: Error: cannot implicitly convert expression (1) of type int to object.Exception
Error: cannot cast int to object.Exception
make[2]: *** [dgccmain2.o] Error 1
make[1]: *** [all] Error 2
make: *** [lib] Error 2
Command bash returned with code 256, aborting.
Error: Command failed, aborting.

My concern is that the nested make (make[2]) lists the following as configuration parameters a few lines above:

"INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" 
"MAKEINFO=/bin/sh /private/tmp/DSSS_tango/tango/tango/lib/compiler/gdc/missing --run makeinfo " 
"PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "RUNTESTFLAGS=" "exec_prefix=/usr/local" 
"infodir=/usr/local/info" "libdir=/usr/local/lib" "includedir=/usr/local/include" "prefix=/usr/local" "tooldir=" 
"gdc_include_dir=/usr/local/include/d/4.1.2" "AR=ar" "AS=as" "LD=ld" "RANLIB=ranlib" "NM=" "NM_FOR_BUILD="

The "exec_prefix" this make is using is for /usr/local and I'm not sure if that is what is causing the problems as my gdc installation is in /opt/local. I've been trying to figure out how to pass the proper prefix along, but I'm still trying to unravel and understand the config / make process.

I do also get errors early in the build script referring to automake and aclocal -- I have version 1.6.3 of each installed on my system and the script seems to want version 1.9. If installing 1.9 would address this issue, I can do that.

Exact steps to reproduce: checkout svn version of tango, cd into lib directory. run any gdc/posix build script. Per the instructions at

Again, any help is greatly appreciated.

Posted: 09/26/07 11:32:37

I'm not well versed in these errors, but I think autotools 1.9 is required. Whether this will fix all or nothing, I don't know.

Posted: 09/26/07 13:03:34

Sorry for not having jumped in earlier. I just hadn't noticed this thread.

First of all, GDC and Tango work very well on PPC on Mac OS X. Linux is still a work in progress, but you shouldn't have problems with Mac.

Next, although I can't help you with MacPorts?, I can help you with the other things. The errors that you're getting (Error: no property 'file' for type 'object.Exception' et al.) seem to indicate that gdc is using GPhobos' include directory instead of Tangos. Are you using dsss or gdc directly to compile? I don't use dsss myself, but I read somewhere that when you installed Tango on a gdc environment, you should only use dsss to compile.

If you don't want to use dsss, have you tried checking out the source code from the SVN repos? Then just go to trunk/lib, run, then, and voila. That's what I do all the time. Just don't forget to run --uninstall before upgrading gdc.


Posted: 09/27/07 18:14:22

Hmmm. Thank you both, Lars and Carlos.

I cannot successfully install Tango, and I've tried a few different combinations.

If I install gdc with MacPorts?, the Tango build script fails with the traceback I pasted above -- even after I've upgraded automake -- whether I use dsss or if I build with the script included in the /lib directory from svn.

If I try to build Tango using the binary gdc distribution from sourceforge, then Tango builds ok, but the install fails because the installer cannot find phobos. I'd rather use the MacPorts?-based gdc because it's more self-contained and easily updated.

The fact that Tango will build with the binary gdc but not the MacPorts? gdc leads me to believe that the "MacPorts?-gdc" build fails because the build script does not / cannot look in /opt/local for the d libs. The only parameter I can find to send to the build script is "--prefix" but that does not change the error that I get when I try to build Tango.

Is this a problem with the Tango build script or with my gdc install? GDC works just fine -- for example, I can install dsss and compile phobos-based examples without a problem.

My understanding is that I should be able to checkout Tango svn to anywhere and build it, as long as gdc is on $PATH. Maybe that's the problem? I should be installing tango from a specific directory? Does tango build itself with my installed d compiler?

Maybe the best question I can ask is this: can anyone point me in the direction of someone who has tango up-and-installed on a PPC Mac?

Posted: 09/27/07 23:13:48

You can have Tango anywhere you want; the install script will take care of the rest.

As for someone who uses GDC+Tango on Mac OS X/PPC, that'd be me. I do what I wrote previously, and it works, so I don't know what could be wrong in your end.

Posted: 09/28/07 15:21:41

Carlos - that's encouraging. Now, all I have to do is copy you...<grin>

Would you please post the details of your setup? Did you simply install the binary GDC 0.24 from the sourceforge site? Did you install GDC per the default (/usr directory)? Did you run the ./ script and use the defaults there, as well?

Posted: 09/28/07 16:12:27


I always install GDC from source. Look for the "GDC Installation from source" section in the aforementioned link.

Then install Tango. Check "Manual Installation," same link.

I've always used the defaults, except to configure GDC. I use --disable-multilib --disable-nls --enable-languages=c,d

Posted: 09/30/07 04:25:00

Got it. For the record...

The "trick" at this point is to install GDC from source on Mac OS X PPC. When I follow the default install from source, GDC installs into /usr/local, and Tango compiles both manually and via DSSS without a hitch.

In case anyone else has this same issue, neither the gdcmac binary gdc 0.24, nor the MacPorts? gdc 0.24 worked for compiling tango (manually or with DSSS, even if I chose to install it to /usr/local during the install process).

I'm not sure why this is, but I suspect it's how the Tango install scripts are setup.

In any case, thanks Carlos for pointing me in the right direction.

Posted: 09/30/07 05:17:52

You're welcome. I'm glad you got it working.

Posted: 09/30/07 05:49:22

If you find a way to make the scripts operate more effectively, please let us know?

Posted: 02/20/08 02:24:15

I just tried to install tango with the macport version of gdc (0.24) on an intel mac with 10.4 (tiger), and I had exactly the same problem

dgccmain2.d:234: Error: no property 'file' for type 'object.Exception' 

so definitely not a processor related issue. Now I am building gdc from the source...

Posted: 03/02/08 17:29:22

I also get this with the macports gdc, on Intel 10.5.2.

I don't really want to build another gdc, so I'll be looking into what the problem is briefly. Will report any findings.

Posted: 03/02/08 20:34:15

As shown further up this thread, the Macports version is known to not work, and equally GDC 0.24 is known to have several serious errors on Mac. Tango is not supported for these versions of GDC. Self-compiled from latest SVN (r199 last I heard) is known to work well. I don't know if there is a gdcmac download for that version.