skip to Main Content

I was tring installing HPCToolkit following this tutorial:
http://hpctoolkit.org/software-instructions.html#Prerequisites

and, after entering "Spack install hpctoolkit" I got some error messages

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:

==> 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 (on OneDrive):https://1drv.ms/u/s!Ah8JdDB38REth3K7XSgq6TZQ46eV?e=4z2bQI

my platform and user environment

(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: [email protected]
    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 (on OneDrive):https://1drv.ms/u/s!Ah8JdDB38REth3P-jV-PP9P-bSjS?e=6ucN9e
packages.yaml (on OneDrive):https://1drv.ms/u/s!Ah8JdDB38REth3RTTTJGckufGQVT?e=fFs2YH

2

Answers


  1. Chosen as BEST ANSWER

    running "spack install xz" gives:

    (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
    

    It seems the problem has something to do with cross compiling check


  2. switching gcc version to 7.3.0 fixed this problem. The cross compiling check get result "no" now.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search