首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >配置:错误:安装带有Spack的HPCToolkit时无法运行C编译的程序

配置:错误:安装带有Spack的HPCToolkit时无法运行C编译的程序
EN

Stack Overflow用户
提问于 2021-03-13 21:27:06
回答 2查看 530关注 0票数 0

我试着按照这个教程安装HPCToolkit:http://hpctoolkit.org/software-instructions.html#Prerequisites

在输入"Spack install hpctoolkit“之后,我得到了一些错误消息

代码语言:javascript
运行
复制
2 errors found in build log:
     10    checking whether make supports nested variables... yes
     11    checking whether make sets $(MAKE)... (cached) yes
     12    checking for x86_64-conda-linux-gnu-gcc... /home/ncaa/spack/lib/spack/env/gcc/gcc
     13    checking whether the C compiler works... yes
     14    checking for C compiler default output file name... a.out
     15    checking for suffix of executables...
  >> 16    checking whether we are cross compiling... configure: error: in `/tmp/ncaa/spack-stage/spack-stage-libiconv-1.16-e7emipnlb4kfxggwdzwb7fgpbu5hpupy/spack-src':
  >> 17    configure: error: cannot run C compiled programs.
     18    If you meant to cross compile, use `--host'.
     19    See `config.log' for more details

See build log for details:
  /tmp/ncaa/spack-stage/spack-stage-libiconv-1.16-e7emipnlb4kfxggwdzwb7fgpbu5hpupy/spack-build-out.txt

spack-build-out.txt:

代码语言:javascript
运行
复制
==> libiconv: Executing phase: 'autoreconf'
==> libiconv: Executing phase: 'configure'
==> [2021-03-13-20:45:16.501013] Copying ./build-aux/config.guess to libcharset/build-aux/config.guess
==> [2021-03-13-20:45:16.510159] '/tmp/ncaa/spack-stage/spack-stage-libiconv-1.16-e7emipnlb4kfxggwdzwb7fgpbu5hpupy/spack-src/configure' '--prefix=/home/ncaa/spack/opt/spack/linux-centos7-x86_64/gcc-8.4.0/libiconv-1.16-e7emipnlb4kfxggwdzwb7fgpbu5hpupy' '--enable-extra-encodings'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make sets $(MAKE)... (cached) yes
checking for x86_64-conda-linux-gnu-gcc... /home/ncaa/spack/lib/spack/env/gcc/gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... configure: error: in `/tmp/ncaa/spack-stage/spack-stage-libiconv-1.16-e7emipnlb4kfxggwdzwb7fgpbu5hpupy/spack-src':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details

config.log (在OneDrive上):https://1drv.ms/u/s!Ah8JdDB38REth3K7XSgq6TZQ46eV?e=4z2bQI

我的平台和用户环境

代码语言:javascript
运行
复制
(env0) [ncaa@localhost ~]$ uname -a
Linux localhost.localdomain 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
(env0) [ncaa@localhost ~]$ cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core) 
(env0) [ncaa@localhost ~]$ gcc --version
gcc (crosstool-NG 1.24.0.133_b0863d8_dirty) 8.4.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
(env0) [ncaa@localhost ~]$ rpm -qa | grep glibc
glibc-2.17-157.el7_3.2.i686
compat-glibc-headers-2.12-4.el7.centos.x86_64
glibc-common-2.17-157.el7_3.2.x86_64
glibc-devel-2.17-157.el7_3.2.i686
compat-glibc-2.12-4.el7.centos.x86_64
glibc-2.17-157.el7_3.2.x86_64
glibc-devel-2.17-157.el7_3.2.x86_64
glibc-headers-2.17-157.el7_3.2.x86_64

(env0) [ncaa@localhost ~]$ spack config get compilers
compilers:
- compiler:
    spec: gcc@8.4.0
    paths:
      cc: /home/ncaa/anaconda3/envs/env0/bin/gcc
      cxx: /home/ncaa/anaconda3/envs/env0/bin/g++
      f77:
      fc:
    flags: {}
    operating_system: centos7
    target: x86_64
    modules: []
    environment: {}
    extra_rpaths: []

config.yaml (在OneDrive上):https://1drv.ms/u/s!Ah8JdDB38REth3P-jV-PP9P-bSjS?e=6ucN9e packages.yaml (在OneDrive上):https://1drv.ms/u/s!Ah8JdDB38REth3RTTTJGckufGQVT?e=fFs2YH

EN

回答 2

Stack Overflow用户

发布于 2021-03-13 22:07:10

运行"spack install xz“可以实现以下功能:

代码语言:javascript
运行
复制
(env0) [ncaa@localhost ~]$ spack install xz
==> Installing xz-5.2.5-ilny777kxpjghq6abvl7hv5skt5sxo3k
==> No binary for xz-5.2.5-ilny777kxpjghq6abvl7hv5skt5sxo3k found: installing from source
==> Using cached archive: /home/ncaa/spack/var/spack/cache/_source-cache/archive/51/5117f930900b341493827d63aa910ff5e011e0b994197c3b71c08a20228a42df.tar.bz2
==> No patches needed for xz
==> xz: Executing phase: 'autoreconf'
==> xz: Executing phase: 'configure'
==> Error: ProcessError: Command exited with status 1:
    '/tmp/ncaa/spack-stage/spack-stage-xz-5.2.5-ilny777kxpjghq6abvl7hv5skt5sxo3k/spack-src/configure' '--prefix=/home/ncaa/spack/opt/spack/linux-centos7-x86_64/gcc-8.4.0/xz-5.2.5-ilny777kxpjghq6abvl7hv5skt5sxo3k'

2 errors found in build log:
     34    checking whether ln -s works... yes
     35    checking whether make supports the include directive... yes (GNU style)
     36    checking for x86_64-conda-linux-gnu-gcc... /home/ncaa/spack/lib/spack/env/gcc/gcc
     37    checking whether the C compiler works... yes
     38    checking for C compiler default output file name... a.out
     39    checking for suffix of executables...
  >> 40    checking whether we are cross compiling... configure: error: in `/tmp/ncaa/spack-stage/spack-stage-xz-5.2.5-ilny777kxpjghq6abvl7hv5skt5sxo3k/spack-src':
  >> 41    configure: error: cannot run C compiled programs.
     42    If you meant to cross compile, use `--host'.
     43    See `config.log' for more details

See build log for details:
  /tmp/ncaa/spack-stage/spack-stage-xz-5.2.5-ilny777kxpjghq6abvl7hv5skt5sxo3k/spack-build-out.txt

这个问题似乎与交叉编译检查有关

票数 0
EN

Stack Overflow用户

发布于 2021-03-13 22:30:36

将gcc版本切换到7.3.0修复了此问题。交叉编译检查现在得到的结果是"no“。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66614042

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档