[Scons-users] Scons 2.3.2 regression for 64 bit MSVC compilers

Kay Hayen kay.hayen at gmail.com
Wed Jul 23 04:07:51 EDT 2014


Hello William,

I just noticed, I only sent the traces to you. When looking at the code
diff 2.3.0 -> 2.3.2, I noticed this:

-    # If the user hasn't specifically requested a TARGET_ARCH, and
-    # The TARGET_ARCH is amd64 then also try 32 bits if there are no viable
-    # 64 bit tools installed
     try_target_archs = [target_platform]
-    if not req_target_platform and target_platform in ('amd64','x86_64'):
+    debug("msvs_find_valid_batch_script(): req_target_platform %s
target_platfo
+
+    # VS2012 has a "cross compile" environment to build 64 bit
+    # with x86_amd64 as the argument to the batch setup script
+    if req_target_platform in ('amd64','x86_64'):
+        try_target_archs.append('x86_amd64')
+    elif not req_target_platform and target_platform in ['amd64','x86_64']:
+        # There may not be "native" amd64, but maybe "cross" x86_amd64
tools
+        try_target_archs.append('x86_amd64')
+        # If the user hasn't specifically requested a TARGET_ARCH, and
+        # The TARGET_ARCH is amd64 then also try 32 bits if there are no
viable
+        # 64 bit tools installed
         try_target_archs.append('x86')

This may well explain my trouble. I do request TARGET_ARCH "amd64", but I
only have a cross compiler, Visual Studio 2008 installed (required to link
against Python2.7). Also, people use 32 and 64 bits Python, and I need to
insist the compiler matches.

So the old code will give "try_target_archs" as [ "x86_64", "x86" ], where
the new code only gives me [ "x86_64", "x86_amd64" ], which is more correct.

However, in my case, "vcvars64.bat" of the "x86" compiler is not attempted
in this case. Only "vcallvars.bat x86_amd64", which will listed in the /h
output, gives an error. With 2.3.0, this error also occured, but then
"vcvars64.bat" is tried, and works.

So, I believe this is a regression of Scons with VS 2018 and x86_64 as a
requested target platform.

Yous,
Kay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20140723/dcf4ffdd/attachment.html>


More information about the Scons-users mailing list