[Scons-users] intelc incorrect PATH

orenaud at coventor.com orenaud at coventor.com
Fri Nov 29 20:06:59 EST 2019


Hi again,

I have another problem with the Intel C++ compiler Tool. This is with SCons 3.1.1 on Windows, and Intel C++ 17.0 (2017.4.210).

When I setup the tool using env.Tool('intelc', version='17.0'), everything is setup correctly except the PATH. The PATH is prepended with C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.4.210\windows\Bin instead of C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.4.210\windows\bin\intel64 (the difference is the \intel64 at the end). This results in the error "'icl' is not recognized as an internal or external command, operable program or batch file" at compile time.

In intelc.py, starting at line 517, we look for the registry keys IncludeDir, LibDir and BinDir in various places in the registry database. In my case, it finds the first two in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Intel\Suites\17.0\{628372B0-F927-4A3A-8D5A-A67B6E5EA0F8}\C++\EM64T_NATIVE. So far so good. The problem is that the third key, BinDir, does not exist! Maybe my installation is broken, maybe this key is never set.

We're almost there, though! At line 509, there is a tuple of tuples composed of three elements: the env variable to prepend to, the registry key, and a fallback value.

#       env key    reg valname   default subdir of top
paths=(('INCLUDE', 'IncludeDir', 'Include'),
       ('LIB'    , 'LibDir',     'Lib'),
       ('PATH'   , 'BinDir',     'Bin'))

Instead of 'Bin' as the fallback value for the PATH, we should have 'bin/{arch}'. But this value already exists, it has been set in the local variable bindir at line 477. And indeed, if I replace 'Bin' with bindir, icl is in the PATH again.

So, I suggest to change 'Bin' to bindir. There is also a libdir variable, but its value (lib/intel64) does not match what we need (The value of the registry key on my machine is $(ICInstallDir)compiler\lib\intel64_win;$(ICInstallDir)ipp\lib\intel64_win).

Olivier Renaud
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20191130/cf62d0d1/attachment.html>


More information about the Scons-users mailing list