www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Mac OS X Installation

reply chuck freshsources.com writes:
I have successfully installed D 2.0 on a number of Macs. However, the  
latest attempt yields the following error when I try to compile any  
file:

object.d: Error: module object is in file 'object.d' which cannot be read
import path[0] = /etc/../../src/phobos
import path[1] = /etc/../../src/druntime/import

As usual, I faithfully followed the instructions at

http://www.digitalmars.com/d/2.0/dmd-osx.html

Any ideas on how to fix this? Thanks.
Jun 23 2010
next sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 06/23/2010 11:52 PM, chuck freshsources.com wrote:
 I have successfully installed D 2.0 on a number of Macs. However, the
 latest attempt yields the following error when I try to compile any file:

 object.d: Error: module object is in file 'object.d' which cannot be read
 import path[0] = /etc/../../src/phobos
 import path[1] = /etc/../../src/druntime/import

 As usual, I faithfully followed the instructions at

 http://www.digitalmars.com/d/2.0/dmd-osx.html

 Any ideas on how to fix this? Thanks.
Hi, Chuck! Looks like the files aren't where they are supposed to be. Try this: head /etc/../../src/druntime/import/object.di Normally you should see the first ten lines of that file. If there's an error, write back what the error message is. Andrei
Jun 23 2010
parent reply Justin Spahr-Summers <Justin.SpahrSummers gmail.com> writes:
On Thu, 24 Jun 2010 01:29:53 -0500, Andrei Alexandrescu 
<SeeWebsiteForEmail erdani.org> wrote:
 
 On 06/23/2010 11:52 PM, chuck freshsources.com wrote:
 I have successfully installed D 2.0 on a number of Macs. However, the
 latest attempt yields the following error when I try to compile any file:

 object.d: Error: module object is in file 'object.d' which cannot be read
 import path[0] = /etc/../../src/phobos
 import path[1] = /etc/../../src/druntime/import

 As usual, I faithfully followed the instructions at

 http://www.digitalmars.com/d/2.0/dmd-osx.html

 Any ideas on how to fix this? Thanks.
Hi, Chuck! Looks like the files aren't where they are supposed to be. Try this: head /etc/../../src/druntime/import/object.di Normally you should see the first ten lines of that file. If there's an error, write back what the error message is. Andrei
Isn't /etc/../.. the root directory? That seems like an awfully incorrect place to the put the includes. I installed the druntime and phobos folders into /usr/local/include and then edited my /etc/dmd.conf accordingly. It seems to work pretty well, though it does require some setup.
Jun 23 2010
parent reply "Nick Sabalausky" <a a.a> writes:
"Justin Spahr-Summers" <Justin.SpahrSummers gmail.com> wrote in message 
news:MPG.268ca23b487143c59896a8 news.digitalmars.com...
 On Thu, 24 Jun 2010 01:29:53 -0500, Andrei Alexandrescu
 <SeeWebsiteForEmail erdani.org> wrote:
 On 06/23/2010 11:52 PM, chuck freshsources.com wrote:
 I have successfully installed D 2.0 on a number of Macs. However, the
 latest attempt yields the following error when I try to compile any 
 file:

 object.d: Error: module object is in file 'object.d' which cannot be 
 read
 import path[0] = /etc/../../src/phobos
 import path[1] = /etc/../../src/druntime/import

 As usual, I faithfully followed the instructions at

 http://www.digitalmars.com/d/2.0/dmd-osx.html

 Any ideas on how to fix this? Thanks.
