DSSS install of gdc-gcc-4.1 fails on OS X

Steven Grimm koreth at midwinter.com
Sat Sep 22 11:47:45 PDT 2007


Anders F Björklund wrote:
> Beyond the fact that you can install it to a different prefix,
> you can get the tarball version at http://dgcc.sourceforge.net/

I had tried specifying an alternate prefix from the installer, but gdc 
didn't work; when I tried to compile anything, I'd get

object.d: module object cannot read file 'object.d'

I just tried again, ran gdc under ktrace (OS X's strace equivalent, more 
or less) and tracked down the problem: the installer needs to create an 
additional directory when you're not installing in /usr.

$ mkdir -p <install base>/lib/gcc/i686-apple-darwin8/4.0.1

fixed the problem for me. The root cause is that gdc uses 
<prefix>/lib/gcc/i686-apple-darwin8/4.0.1/../../../../include/d/4.0.1 as 
the default include directory; if the directory structure under /lib 
doesn't exist, it can't find its include files. If you install in /usr, 
that directory already exists, so everything works.

Will file a bug against the Mac GDC project, but hopefully this will 
help anyone who finds my original bug report via a search engine or 
whatever.

-Steve


More information about the D.gnu mailing list