2025-07-21 16:23 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000552Spring engineGeneralpublic2007-07-18 17:51
Reporterimbaczek 
Assigned Totvo 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000552: scons build doesn't work
Descriptionfilelist.py was broken in revision 3839:

scons: *** Two environments with different actions were specified for the same target: build\rts\System\creg\creg.o

(windows + mingw.)
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files
  • patch file icon fix_scons_ai_multiple_environments_failure.patch (2,828 bytes) 2007-07-15 16:51 -
    Index: rts/build/scons/filelist.py
    ===================================================================
    --- rts/build/scons/filelist.py	(revision 3948)
    +++ rts/build/scons/filelist.py	(working copy)
    @@ -120,19 +120,16 @@
     
     
     def get_globalAI_source(env, which):
    -	engine_files = []
    -	if which == 'KAI-0.22':
    -		engine_files += get_source(env, 'rts/System/creg') + ['rts/System/float3.cpp']
    -	return get_AI_source(env, 'AI/Global', which) + engine_files
    +	return get_AI_source(env, 'AI/Global', which)
     
     
     def get_groupAI_source(env, which):
    -	engine_files = []
    -	if which == 'EconomyAI' or which == 'MexUpgraderAI':
    -		engine_files += get_source(env, 'rts/System/creg') + ['rts/System/float3.cpp']
    -	return get_AI_source(env, 'AI/Group', which) + engine_files
    +	return get_AI_source(env, 'AI/Group', which)
     
     
    +def get_shared_AI_source(env):
    +	return get_source(env, 'rts/System/creg') + ['rts/System/float3.cpp']
    +
     def list_AIs(env, path, exclude_list = (), exclude_regexp = '^\.'):
     	exclude = re.compile(exclude_regexp)
     	files = os.listdir(path)
    Index: SConstruct
    ===================================================================
    --- SConstruct	(revision 3948)
    +++ SConstruct	(working copy)
    @@ -149,9 +149,19 @@
     # Use subst() to substitute $installprefix in datadir.
     install_dir = os.path.join(aienv['installprefix'], aienv['libdir'], 'AI/Helper-libs')
     
    +# store shared ai objects so newer scons versions don't choke with
    +# *** Two environments with different actions were specified for the same target
    +aiobjs = []
    +for f in filelist.get_shared_AI_source(aienv):
    +        while isinstance(f, list):
    +                f = f[0]
    +        fpath, fbase = os.path.split(f)
    +        fname, fext = fbase.rsplit('.', 1)
    +        aiobjs.append(aienv.Object(os.path.join(fpath, fname + '-ai'), f))
    +
     #Build GroupAIs
     for f in filelist.list_groupAIs(aienv, exclude_list=['build']):
    -	lib = aienv.SharedLibrary(os.path.join('game/AI/Helper-libs', f), filelist.get_groupAI_source(aienv, f))
    +	lib = aienv.SharedLibrary(os.path.join('game/AI/Helper-libs', f), aiobjs + filelist.get_groupAI_source(aienv, f))
     	Alias(f, lib)         # Allow e.g. `scons CentralBuildAI' to compile just an AI.
     	Alias('GroupAI', lib) # Allow `scons GroupAI' to compile all groupAIs.
     	Default(lib)
    @@ -166,7 +176,7 @@
     
     #Build GlobalAIs
     for f in filelist.list_globalAIs(aienv, exclude_list=['build', 'CSAI', 'TestABICAI','AbicWrappersTestAI']):
    -	lib = aienv.SharedLibrary(os.path.join('game/AI/Bot-libs', f), filelist.get_globalAI_source(aienv, f))
    +	lib = aienv.SharedLibrary(os.path.join('game/AI/Bot-libs', f), aiobjs + filelist.get_globalAI_source(aienv, f))
     	Alias(f, lib)          # Allow e.g. `scons JCAI' to compile just a global AI.
     	Alias('GlobalAI', lib) # Allow `scons GlobalAI' to compile all globalAIs.
     	Default(lib)
    
    patch file icon fix_scons_ai_multiple_environments_failure.patch (2,828 bytes) 2007-07-15 16:51 +

-Relationships
+Relationships

-Notes

~0000973

tvo (reporter)

It seem to be warnings, so just ignore them for now I'd say.

~0000976

imbaczek (reporter)

It's a fatal error, build doesn't even start.

$ scons -v
SCons by Steven Knight et al.:
        script: v0.96.95.D002, 2007/02/14 11:01:59, by knight on roxbury
        engine: v0.96.95.D002, 2007/02/14 11:01:59, by knight on roxbury
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007 The SCons Foundation

if that helps.

~0000981

tvo (reporter)

Ah ok, maybe they made it a fatal error in later versions then.

SCons by Steven Knight et al.:
        engine: v0.96.1.D001, 2004/08/23 09:55:29, by knight on casablanca
Copyright (c) 2001, 2002, 2003, 2004 The SCons Foundation

~0000982

imbaczek (reporter)

I noticed some changes in filelist.py, but those don't help. I'm not a scons guru, but googling for this error message gives http://www.scons.org/doc/0.96.95/HTML/scons-user.html#AEN1035.

~0001001

imbaczek (reporter)

I submitted a patch that makes AIs build under scons version
$ scons -v
SCons by Steven Knight et al.:
        script: v0.97.D001, 2007/05/17 11:35:19, by knight on roxbury
        engine: v0.97.D001, 2007/05/17 11:35:19, by knight on roxbury
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007 The SCons Foundation

~0001013

tvo (reporter)

committed, thanks
+Notes

-Issue History
Date Modified Username Field Change
2007-06-23 21:12 imbaczek New Issue
2007-06-23 22:20 tvo Note Added: 0000973
2007-06-23 23:10 imbaczek Note Added: 0000976
2007-06-25 10:15 tvo Note Added: 0000981
2007-06-25 15:43 imbaczek Note Added: 0000982
2007-07-15 16:51 imbaczek File Added: fix_scons_ai_multiple_environments_failure.patch
2007-07-15 16:52 imbaczek Note Added: 0001001
2007-07-18 17:51 tvo Status new => resolved
2007-07-18 17:51 tvo Resolution open => fixed
2007-07-18 17:51 tvo Assigned To => tvo
2007-07-18 17:51 tvo Note Added: 0001013
+Issue History