[Scons-users] Problems with env.Install()
William Deegan
bill at baddogconsulting.com
Fri Jan 25 19:17:21 EST 2013
Michel,
On Jan 25, 2013, at 2:35 PM, Michel Lestrade <michel.lestrade at crosslight.com> wrote:
> Bill,
>
> On 25/01/2013 12:15 PM, William Deegan wrote:
>> I suggested those flags to help you figure out your problem.
>> As I said before without a test case and/or more of your code, it's not easy (or maybe even possible) to help you resolve this issue.
>>
>> So if a small test case doesn't replicated the issue, for example a SConstruct, and two SConscripts, one producing a list of files into an env variable, the other installing them somewhere doesn't replicate your issue and does work, then you should look at your code to see how it's different from the small test case. Likely that's where the error is.
>> Are you sure your have your Import()'s and Export()'s right?
>> How are you invoking your SConscripts..
>>
>> -Bill
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> http://four.pairlist.net/mailman/listinfo/scons-users
>>
> This project uses LGPL and similarly-licensed code so it was always intended that the SCons files would be made available at some point. They are just not very portable (and buggy, obviously) at the moment. The current version is attached.
>
> I updated my scripts a bit so that the env.Install() is always be done in the same place as env.Program(): that should eliminate any possible confusion with paths of the Install() wrt the various variant_dir. The problem occurs with 2 scripts in the esmumps and scotch sub-folders. esmumps is build twice (mpi and non-mpi variants) while scotch is built 4 times (static/shared, mpi/non-mpi).
>
> This should mean pthread64.dll gets copied a total of 6 times; instead, it only shows up in 4 of those 6 folders, without any apparent differences in the SConscript calls.
>
>> d:\Source\MUMPS_scons>dir /s /b build\scotch64\pth*.dll
>> d:\Source\MUMPS_scons\build\scotch64\esmumps\pthread64.dll
>> d:\Source\MUMPS_scons\build\scotch64\ptscotch\pthread64.dll
>> d:\Source\MUMPS_scons\build\scotch64\ptscotch_dll\pthread64.dll
>> d:\Source\MUMPS_scons\build\scotch64\scotch\pthread64.dll
>
> Even two folders with the same input environment do not behave in the same way. For example, scotch&esmumps share the same environment and both get the DLL while ptscotch&ptesmumps also use a common environment but only one of those gets the DLL. Even if I clean and rebuild, it is always those same folders which get the DLL.
I think it's an issue that you're mixing variant_dir with non-variant_dir SConscripts in the same directory and specifying duplicate=0.
esmumps = SConscript(dirs = 'esmumps', duplicate=0,
exports = {'env':env.Clone(LIBS=[libscotch,libscotcherrexit,env['LIBS']]),'mpi':0})
SConscript(dirs = 'scotch', duplicate=0,
exports = {'env':env.Clone(LIBS=[libscotch,libscotcherrexit,env['LIBS']]),'mpi':0})
And then:
ptesmumps = SConscript(dirs = 'esmumps', variant_dir = 'ptesmumps', duplicate=0,
exports = {'env':pt.Clone(LIBS=[libscotch,libscotcherrexit,libptscotch,pt['LIBS']]),'mpi':1})
SConscript(dirs = 'scotch', variant_dir = 'ptscotch', duplicate=0,
exports = {'env':pt.Clone(LIBS=[libscotch,libscotcherrexit,libptscotch,pt['LIBS']]),'mpi':1})
It'll see the pthread.dll in the non-variant dir build, and so it won't run the install again, and since you specify duplicate=0, it won't copy it to the variant dir.
Am I right that you are missing these files:
** d:\Source\MUMPS_scons\build\scotch64\ptesmumps\pthread64.dll
** d:\Source\MUMPS_scons\build\scotch64\scotch_dll\pthread64.dll
Check and see if there's a pthread64.dll in directories (esmumps and scotch)..
run:
scons -C
To do a full clean
Then do:
scons --debug=explain and look at all the install steps..
-Bill
More information about the Scons-users
mailing list