简体   繁体   中英

EnvironmentError: No tool named 'fastcpp': not a Zip file:

I am compiling some proprietary code and trying to build an image. Here I am getting an error of

EnvironmentError: No tool named 'fastcpp': not a Zip file:
  File ".../build/ms/target.scons", line 145:
    env.Tool('ComSConstruct', toolpath = ['${BUILD_ROOT}/tools/build/scons/build'])
  File "/usr/lib/scons/SCons/Environment.py", line 1786:
    tool(self)
  File "/usr/lib/scons/SCons/Tool/__init__.py", line 191:
    self.generate(env, *args, **kw)
  File ".../tools/build/scons/build/ComSConstruct.py", line 54:
    env.LoadImageUnits(env.get('IMAGE_ROOT_DIR_PATTERNS'))
  File "/usr/lib/scons/SCons/Environment.py", line 223:
    return self.method(*nargs, **kwargs)
  File ".../tools/build/scons/scripts/utils.py", line 1286:
    load_sub_scripts(env, dir_patterns, script_name_patterns, "image", clone_env=True)
  File ".../tools/build/scons/scripts/utils.py", line 1540:
    node.load_scripts(script_list, script_type, clone_env=clone_env)
  File ".../tools/build/scons/scripts/utils.py", line 1585:
    env.SConscript(script, exports='env')
  File "/usr/lib/scons/SCons/Script/SConscript.py", line 546:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/usr/lib/scons/SCons/Script/SConscript.py", line 260:
    exec _file_ in call_stack[-1].globals
  File ".../bsp/devcfg/build/SConscript", line 312:
    SetupDevCfgBuild(devcfg_env, aliases, 'devcfg')
  File ".../bsp/devcfg/build/SConscript", line 103:
    env.LoadToolScript('llvm', toolpath = ['${BUILD_SCRIPTS_ROOT}'])
  File "/usr/lib/scons/SCons/Environment.py", line 223:
    return self.method(*nargs, **kwargs)
  File ".../tools/build/scons/scripts/utils.py", line 1268:
    m.generate(env)
  File ".../tools/build/scons/scripts/llvm.py", line 849:
    env.Tool('fastcpp')
  File "/usr/lib/scons/SCons/Environment.py", line 1785:
    tool = SCons.Tool.Tool(tool, toolpath, **kw)
  File "/usr/lib/scons/SCons/Tool/__init__.py", line 105:
    module = self._tool_module()
  File "/usr/lib/scons/SCons/Tool/__init__.py", line 165:
    raise SCons.Errors.EnvironmentError(m)

I downloaded the fastcpp from here but not able to understand how can I install it as it has some code files having.hpp extensions.

I have already install scons successfully.

Can anyone explain what is fastcpp and how to use it to fix above error?

UPDATE: 19/08/2020

It has ComSConstruct.py module located at '${BUILD_ROOT}/tools/build/scons/build' still it is giving above errors.

I replaced this above path with the path where FastCpp files are present. Now the error is changed to ComSConstruct tool.

EnvironmentError: No tool named 'ComSConstruct': not a Zip file:
  File ".../build/ms/target.scons", line 146:
    env.Tool('ComSConstruct', toolpath = ['/home/tk/tools_used/FastCpp'])
  File "/usr/lib/scons/SCons/Environment.py", line 1785:
    tool = SCons.Tool.Tool(tool, toolpath, **kw)
  File "/usr/lib/scons/SCons/Tool/__init__.py", line 105:
    module = self._tool_module()
  File "/usr/lib/scons/SCons/Tool/__init__.py", line 165:
    raise SCons.Errors.EnvironmentError(m)

Finally, I got the solution.

There were some fixes in the proprietary code. I got the patches and applied them manually.

Then, updated the clang 3.4 to clang 4.0 by following below commands. (Failed to install higher clang versions. I think, probably 14.0 is not supporting higher versions.)

sudo apt-add-repository "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-4.0 main"
sudo apt-get update
sudo apt-get install clang-4.0 lldb-4.0

Compiled again and it worked. :)

You have to delete scons in your Linux. That scripts use local scons environment.

in error codes:

-> /usr/lib/scons : you have a scons lib by apt-get install scons maybe

-> if you autoremove scons and then That script run in local scons environment in ../build/ms (it might Q codes)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM