View previous topic :: View next topic |
Author |
Message |
csauls
Joined: 27 Mar 2004 Posts: 278
|
Posted: Tue Mar 22, 2005 8:44 pm Post subject: Usage of -X |
|
|
I'm liking Build more and more, and my current chief project makes good use of the -X switch to avoid compiling a number of modules that are linked in via static libs. But I've run into something that appears to not be possible yet, or else I'm missing the correct method. Consider this snippet from the file blush.debug.brf (and yes that really is its name):
I'm using the "-Xworld" to avoid compiling the package 'rouge.world' (./rouge/world/*) though, not 'world'. I tried using "-Xrouge/world" and even "-Xrouge.world" but to no avail. Is there currently any way to specify a fully-qualified package name? Or if not, might it be made available in a future release? It would just make things a bit more... logical, for me, and might avoid some name conflicts later on. (Like if someone wrote a custom extension which also lived in a namespace called "world" for some reason.) _________________ Chris Nicholson-Sauls |
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Tue Mar 22, 2005 9:27 pm Post subject: Re: Usage of -X |
|
|
csauls wrote: | I'm liking Build more and more, and my current chief project makes good use of the -X switch to avoid compiling a number of modules that are linked in via static libs. But I've run into something that appears to not be possible yet, or else I'm missing the correct method. Consider this snippet from the file blush.debug.brf (and yes that really is its name):
I'm using the "-Xworld" to avoid compiling the package 'rouge.world' (./rouge/world/*) though, not 'world'. I tried using "-Xrouge/world" and even "-Xrouge.world" but to no avail. Is there currently any way to specify a fully-qualified package name? Or if not, might it be made available in a future release? It would just make things a bit more... logical, for me, and might avoid some name conflicts later on. (Like if someone wrote a custom extension which also lived in a namespace called "world" for some reason.) |
You should be able to specify packages with more granularity. I assume you are running a unix system, in which case you can do ...
and this will cause it to ignore anything that has "/rouge/world/" in the module's path or if the module called "rouge/world.d".
I just tried it here and it works. If you haven't yet, try it again with v1.14 and use the -V switch to see if that helps identify a problem. _________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
|
csauls
Joined: 27 Mar 2004 Posts: 278
|
Posted: Wed Mar 23, 2005 12:38 pm Post subject: |
|
|
Actually no, I'm on Win32 not Unix -- sadly. I actually do prefer POSIX, but this is temporarily not available to me for development. *sighs depressedly* But on another note, I did try it again with 1.14 just now and... well by george, it did work. I could've sworn it didn't used to, but who cares, it does now. However, there is a new issue. I'm getting an Access Violation. I don't know what else to give you, so here's the -V output from Build:
Quote: |
*** build v1.14 (build 498)***
Response file blush.debug.brf
Response file arg: blush
Response file arg: rouge_world_d.lib
Response file arg: lambdadb_d.lib
Response file arg: mango.lib
Response file arg: -Tblush
Response file arg: -v
Response file arg: -link
Response file arg: -full
Response file arg: -cleanup
Response file arg: -Ry
Response file arg: -Xrouge\world
Response file arg: -Xlambdadb
Response file arg: -Xmango
Response file arg: -debug
Response file arg: -gt
Response file arg: -w
Response file arg: -op
Current Dir 'C:\My Documents\Projects\RougeMOO\'
Compiler installed in C:\DMD\BIN\
Configuration File installed in C:\DMD\BIN\
Active Version: 'X86'
Active Version: 'Win32'
Active Version: 'LittleEndian'
Active Version: 'Windows'
Active Version: 'build'
Active Version: 'D_InlineAsm'
Active Version: 'DigitalMars'
Reading from config: C:\DMD\BIN\sc.ini
Line 1: [Version]
Line 2: version=7.51 Build 020
Line 3:
Line 4: [Environment]
Line 5: LIB="C:\DMD\BIN\..\lib";\dm\lib
use LIB="C:\DMD\lib\";"\dm\lib\"
Line 6: DFLAGS="-IC:\DMD\BIN\..\src\phobos" "-IC:\DMD\BIN\..\src"
added root from config file C:\DMD\src\phobos\
added root from config file C:\DMD\src\
Line 7: LINKCMD=C:\DMD\BIN\..\..\dm\bin\link.exe
file->module C:\My Documents\Projects\RougeMOO\blush.d => blush
Time not recorded for C:\My Documents\Projects\RougeMOO\blush.d
Time not recorded for C:\My Documents\Projects\RougeMOO\blush.obj
Scanning blush.d
Module name set to 'blush'
module->file rouge.world.world => C:\My Documents\Projects\RougeMOO\rouge\world\world.d
module->file lambdadb => C:\My Documents\Projects\RougeMOO\lambdadb.d
module->file mango.io.FileConduit => C:\DMD\src\mango\io\FileConduit.d
module->file mango.io.FileProxy => C:\DMD\src\mango\io\FileProxy.d
module->file mango.io.Stdout => C:\DMD\src\mango\io\Stdout.d
module->file mango.io.TextReader => C:\DMD\src\mango\io\TextReader.d
Ignoring C:\My Documents\Projects\RougeMOO\rouge\world\world.d (package: rouge\world)
Ignoring C:\My Documents\Projects\RougeMOO\lambdadb.d (module: lambdadb)
Ignoring C:\DMD\src\mango\io\FileConduit.d (package: mango)
Ignoring C:\DMD\src\mango\io\FileProxy.d (package: mango)
Ignoring C:\DMD\src\mango\io\Stdout.d (package: mango)
Ignoring C:\DMD\src\mango\io\TextReader.d (package: mango)
source file[0] blush.d
Error: Access Violation
|
_________________ Chris Nicholson-Sauls |
|
Back to top |
|
|
csauls
Joined: 27 Mar 2004 Posts: 278
|
Posted: Wed Mar 23, 2005 1:56 pm Post subject: |
|
|
Well I know what was giving Build trouble, it was the previous runs for building rouge_world_d.lib and lambdadb_d.lib -- I have all three runs in a batch file, and hadn't yet checked the output for the first two... a silly me moment. Anyhow, the calls to "lib" are failing, but its a simple fix. In the .LSP file the filepaths should be wrapped in quotes to account for spaces in file names, so "lib" doesn't barf while looking for a "C:\My.obj" file that naturally doesn't exist. That's it. I guess previous versions were using all relative paths and so the anomaly hadn't shown up yet.
Edited to add:
I just noted the "lsp file issue" thread. Seems its already known that there are problems. I'm slow apparently. _________________ Chris Nicholson-Sauls |
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Wed Mar 23, 2005 10:13 pm Post subject: |
|
|
csauls wrote: | Actually no, I'm on Win32 not Unix |
I guessed you were using Unix because in the example you had the path slash as "/" and not "\". But anyway, I've changed Build now so that Windows users can enter either types of slashes in the -X switch and it will work. I can't do this for Unix users because "\" is a valid filename character in Unixes. _________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
|
csauls
Joined: 27 Mar 2004 Posts: 278
|
Posted: Thu Mar 24, 2005 11:49 am Post subject: |
|
|
Derek Parnell wrote: | But anyway, I've changed Build now so that Windows users can enter either types of slashes in the -X switch and it will work. |
Good deal. _________________ Chris Nicholson-Sauls |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Sun Apr 17, 2005 8:57 pm Post subject: |
|
|
Am I doing this wrong?
If I do this: Code: | build activex.d -Xwin32 | Build tries to compile in win32\api.obj (it's already in a lib that I've included with a pragma -- the .obj file is unneccessary): Code: | Error 2: File Not Found win32\api.obj |
Then if I do this: Code: | build activex.d -Xwin32\api -Xwin32\com\oaidl | it works properly.
Can't I get Build to ignore an entire package (e.g. win32) without specifying each modules individually? |
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Sun Apr 17, 2005 9:12 pm Post subject: |
|
|
jcc7 wrote: | Am I doing this wrong?
If I do this: Code: | build activex.d -Xwin32 | Build tries to compile in win32\api.obj (it's already in a lib that I've included with a pragma -- the .obj file is unneccessary): Code: | Error 2: File Not Found win32\api.obj |
Then if I do this: Code: | build activex.d -Xwin32\api -Xwin32\com\oaidl | it works properly.
Can't I get Build to ignore an entire package (e.g. win32) without specifying each modules individually? |
Can you run it using the -V switch and send me the output of the verbose messages. That will help me diagnose the problem. But in short, -Xwin32 should exclude all modules (and packages) that have "win32" in the path name. _________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Sun Apr 17, 2005 9:46 pm Post subject: |
|
|
Derek Parnell wrote: | Can you run it using the -V switch and send me the output of the verbose messages. That will help me diagnose the problem. But in short, -Xwin32 should exclude all modules (and packages) that have "win32" in the path name. | Okay, here it goes: Code: | I:\pgm\d\examples\activex>build activex.d -V -Xwin32
*** build v2.00 (build 700)***
Current Dir 'I:\pgm\d\examples\activex\'
Compiler installed in d:\dmd\bin\
Configuration File installed in d:\dmd\bin\
Active Version: 'X86'
Active Version: 'Win32'
Active Version: 'LittleEndian'
Active Version: 'Windows'
Active Version: 'build'
Active Version: 'D_InlineAsm'
Active Version: 'DigitalMars'
Reading from config: d:\dmd\bin\sc.ini
Line 1: [Version]
Line 2: version=7.51 Build 020
Line 3:
Line 4: [Environment]
Line 5: LIB="d:\dmd\bin\..\lib";\dm\lib;F:\pgm\d\svn\dsource\core32\trunk\core3
2\win32
use LIB="d:\dmd\lib\";"\dm\lib\";"F:\pgm\d\svn\dsource\core32\trunk\core32\win3
2\"
Line 6: DFLAGS="-ID:\dm\recls-1.6.1\mappings\D;d:\dmd\bin\..\src\phobos";F:\pgm
\d\svn\dsource\core32\trunk\core32
added root from config file D:\dm\recls-1.6.1\mappings\D\
added root from config file d:\dmd\src\phobos\
Line 7: LINKCMD=d:\dmd\bin\..\..\dm\bin\link.exe
file->module activex.d => activex
Updating activex.d dependants time from 2005/04/17 21:19:48 to 2005/04/17 21:44:
08
Time 2005/04/17 21:19:48 for activex.d
Time 2005/04/17 21:44:08 for activex.obj
Scanning activex.d
module->file std.stdarg => d:\dmd\src\phobos\std\stdarg.d
module->file std.string => d:\dmd\src\phobos\std\string.d
module->file std.utf => d:\dmd\src\phobos\std\utf.d
module->file win32.api => win32\api.d
module->file win32.com.oaidl => win32\com\oaidl.d
Ignoring d:\dmd\src\phobos\std\stdarg.d (package: phobos)
Ignoring d:\dmd\src\phobos\std\string.d (package: phobos)
Ignoring d:\dmd\src\phobos\std\utf.d (package: phobos)
file->module win32\api.d => win32.api
Time not recorded for win32\api.d
Time not recorded for win32\api.obj
Scanning win32\api.d
file->module win32\com\oaidl.d => win32.com.oaidl
Time not recorded for win32\com\oaidl.d
Time not recorded for win32\com\oaidl.obj
Scanning win32\com\oaidl.d
source file[0] win32\api.d
source file[1] win32\com\oaidl.d
source file[2] activex.d
Newer time: from not recorded to 2005/04/17 21:44:08
Building target 'activex.exe'
Time 2005/04/17 21:18:10 for I:\pgm\d\examples\activex\activex.exe (target)
Time 2005/04/17 21:44:08 (most recent)
Compiling with ..........
"-op"
"-ID:\dm\recls-1.6.1\mappings\D"
"-Id:\dmd\bin\..\src\phobos"
"win32\api.obj"
"win32\com\oaidl.obj"
"activex.obj"
"activex.def"
"-ofactivex.exe"
Running 'd:\dmd\bin\dmd.exe @activex.rsp'
d:\dmd\bin\..\..\dm\bin\link.exe win32\api+win32\com\oaidl+activex,activex.exe,,
user32+kernel32,activex.def/noi;
OPTLINK (R) for Win32 Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved
win32\api.obj
Error 2: File Not Found win32\api.obj
--- errorlevel 1
Failed. Return code: 1
build args: ...............
[ 0]: -V
[ 1]: -Xwin32
compiler args: ................
[ 0]: -op
[ 1]: -ID:\dm\recls-1.6.1\mappings\D
[ 2]: -Id:\dmd\bin\..\src\phobos
command line files: ...............
[ 0]: activex.d
declared source files: ...............
[ 0]: win32\api.d
[ 1]: win32\com\oaidl.d
[ 2]: activex.d
import roots: .................
[ 0]: D:\dm\recls-1.6.1\mappings\D\
[ 1]: d:\dmd\src\phobos\
[ 2]: I:\pgm\d\examples\activex\win32\
[ 3]: I:\pgm\d\examples\activex\win32\com\
ignored packages: .................
[ 0]: phobos
[ 1]: win32 | I hope that helps. |
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Sun Apr 17, 2005 10:15 pm Post subject: |
|
|
Thanks, that did help. I've made a mistake in the utility in that if a module is in a package which is at the current directory level, then it will not be excluded. Currently, Build will only exclude "win32" if if finds the pattern "\win32\" in the path or if it finds "win32.d" as the file. In your case, the package path was "win32\" (no leading slash) so I didn't exclude it.
Sorry
Update coming within the hour. _________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Sun Apr 17, 2005 10:57 pm Post subject: |
|
|
Thanks for the quick fix. The new version works great. |
|
Back to top |
|
|
|