www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Cannot build dmd due to sc.ini issue

reply Andre Tampubolon <andre lc.vlsm.org> writes:
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?
Apr 27 2015
next sibling parent bitwise <bitwise.pvt gmail.com> writes:
On Mon, 27 Apr 2015 22:26:56 -0400, Andre Tampubolon <andre lc.vlsm.org>  
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?
Are you trying to compile the source code that comes with the actual release? I don't think this is possible anymore. You need a host D compiler, and a separate copy of the source. To clarify, I mean you should use the windows installer to install a copy of the most recent D compiler, and then clone the appropriate repositories(dmd, druntime, phobos, etc) to a separate location. Finally, use the first D compiler to build the source. I believe this change was made to accommodate the new DDMD front end.
Apr 27 2015
prev sibling parent "Baz" <bb.temp gmx.com> writes:
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.
Apr 27 2015