英特尔c / c + +编译器:“无法find可执行文件icc”(和ecc)

我最近安装了一个用于linux的英特尔c / c ++编译器:“用于Linux的英特尔®C ++ Composer XE”。

当我在做安装时,只标记了与编译器和debugging器有关的选项(或包),并且向instaler表示我将编译64位应用程序。

现在,当我尝试编译一个程序,我得到:

meniwis @ meniwis-Satellite-L845:〜/ syscave / src / c-ext / code $ ./build.sh

Could not locate executable icc Could not locate executable ecc INFO:root:using /opt/alges/ as sqlite3 directory INFO:root:using /opt/alges/ as HDF5 directory running build_ext running build_src build_src building extension "cvoronoi" sources building extension "cflowsim" sources build_src: building npy-pkg config files customize IntelCCompiler customize IntelCCompiler using build_ext customize IntelCCompiler customize IntelCCompiler using build_ext building 'cvoronoi' extension compiling C++ sources C compiler: icc -fPIC compile options: '-g -I/home/meniwis/syscave/src/c-ext/code/../include - I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c' icc: /home/meniwis/syscave/src/c-ext/code/cvoronoi.cpp sh: 1: icc: not found sh: 1: icc: not found error: Command "icc -fPIC -g -I/home/meniwis/syscave/src/c-ext/code/../include - I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c /home/meniwis/syscave/src/c-ext/code/cvoronoi.cpp -o build/temp.linux-x86_64- 2.7/home/meniwis/syscave/src/c-ext/code/cvoronoi.o" failed with exit status 127 

我正在做一个“循序渐进”的工作:

在命令行中input:

 meniwis@meniwis-Satellite-L845:~/syscave/src/c-ext/code$ ./build.sh 

下一个是“build.sh”文件:

 export HDF5_DIR=/opt/alges/ export SQLITE3_DIR=/opt/alges/ export SYSCAVE_ROOT=/home/meniwis/syscave/ python setup.py build_ext --inplace 

“setup.py”文件的一部分:

 . . . voronoi_src_dir=abspath(pjoin(syscave_root,'src/c-ext/code')) cflowsim_src_dir=abspath(pjoin(syscave_root,'src/c-ext/code/flowsim/code/Flowsim')) extensions = [ Extension('cvoronoi', sources=[ pjoin(voronoi_src_dir,'cvoronoi.cpp'), pjoin(voronoi_src_dir,'VoronoiDiagramGenerator.cpp') ], language = "c++", include_dirs=[pjoin(voronoi_src_dir,'../include')], extra_objects=lib_args['extra_compile_args'] ), Extension('cflowsim', sources=[ pjoin(cflowsim_src_dir,'cflowsim.cpp'), pjoin(cflowsim_src_dir,'parsers.cpp'), pjoin(cflowsim_src_dir,'Cell.cpp'), pjoin(cflowsim_src_dir,'ChunkDriver.cpp'), pjoin(cflowsim_src_dir,'DataLoader.cpp'), pjoin(cflowsim_src_dir,'DisplayResult.cpp'), pjoin(cflowsim_src_dir,'Drawbell.cpp'), pjoin(cflowsim_src_dir,'DrawbellType.cpp'), pjoin(cflowsim_src_dir,'Drawpoint.cpp'), pjoin(cflowsim_src_dir,'ExtractionResult.cpp'), pjoin(cflowsim_src_dir,'Model.cpp'), pjoin(cflowsim_src_dir,'Simulator.cpp'), pjoin(cflowsim_src_dir,'Tracer.cpp'), ], language = "c++", extra_objects=lib_args['extra_compile_args'], **lib_args ) ] #move to packages #all default to ext_dir ext_run_dir=abspath(pjoin(syscave_root,'src/python/syscave/extensions/')) moves=[] for ext in extensions: if ext.name not in moves: moves.append((ext.name,ext_run_dir)) moves.append(None) ext_src_dir=pjoin(syscave_root,'src','c-ext','code') #='.' file_ext='' if os.name=='posix': file_ext='so' build_path=abspath(ext_src_dir) elif os.name=='nt': file_ext='pyd' build_path=abspath(ext_src_dir) else: raise EnvironmentError('Unsupported platform: {0}'.format(os.name)) for i,m in enumerate(moves): if m is None: continue name,new_path=m file_name=".".join([name,file_ext]) file_path_from=os.path.join(build_path,file_name) file_path_to =os.path.join(new_path,file_name) moves[i]=(file_path_from,file_path_to) . . . 

