MantisBT - Rosetta
View Issue Details
0000234Rosetta[All Projects] Input Handlingpublic2013-03-28 09:562013-04-04 16:33
scons mode=A,B vs. mode=B,A
Confirmed As Bug
0000234: if you use multiple extras options, SCons does not order consistently
pasted from a list email from Doug Renfrew:

Also, for those who may be unaware, if you use multiple extras options, keeping them in the same order will avoid a lot of headache. For example...

./ mode=release extras=mpi,static bin
./ mode=release extras=static,mpi bin

produces two different directory hierarchies in rosetta_source/build. You will end up with two sets of binarys and end up doing two compiles.

This should probably be a bug. It could be fixed if scons would sort the extras list alphabetically.

No tags attached.
Issue History
2013-03-28 09:56smlewisNew Issue
2013-03-28 11:40SergeyNote Added: 0000220
2013-03-28 11:45renfrewNote Added: 0000221
2013-03-28 11:45renfrewAssigned To => renfrew
2013-03-28 11:45renfrewStatusnew => assigned
2013-03-28 13:17renfrewNote Added: 0000222
2013-03-28 13:18renfrewAssigned Torenfrew =>
2013-03-28 13:24renfrewNote Added: 0000223
2013-03-28 13:36smlewisStatusassigned => acknowledged
2013-04-01 19:01rmorettiNote Added: 0000235
2013-04-02 17:21renfrewNote Added: 0000243
2013-04-02 17:33renfrewNote Edited: 0000243bug_revision_view_page.php?bugnote_id=243#r69
2013-04-04 16:31renfrewAssigned To => renfrew
2013-04-04 16:31renfrewStatusacknowledged => assigned
2013-04-04 16:33renfrewFixed in SVN Version => 54684
2013-04-04 16:33renfrewStatusassigned => resolved
2013-04-04 16:33renfrewFixed in Version => Trunk
2013-04-04 16:33renfrewResolutionopen => fixed

2013-03-28 11:40   
If anyone know the place where extras is process: just use sorted(<extra list>) so it always the same...
2013-03-28 11:45   
I am about to commit that change
2013-03-28 13:17   
I have decided not to commit this yet.

Changing line 255 in rosetta_source/tools/build/ from...
"-".join(options.extras) simply...


Prevents the creation of duplicated paths and different executable names, but a...

./ mode=debug extras=static,mpi

...followed by a...

./ mode=debug extras=mpi,static

...results in a full recompile.

Scons thinks they are different targets, I think.
2013-03-28 13:24   
I do not currently know how scons decides what needs to compiled and what does not need to be compiled. But I suspect that also needs to be changed. I am unassigning this from myself since I suspect I can be of no more help.
2013-04-01 19:01   
Line 180 in rosetta_source/tools/build/ probably also needs to change

Or better yet, sort the options.extras where there loaded in the setup_build_options() function in the same file. Probably about line 128, where "default" is set as the default extras tag.
2013-04-02 17:21   
(edited on: 2013-04-02 17:33)
So I guess I lied about trying to be more help. This patch seems to do the trick
diff --git a/rosetta_source/tools/build/ b/rosetta_source/tools/build/
index f48b502..cc34a5d 100644
--- a/rosetta_source/tools/build/
+++ b/rosetta_source/tools/build/
@@ -125,7 +125,9 @@ directory it is built to, and what settings it ultimately uses.

     # Nothing special is currently done to select mode, kind or extras
     if len(actual.extras) == 0:
- actual.extras.append("default")
+ actual.extras.append("default")
+ else :

     return requested, actual