Hi, Chuck! Looks like the files aren't where they are supposed to be. Try this: head /etc/../../src/druntime/import/object.di Normally you should see the first ten lines of that file. If there's an error, write back what the error message is. Andrei
Isn't /etc/../.. the root directory? That seems like an awfully incorrect place to the put the includes.
No, "/etc/../" is root. "/etc/../../" is "/.." (ie parent of root), which is nonsensical. ------------------------------- Not sent from an iPhone.
Jun 24 2010
parent reply Justin Spahr-Summers <Justin.SpahrSummers gmail.com> writes:
On Thu, 24 Jun 2010 13:30:31 -0400, Nick Sabalausky <a a.a> wrote:
 
 "Justin Spahr-Summers" <Justin.SpahrSummers gmail.com> wrote in message 
 news:MPG.268ca23b487143c59896a8 news.digitalmars.com...
 On Thu, 24 Jun 2010 01:29:53 -0500, Andrei Alexandrescu
 <SeeWebsiteForEmail erdani.org> wrote:
 On 06/23/2010 11:52 PM, chuck freshsources.com wrote:
 I have successfully installed D 2.0 on a number of Macs. However, the
 latest attempt yields the following error when I try to compile any 
 file:

 object.d: Error: module object is in file 'object.d' which cannot be 
 read
 import path[0] = /etc/../../src/phobos
 import path[1] = /etc/../../src/druntime/import

 As usual, I faithfully followed the instructions at

 http://www.digitalmars.com/d/2.0/dmd-osx.html

 Any ideas on how to fix this? Thanks.
Hi, Chuck! Looks like the files aren't where they are supposed to be. Try this: head /etc/../../src/druntime/import/object.di Normally you should see the first ten lines of that file. If there's an error, write back what the error message is. Andrei
Isn't /etc/../.. the root directory? That seems like an awfully incorrect place to the put the includes.
No, "/etc/../" is root. "/etc/../../" is "/.." (ie parent of root), which is nonsensical. ------------------------------- Not sent from an iPhone.
/etc is a soft link to /private/etc on all OS X systems I've seen. I also think /.. always refers to / on *nix, but I could be wrong there.
Jun 24 2010
parent "Nick Sabalausky" <a a.a> writes:
"Justin Spahr-Summers" <Justin.SpahrSummers gmail.com> wrote in message 
news:MPG.268da2399e25e4f99896a9 news.digitalmars.com...
 On Thu, 24 Jun 2010 13:30:31 -0400, Nick Sabalausky <a a.a> wrote:
 No, "/etc/../" is root. "/etc/../../" is "/.." (ie parent of root), which 
 is
 nonsensical.

 -------------------------------
 Not sent from an iPhone.
/etc is a soft link to /private/etc on all OS X systems I've seen. I also think /.. always refers to / on *nix, but I could be wrong there.
Ahh, news to me.
Jun 24 2010
prev sibling parent reply Sean Kelly <sean invisibleduck.org> writes:
I wrote a simple script to automate my DMD installs.  If the zipfile is named
dmd.2.047.zip it will install the data into /opt/dmd-2.047 and then create the
symbolic link /opt/dmd2 (I have /opt/dmd2/bin in my path).  I also have it copy
my dmd.conf from the previous install, since I'm not using the standard
dmd.conf.  I'll comment that line out in the script below: 




OSDIR=osx
SRCDIR=`pwd`
VERSION=$1

if [ -z "$1" ]
then
    echo "Usage: $0 zipfile"
    exit 1
fi

rm -fr dmd2
unzip dmd.$VERSION.zip
pushd /opt
sudo mkdir dmd-$VERSION
cd dmd-$VERSION
sudo cp -r $SRCDIR/dmd2/* .
sudo ln -s $OSDIR/bin
sudo ln -s $OSDIR/lib
cd bin
sudo chmod a+x dmd dumpobj obj2asm rdmd shell
#sudo cp /opt/dmd2/bin/dmd.conf .
cd /opt
sudo rm dmd2
sudo ln -s dmd-$VERSION dmd2
popd
Jun 24 2010
parent Sean Kelly <sean invisibleduck.org> writes:
Um, if your zipfile is named dmd.2.047.zip, run it as "dmdinstall 2.047"
assuming the script file is named "dmdinstall".
Jun 24 2010