[Scons-users] Two different environments were specified for target

Philipp Kraus philipp.kraus at flashpixx.de
Fri Feb 14 12:01:50 EST 2014


Yes I have got duplicated targets e.g. my "logger.cpp" is used in each
target. The warning is correct:

scons: warning: Two different environments were specified for target
/project/core/logger/message.o,
but they appear to have the same action: $CXX -o $TARGET -c $CXXFLAGS
$CCFLAGS $_CCCOMCOM $SOURCES
File "/project/test/logger/build.py", line 32, in <module>

scons: warning: Two different environments were specified for target
project/core/logger/message.o,
but they appear to have the same action: $CXX -o $TARGET -c $CXXFLAGS
$CCFLAGS $_CCCOMCOM $SOURCES
File "/project/test/lua/build.py", line 31, in <module>

In my case I need something like "dependency between aliases" eg:
A = env.Object(…)
B = env.Program(…)
C = env.Program(…)

B depends on A
C depends on A

In my organization of the project, I have got different build files for
each part, so I don't know to realize the
dependency over different build files.

Thx

Phil


On 2014-02-14 13:14:40 +0000, Gary Oberbrunner said:


> Please send the full error message along with the target names. Usually

> this comes from the same target (sometimes an intermediate one like an

> object file) with two different commands to build it.

> --

> Gary Oberbrunner

> (sent from my Android)

> On Feb 14, 2014 7:33 AM, "Philipp Kraus" <philipp.kraus at tu-clausthal.de> wrote:

> Hello,

>

> I get the warning "scons: warning: Two different environments were

> specified for target", but I don't know any idea to solve it.

>

> My project has got different parts:

>

> /core

> /service

> /tests

>

> tests and service depends on core, so my build command shows

> env.Program("service", source=["service.cpp"]+Glob("../core/*.cpp"))

> (equal call for tests).

> service & tests have got own sub SConstructs.

>

> How can I solve the problem with the warning?

>

> Thanks

>

> Phil

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

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

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20140214/bab79edd/attachment.html


More information about the Scons-users mailing list