Repository navigation
Description
This issue was originally created at: 2007-05-05 10:45:59.
This issue was reported by: aalexand.
aalexand said at 2007-05-05 10:45:59
In my Sconscript file I write something like
env['PDB'] = '${TARGET}.pdb'
I expect that PDB name will be expanded to "app.exe.pdb" (yes, I would use more
complex expression to remove the suffix). But TARGET doesn't get expanded - I
get only ".pdb".The idea of having this working is to be able to use the same build environment
to build different targets with PDBs.
stevenknight said at 2007-05-25 14:53:04
Hello Alexei--
A simple test that I created:
env = Environment()
env['PDB'] = '${TARGET}.pdb'
env.Program('test.exe', 'test.cpp')Seems to show that this can work:
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
cl /nologo /TP /c test.cpp /Fotest.obj /Z7
test.cpp
link /nologo /OUT:test.exe /PDB:test.exe.pdb /DEBUG test.obj
scons: done building targets.So we need to figure out what in your configuration is causing the problem. It
makes sense to start with where and how you're calling the Program() builder (or
whatever other builder creates "app.exe"). Actually, the whole initialization
of the environment might also be relevant. Can you supply a more complete test
case that demonstrates the problem?
aalexand said at 2007-05-27 01:05:04
Created an attachment (id=194)
Reproduce use case for wrong PDB path
aalexand said at 2007-05-27 01:07:03
2 comments on this bug:
FIRST, Your test case works for me as well, so I had to play with the problem
here trying to narrow it down. It turns out that adding another Program built
with the same Env reproduces my problem:env = Environment()
env['PDB'] = '${TARGET}.pdb'
env.Program('test.exe', 'test.cpp')
env.Program('test2.exe', 'test2.cpp')It gives the following error message (the same as I'm seeing in my production
use case):scons: *** Multiple ways to build the same target were specified for: .pdb
(from ['test.obj'] and from ['test2.obj'])SECOND, in my particular use case it doesn't work with one target either. The
problem is different though. My use case is a hierarchical build with root
SConstruct file setting up the build environment and then calling child
SConscript-s. Those are in subdirectories of the root directory - like 'src',
'test' etc. The SConstruct file uses separate-build-and-source feature putting
intermediate stuff into .build directory. Output binaries are installed into
root #bin directory. I've simplified all this to a use case which is attached
(wrong-pdb-path-use-case.zip). The error message I'm getting isscons: Reading SConscript files ...
#src SConscript
scons: done reading SConscript files.
scons: Building targets ...
cl /nologo /TP /c src\test.cpp /Fo.build\test.obj /Z7
test.cpp
link /nologo /OUT:.build\test.exe /PDB:src.build\test.exe.pdb /DEBUG
.build\test.obj
LINK : fatal error LNK1201: error writing to program database
'D:\tmp\000\src.build\test.exe.pdb'; check for insufficient disk space,
invalid path, or insufficient privilege
scons: *** [.build\test.exe] Error 1201
scons: building terminated because of errors.It seems that PDB is created in a wrong location - the directory is different
from the target directory.
stevenknight said at 2007-05-30 10:23:06
Fixes for both problems have been integrated for next release. Many thanks for
the clear test cases.
stevenknight said at 2007-09-19 23:27:08
*** Issue 1732 has been marked as a duplicate of this issue. ***
aalexand attached wrong-pdb-path-use-case.zip at 2007-05-27 01:05:04.
Reproduce use case for wrong PDB path
stevenknight said this issue blocks #1664 at 2007-05-30 10:23:06.
stevenknight said this issue is duplicated by #1732 at 2007-09-19 23:27:08.
Activity