所以错误是icc和ecc不能find? 还是别的什么?如果是这样,我该如何解决? 任何方向?

提前致谢。 素不相识。

– – – – – – – – – – -编辑 – – – – – – – – – – – – – – ——


在@Vahid abdi的帮助下,我做下一个:

 export PATH=$PATH:/opt/intel/bin/ 

现在我得到:

 meniwis@meniwis-Satellite-L845:~/syscave/src/c-ext/code$ ./build.sh Found executable /opt/intel/bin/icc Could not locate executable ecc INFO:root:using /opt/alges/ as sqlite3 directory INFO:root:using /opt/alges/ as HDF5 directory running build_ext running build_src build_src building extension "cvoronoi" sources building extension "cflowsim" sources build_src: building npy-pkg config files customize IntelCCompiler customize IntelCCompiler using build_ext customize IntelCCompiler customize IntelCCompiler using build_ext building 'cvoronoi' extension compiling C++ sources C compiler: icc -fPIC compile options: '-g -I/home/meniwis/syscave/src/c-ext/code/../include - I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c' icc: /home/meniwis/syscave/src/c-ext/code/cvoronoi.cpp In file included from /usr/include/c++/4.8/bits/stl_tree.h(61), from /usr/include/c++/4.8/map(60), from /home/meniwis/syscave/src/c- ext/code/../include/VoronoiDiagramGenerator.h(36), from /home/meniwis/syscave/src/c-ext/code/cvoronoi.cpp(9): /usr/include/c++/4.8/bits/stl_algobase.h(59): catastrophic error: cannot open source file "bits/c++config.h" #include <bits/c++config.h> ^ compilation aborted for /home/meniwis/syscave/src/c-ext/code/cvoronoi.cpp (code 4) In file included from /usr/include/c++/4.8/bits/stl_tree.h(61), from /usr/include/c++/4.8/map(60), from /home/meniwis/syscave/src/c- ext/code/../include/VoronoiDiagramGenerator.h(36), from /home/meniwis/syscave/src/c-ext/code/cvoronoi.cpp(9): /usr/include/c++/4.8/bits/stl_algobase.h(59): catastrophic error: cannot open source file "bits/c++config.h" #include <bits/c++config.h> ^ compilation aborted for /home/meniwis/syscave/src/c-ext/code/cvoronoi.cpp (code 4) error: Command "icc -fPIC -g -I/home/meniwis/syscave/src/c-ext/code/../include - I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c /home/meniwis/syscave/src/c-ext/code/cvoronoi.cpp -o build/temp.linux-x86_64- 2.7/home/meniwis/syscave/src/c-ext/code/cvoronoi.o" failed with exit status 4 

请帮忙。 提前致谢。

现在问题是icc无法打开bits/c++config.h

如果你有bits/c++config.h首先尝试找到它的路径(这可能是: bits/c++config.h 4.7),并将其添加到icc如下

 export __INTEL_POST_CFLAGS="-I/usr/include/x86_64-linux-gnu/c++/4.7" 

你是怎么安装icc的?

icc不在你的$ PATH变量中

首先查找icc路径updatedb && locate icc

然后将它的基本名称添加到您的$ PATH变量,如下所示:

 export PATH=$PATH:/path/to/youricc/basename