[Scons-users] Why I have two environment with different action?

Pierre-Luc Boily pierreluc.boily at gmail.com
Thu Nov 14 23:43:13 EST 2019


Hello!

I have the following error message 
scons: *** Two environments with different actions were specified for the
same target: MSVC14.1\x86\debug\empty.obj
(action 1: cl /Foempty.obj /c empty.cpp /nologo /FC -Od -D_DEBUG -RTC1 -MDd
-Z7 -DBOOST_FILESYSTEM_VERSION=2 -DWIN32 -D_WIN32 -DWINDOWS -D_MBCS
-DNOMINMAX -D_WIN32_WINNT=0x0501 -D_CRT_SECURE_NO_WARNINGS -W3 -nologo -GS
-GR -EHa -wd4290 -wd4996 -wd4995 -TP -D_MSC_VER=1916 -DBUILD_FOR_VS2017
-D_CONSOLE /Z7)
(action 2: cl /Foempty.obj /c empty.cpp /nologo /FC -Od -D_DEBUG -RTC1 -MDd
-Z7 -DBOOST_FILESYSTEM_VERSION=2 -DWIN32 -D_WIN32 -DWINDOWS -D_MBCS
-DNOMINMAX -D_WIN32_WINNT=0x0501 -D_CRT_SECURE_NO_WARNINGS -W3 -nologo -GS
-GR -EHa -wd4290 -wd4996 -wd4995 -TP -D_MSC_VER=1916 -DBUILD_FOR_VS2017 /Z7)
File
"C:\SVN\products\faa_mx\vs2017.install2\cm\env\scons\adacelBuilders\pseudoBuilders.py",
line 30, in buildLibrary

I do understand what does that mean, but I don't understand why i don't
always get the message. 

If I do
>scons install -j8
I don't have the error message

If I do
>scons install-p3d install-sdk -j8
I have the error message

Sconscript that invoke the installation : https://pastebin.com/Q53fcUzc
Sconscript that cause the problem: https://pastebin.com/F7559DSm
fix to resolve the problem: https://pastebin.com/8Rr8aQEz

I feel that the problem is when I specify 2 targets at command line, there
are 2 threads that are reading the same sconscript at the same time.  Could
it be a semaphore problem?

As you can see, the workaround I found is to clone two environment in my
sconscript.  Now, I am scared that my scons implementation might hide an
architecture problem...



--
Sent from: http://scons.1086193.n5.nabble.com/Users-f16930.html


More information about the Scons-users mailing list