gpt4 book ai didi

c++ - 英特尔 c/c++ 编译器 : "could not locate executable icc" (and ecc)

转载 作者:塔克拉玛干 更新时间:2023-11-03 06:47:47 26 4
gpt4 key购买 nike

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

我在安装的时候,只标出编译器和调试器相关的选项(或包),并告诉安装者我要编译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

对我正在做的事情进行“循序渐进”:

在命令行输入:

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?还是别的什么?,如果是这样,我该如何解决?有什么方向吗?

提前致谢。问候。

--------------------编辑------------------------ ----------


在@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 首先尝试找到它的路径(可能是:/usr/include/x86_64-linux-gnu/c++/4.7)并添加它像下面的 icc

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

关于c++ - 英特尔 c/c++ 编译器 : "could not locate executable icc" (and ecc),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19817322/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com