[Scons-dev] Bug #2849 is not fixed (64-bit MS Windows 7 fails to build with 32-bit Visual Express C++ 2010).

Edward d'Auvergne edward at nmr-relax.com
Mon Oct 22 05:12:07 EDT 2012


Ok, just ran some checks. I added the line:

print(env.items())

to the end of the relax_fit() method. On a GNU/Linux 64-bit system, I see:

('TARGET_ARCH', None)

but when running on the 64-bit Windows 7 system, I see:

('TARGET_ARCH', 'x86')

Maybe the bug is in setting the TARGET_ARCH? At no point do I set
that variable.

Regards,

Edward



On 22 October 2012 10:44, Edward d'Auvergne <edward at nmr-relax.com> wrote:

> Hi,

>

> The build script for my project (http://www.nmr-relax.com) is viewable at:

>

> http://svn.gna.org/viewcvs/relax/trunk/sconstruct?view=log

>

> Note this file is quite large. The building of Python C modules which

> triggers this bug on MS Windows is essentially in the relax_fit()

> method. On a side note, the main script additionally imports from the

> modules in the 'scons' package

> (http://svn.gna.org/viewcvs/relax/trunk/scons/). I will now check

> what env['TARGET_ARCH'] is set to.

>

> Cheers,

>

> Edward

>

>

>

>

> On 22 October 2012 03:51, William Deegan <bill at baddogconsulting.com> wrote:

>> Edward,

>>

>> On Oct 18, 2012, at 7:03 AM, Edward d'Auvergne <edward at nmr-relax.com> wrote:

>>

>>> Hi,

>>>

>>> I have tested out Scons 2.2.0 and have noticed that bug #2849

>>> (http://scons.tigris.org/issues/show_bug.cgi?id=2849) is still

>>> present. I can see this also from the code:

>>>

>>> https://bitbucket.org/scons/scons/src/8764000345e06e326ef68fd0acf9366c1f3eb885/src/engine/SCons/Tool/MSCommon/vc.py?at=default

>>>

>>> in the lines:

>>>

>>> try_target_archs = [target_platform]

>>> if not req_target_platform and target_platform in ('amd64','x86_64'):

>>> try_target_archs.append('x86')

>>>

>>> The suggestion by Kyle Strand was to change to code from:

>>>

>>> try_target_archs = [target_platform]

>>> if not req_target_platform and target_platform=='amd64'

>>> try_target_archs.append('x86')

>>>

>>> to:

>>>

>>> try_target_archs = [target_platform]

>>> if target_platform in ('amd64','x86_64'):

>>> try_target_archs.append('x86')

>>>

>>> The key problem is that in this case is that 'req_target_platform' is

>>> set to 'x86_64' when 32-bit C++ is used on 64-bit Windows (and no

>>> 64-bit compiler is present). Taking out the 'req_target_platform'

>>> check fixes the problem for Scons 2.2.0.

>>

>>

>> Can you post your SConstruct/SConscript?

>>

>> env['TARGET_ARCH'] shouldn't have any default setting, this is what provides a value to req_target_platform.

>> So in the case that a user explicitly requests a platform, we do not add any other platforms to be searched for.

>>

>> As far as I can tell that is the way the code is behaving.

>> If you have an example showing a bug where TARGET_ARCH is not set, and it's not also trying 32bit, please let me know.

>>

>> Thanks,

>> Bill

>> _______________________________________________

>> Scons-dev mailing list

>> Scons-dev at scons.org

>> http://two.pairlist.net/mailman/listinfo/scons-dev



More information about the Scons-dev mailing list