Cannot build dmd due to sc.ini issue

Baz via Digitalmars-d digitalmars-d at puremagic.com
Mon Apr 27 23:40:22 PDT 2015


On Tuesday, 28 April 2015 at 02:27:00 UTC, Andre Tampubolon wrote:
> I decided to wipe my dmd directory (too messy), and replaced it 
> with the
> latest one
> (http://downloads.dlang.org/releases/2.x/2.067.1/dmd.2.067.1.windows.zip).
>
> After that, I adjusted the bin directory, and sc.ini as well:;
> environment for both 32/64 bit
> [Environment]
> DFLAGS="-I%@P%\..\src\phobos" "-I%@P%\..\src\druntime\import"
>
> FYI, my dmd root directory is C:\dmd.
>
> All of my D code examples can be compiled successfully. No 
> problem so far.
>
> Now the problem is compiling the D compiler itself.
> Running "make -f win32.mak release" gives:
> make -fwin32.mak C=backend TK=tk ROOT=root HOST_DC="dmd" reldmd
> make -fwin32.mak C=backend TK=tk ROOT=root HOST_DC="dmd" 
> "OPT=-o"
> "DEBUG=" "DDEBUG=" "DOPT=-inline -O" "LFLAGS=-L/delexe/la" 
> dmd.exe
> dmd -run idgen
> Error: cannot find source code for runtime library file 
> 'object.d'
>        dmd might not be correctly installed. Run 'dmd -man' for
> installation instructions.
>        config file:
> C:\Users\CSL-NB-064\Downloads\Software\d-lang\d-git\dmd\src\sc.ini
> Specify path to file 'object.d' with -I switch
>
> Indeed there's no sc.ini on that directory. But there's one in
> C:\dmd\bin. Why can't dmd find that file?

You don't need the sc.ini at all to build dmd.
It looks more that the problem happends when you build druntime
and phobos.

Personnally i use this script to build from git master:

https://gist.github.com/BBasile/e2a5504a64ee82080117

it's a bit shitty but if it can help...

it must be located and executed in the root folder of the
repositories (cwd):

-root(cwd)\
       +--script.d
       +--dmd\
       +--druntime\
       +--phobos\

And another thing: the default sc.ini (the one from the zip
release) has not to be adjusted. src folders are well two folders
above the location, so:

; environment for both 32/64 bit
[Environment]
DFLAGS="-I%@P%\..\..\src\phobos"
"-I%@P%\..\..\src\druntime\import"

But the sc.ini for dmd master may have to...it depends if you
copy or not the src like in the releases. In the script they are
not copied and a sc.ini is created for the dmd-master only, based
on the repository locations.


More information about the Digitalmars-d mailing list