On Fri, 2010-09-24 at 19:35 -0700, Jonathan M Davis wrote: > On Friday 24 September 2010 18:25:47 Andy Elvey wrote: > > Hi all - > > I'm a first-timer here and very keen to get into some D coding! > > Unfortunately, I have a problem. I've installed the "one-click" .deb > > package from Digital Mars, but when I try to compile a very simple D > > program, I get this message - > > dmd -w -c "hello.d" (in directory: /home/andy/d_stuff) > > Compilation failed. > > object.d: Error: module object cannot read file 'object.d' > > > > So, does anyone know what is causing this, and how it can be fixed? > > It looks like the compiler is unable to find something. > > > > Very many thanks in advance - bye for now - > > - Andy > > It sounds like your dmd.conf needs adjusting or like maybe you don't have on > at > all. It sets DFLAGS which tells the compiler where to find the source code > for > druntime and phobos as well as their libraries. The current default dmd.conf > is
A deb should be self-consistent and ensure that all dependencies are installed. If a deb installs successfully and the compiler fails to work out "of the box" with an error related to a component that was installed by the deb, then the deb is broken. If this is the case in this case then a blocking bug should be reported. The following is therefore -- if it works at all, I haven't tried it :-) -- a hack workaround and not a fix. Anyone following this route to make things work should, quite rightly be expecting a new deb to be released as a matter of urgency so that they do not need to put this workaround in place. > [Environment] > > dflags=...@p%/../../src/phobos -...@p%/../../src/druntime/import > -l...@p%/../lib > -L--export-dynamic > > > So, you either need to adjust the one that gets installed with the deb > package > or use your own in a place higher in the list of places to search for > dmd.conf. > Look here for the specifics: http://www.digitalmars.com/d/2.0/dmd- > linux.html#dmd_conf . It perhaps should be noted that the deb is a 32-bit Ubuntu deb and so may not work on Debian, or any Ubuntu other than the one compiled on (i.e. Lucid, Karmic, etc.). Rather than fight with installing a 32-bit deb on a 64-bit system, I just install the binary tarball -- but in my personal store not into /usr which should only be installed to by debs. Launchpad has a PPA facility that allows for creation of working debs for all Ubuntu releases simply by uploading a release tarball and pressing a button -- once configuration is complete. Might be worth considering? -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.win...@ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: rus...@russel.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
signature.asc
Description: This is a digitally signed message part