View previous topic :: View next topic |
Author |
Message |
Carlos
Joined: 19 Mar 2004 Posts: 396 Location: Canyon, TX
|
Posted: Mon Feb 28, 2005 8:12 pm Post subject: phobos imports |
|
|
"Build" coudn't build itself. I downloaded the zip file from the SVN trunk (shouldn't it be in the downloads section?) and when I ran the precompiled Windows exe on build.d, DMD failed because Build added to the rsp file, "std.utf", "std.c.windows.windows", etc. |
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Mon Feb 28, 2005 11:01 pm Post subject: Re: phobos imports |
|
|
Carlos wrote: | "Build" coudn't build itself. I downloaded the zip file from the SVN trunk (shouldn't it be in the downloads section?) |
Yes it should. I'll fix that later today.
Carlos wrote: | and when I ran the precompiled Windows exe on build.d, DMD failed because Build added to the rsp file, "std.utf", "std.c.windows.windows", etc. |
It will only add these if they are not in a package that contains the module name "phobos". By default, if a source file does an import of a file, and that file's path has a directory in it called "phobos", then that file will not be included in the compilation.
Your .rsp file should also have the -I switches as found in the sc.ini file and this is expected to include the path to phobos. Can you post here the contents of the .rsp file?
For example, here is the .rsp file I get ...
Code: |
-release
-inline
-op
-IC:\DPARNELL\DMD\BIN\..\src\phobos
build.d
util\pathex_bn.d
util\pathex.d
source_bn.d
util\str.d
build_bn.d
util\fdt_bn.d
util\str_bn.d
source.d
util\fdt.d
build.def
kernel32.lib
-ofbuild.exe
|
If you have placed phobos in a non-standard place, you will probably need to use the -X switch on build. _________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
|
Carlos
Joined: 19 Mar 2004 Posts: 396 Location: Canyon, TX
|
Posted: Tue Mar 01, 2005 9:53 am Post subject: |
|
|
Build says:
Code: |
Compiling with ..........
-op
-unittest
std\utf.obj
std\string.obj
std\c\windows\windows.obj
std\stream.obj
build.d
std\ctype.obj
util\pathex_bn.obj
std\stdio.obj
util\pathex.d
source_bn.obj
util\str.d
build_bn.d
util\fdt_bn.obj
std\outbuffer.obj
util\str_bn.d
std\path.obj
source.d
util\fdt.obj
std\c\stdio.obj
std\file.obj
build.def
kernel32.lib
-ofbuild.exe
|
And my sc.ini file is:
Code: |
[Version]
version=7.51 Build 020
[Environment]
LIB="?@P?\..\lib";d:\carlos\dev\dm\lib
DFLAGS="-I?@P?\..\src\phobos;?@P?\..\src;d:\carlos\dev\mango"
LINKCMD=?@P?\..\..\dm\bin\link.exe
|
(This is at work. At home, sc.ini is just slightly different, but basically similar). |
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Tue Mar 01, 2005 9:15 pm Post subject: |
|
|
The way I was parsing the sc.ini file's DFLAGS line was just stupid!
I don't know what I was thinking.
Anyhow, it should be working now. I've uploaded v1.8.
Let me know how it goes.
If you use the -V switch, you will get a whole lot of informational messages as well. You should be seeing lines like ...
Code: |
Ignoring C:\DMD\src\phobos\std\stdio.d (module: phobos)
|
_________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
|
Carlos
Joined: 19 Mar 2004 Posts: 396 Location: Canyon, TX
|
Posted: Wed Mar 02, 2005 5:51 pm Post subject: |
|
|
Thanks, it worked. However, Build still has the same problem on linux. The problem is in build.d, line 899: the path separator in Unices is ":", so my dmd.conf has:
Code: |
DFLAGS=-I/home/carlos/dev/dmd/src/phobos:/home/carlos/dev/dmd/src
|
but Build fails.
Another problem with dmd.conf is that Build seems to prefer PATH_TO_DMD/bin/dmd.conf to /etc/dmd.conf. I have both files, and I had to do "ln -s /etc/dmd.conf" in PATH_TO_DMD/bin to make it work. It's not good, because DMD uses /etc/dmd.conf.
Also, GNU make doesn't like SOURCES = $(SOURCES) build.d, etc., because it says it's recursive. |
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Wed Mar 02, 2005 6:16 pm Post subject: |
|
|
Carlos wrote: | Thanks, it worked. However, Build still has the same problem on linux. The problem is in build.d, line 899: the path separator in Unices is ":", so my dmd.conf has:
Code: |
DFLAGS=-I/home/carlos/dev/dmd/src/phobos:/home/carlos/dev/dmd/src
|
but Build fails.
|
I was following the documentation that came with DMD. It states ...
DigitalMars wrote: |
Compiler Arguments and Switches
. . .
-Ipath
where to look for imports. path is a ; separated list of paths. Multiple -I's can be used, and the paths are searched in the same order.
|
So I didn't know that a colon was supposed to be a delimiter with your unix system. I'll get on to this today.
Carlos wrote: | Another problem with dmd.conf is that Build seems to prefer PATH_TO_DMD/bin/dmd.conf to /etc/dmd.conf. I have both files, and I had to do "ln -s /etc/dmd.conf" in PATH_TO_DMD/bin to make it work. It's not good, because DMD uses /etc/dmd.conf.
|
Okay, I can see my mistake. I'll have this out today too.
Carlos wrote: | Also, GNU make doesn't like SOURCES = $(SOURCES) build.d, etc., because it says it's recursive. |
Well all I can say is that GNU is wrong because it is not recursive. But that doesn't help anybody. I'll put two makefiles into the distro - one for Windows and another for simpler systems like unix.
Thanks for taking to time to help me debug this. _________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
|
Carlos
Joined: 19 Mar 2004 Posts: 396 Location: Canyon, TX
|
Posted: Wed Mar 02, 2005 7:15 pm Post subject: |
|
|
Derek Parnell wrote: | Thanks for taking to time to help me debug this. |
You're welcome. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|