www.digitalmars.com         C & C++   DMDScript  

D.gnu - Where is object.d? Will it work on 10.6?

reply al <al la.com> writes:
I've installed GDC on 10.6 using provided installer. However, when I try to
compile anything, it stops with error:

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

So far I know it's because it can't find includes, but I don't know where it
expects them. 

gdc -print-search-dirs gives me library dirs, not source include dirs.

Can it be caused by conflict with DMD? I've got leftovers from DMD1 and DMD2 on
my system (they were too buggy to work with :/)

i686-apple-darwin9-gdc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5484)
Oct 31 2009
next sibling parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
al wrote:
 I've installed GDC on 10.6 using provided installer. However, when I try to
compile anything, it stops with error:
 
 object.d: module object cannot read file 'object.d'

AFAIK there is no GDC installer for Mac OS X 10.6 out just yet ? There is one for 10.5, but it might have issues on Snow Leopard.
 So far I know it's because it can't find includes, but I don't know where it
expects them. 
 
 gdc -print-search-dirs gives me library dirs, not source include dirs.

The import modules are being found relative to the library dirs: /usr/lib/gcc/i686-apple-darwin9/4.0.1/../../../../include/d/4.0.1
 Can it be caused by conflict with DMD? I've got leftovers from DMD1 and DMD2
on my system (they were too buggy to work with :/)
 
 i686-apple-darwin9-gdc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5484)

I don't think it's a DMD conflict, but something similar to what you get if running the 10.4 installation on 10.5: a GCC mismatch. The install is "expecting" some files from apple-darwin9-gdc-4.0, while there is only apple-darwin10-gdc-4.0 installed by default. Like http://gdcmac.sourceforge.net/gdc-files.txt but for darwin9 (as the relative links don't really work without the directories) The best would be to rebuild GDC with gcc-5484 for Snow Leopard, but me extracting those files from a Leopard tarball might work. --anders
Nov 01 2009
prev sibling parent reply Vincenzo Ampolo <vincenzo.ampolo gmail.com> writes:
al wrote:

 So far I know it's because it can't find includes, but I don't know 

 it expects them.

An easy hack is to run gdc under strace and look to the path it wants to have the phobos lib (this is the error) Unfortunately Mac installer is not supported by us cuz nobody, of the dev team, has a mac. So we are unable to test and develop a binary for that environment. -- Vincenzo Ampolo (goshawk) http://goshawknest.wordpress.com
Nov 03 2009
parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Vincenzo Ampolo wrote:

 An easy hack is to run gdc under strace and look to the path it wants 
 to have the phobos lib (this is the error)

But you would need to use ktrace on Mac OS X 10.4 and earlier, or dtrace on Mac OS X 10.5 and later. Since strace is for Linux. --anders
Nov 03 2009