[Scons-users] Second build of target omitting source file from compiler invocation on Windows

Gary Oberbrunner garyo at oberbrunner.com
Fri Mar 7 15:00:39 EST 2014


Are you by any chance using MSVC_BATCH to batch up compilation commands?


On Fri, Mar 7, 2014 at 2:41 PM, Andrew C. Morrow
<andrew.c.morrow at gmail.com>wrote:


>

> I am experiencing a puzzling build issue, only on Windows, when using

> SCons 2.3.0.

>

> The first time I build the target, it builds correctly. But the second

> time I build the target (which has AlwaysBuild applied, so this is not a

> no-op), the source file name is strangely omitted from the compiler

> invocation.

>

> First invocation of build (from a clean tree), results in this command,

> which succeeds:

>

> cl /Fobuild\xxx\include_dbclienth_test.obj /c

> src\mongo\client\include_dbclienth_test.cpp /TP /nologo /EHsc /W3 /wd4355

> /wd4800 /wd4267 /wd4244 /wd429

> 0 /we4099 /Z7 /errorReport:none /MTd /O2 /Oy-

> /IC:\cygwin\home\andrew\Documents\10gen\dev\opt\include

> /Ibuild\xxx\third_party\gtest-1.7.0\include /Isr

> c\third_party\gtest-1.7.0\include /Ibuild\xxx\third_party\snappy

> /Isrc\third_party\snappy /Ibuild\xxx\third_party\libstemmer_c\include

> /Isrc\third_par

> ty\libstemmer_c\include /Ibuild\xxx\third_party\s2 /Isrc\third_party\s2

> /Ibuild\xxx\third_party\pcre-8.30 /Isrc\third_party\pcre-8.30

> /IC:\local\boost

> _1_55_0 /IC:\cygwin\home\andrew\Documents\10gen\dev\src\winpcap\Include /Z7

>

> Second invocation results in the following command, which fails:

>

> cl /Fobuild\xxx\include_dbclienth_test.obj /c /TP /nologo /EHsc /W3

> /wd4355 /wd4800 /wd4267 /wd4244 /wd4290 /we4099 /Z7 /errorReport:none /MTd

> /O2 /Oy

> - /IC:\cygwin\home\andrew\Documents\10gen\dev\opt\include

> /Ibuild\xxx\third_party\gtest-1.7.0\include

> /Isrc\third_party\gtest-1.7.0\include /Ibuild\xx

> x\third_party\snappy /Isrc\third_party\snappy

> /Ibuild\xxx\third_party\libstemmer_c\include

> /Isrc\third_party\libstemmer_c\include /Ibuild\xxx\third_pa

> rty\s2 /Isrc\third_party\s2 /Ibuild\xxx\third_party\pcre-8.30

> /Isrc\third_party\pcre-8.30 /IC:\local\boost_1_55_0

> /IC:\cygwin\home\andrew\Documents\10

> gen\dev\src\winpcap\Include /Z7

> cl : Command line error D8003 : missing source filename

>

> Note that the second command does not reference the

> include_dbclienth_test.cpp file after the '/c' switch.

>

> Current environment is 64-bit Windows 7, VS2013 Express, using the x64

> cross tools shell to work around the missing VS2013 support in 2.3.0.

>

> If you would like to try to reproduce:

>

> > git clone https://github.com/mongodb/mongo-cxx-driver.git

> > git checkout legacy

> > scons --variant-dir=xxx --full --dbg=on --opt=on --64

> --prefix=<somewhere> --use-system-boost --cpppath=C:\local\boost_1_55_0

> --libpath=C:\local\boost_1_55_0\lib64-msvc-12.0 check-install-mongoclient

>

> You will need to have the prebuilt boost binaries installed somewhere,

> update the build line above as needed.

>

> This target works as expected on Linux and OSX.

>

> Any suggestions or ideas?

>

> Thanks,

> Andrew

>

>

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users

>

>



--
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20140307/68617cd6/attachment-0001.htm


More information about the Scons-users mailing list