Configure-time failure when mixing GCC + Intel

Issue #488 resolved
Dan Bonachea created an issue

On dirac with develop @ 7122e6f:

pcp-d-10$  configure CC=gcc CXX=icpc
Fetching https://gasnet-bugs.lbl.gov/nightly/unlisted/GASNet-stable.tar.gz
Unpacking GASNet-stable.tar.gz

System: Linux pcp-d-10 3.10.0-862.14.4.el7.x86_64 #1 SMP Tue Sep 25 14:32:52 CDT 2018 x86_64 x86_64 x86_64 GNU/Linux
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: Scientific
Description:    Scientific Linux release 7.5 (Nitrogen)
Release:        7.5
Codename:       Nitrogen

Date: Thu Jun 17 11:52:05 PDT 2021
Current directory: <redacted>
Install directory: /usr/local/upcxx
Configure command: ../upcxx/configure CC=gcc CXX=icpc
Configure environment:
    GASNET='https://gasnet-bugs.lbl.gov/nightly/unlisted/GASNet-stable.tar.gz'
    GMAKE='/usr/local/pkg/gmake/newest/bin/make'

/usr/local/pkg/intel/oneapi/compiler/2021.1.2/linux/bin/intel64/icpc
icpc (ICC) 2021.1.2 20201208
Copyright (C) 1985-2020 Intel Corporation.  All rights reserved.

/usr/local/pkg/gcc/9.3.0/bin/gcc
gcc (GCC) 9.3.0
Copyright (C) 2019 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.


ERROR: CC=/usr/local/pkg/gcc/9.3.0/bin/gcc failed to compile test C file
ERROR: See config-detail.log for details. Last four lines are as follows:
+ /usr/local/pkg/gcc/9.3.0/bin/gcc -gcc-name=/usr/local/pkg/gcc/9.3.0/bin/gcc -c conftest-cc.c
gcc: error: unrecognized debug output level 'cc-name=/usr/local/pkg/gcc/9.3.0/bin/gcc'
ERROR: Your C and C++ compilers failed to compile and link C/C++ code.  Please set $CC and $CXX to ABI-compatible C and C++ compilers, respectively.
ERROR: We recommend one of the following C++ compilers (or any later versions):
           Linux on x86_64:   g++ 6.4.0, LLVM/clang 4.0.0, PGI 19.1, Intel C 17.0.2
           Linux on ppc64le:  g++ 6.4.0, LLVM/clang 5.0.0, PGI 18.10
           Linux on aarch64:  g++ 6.4.0, LLVM/clang 4.0.0
           macOS on x86_64:   g++ 6.4.0, Xcode/clang 8.0.0
           Cray XC systems:   PrgEnv-gnu with gcc/7.1.0 environment module loaded
                              PrgEnv-intel with Intel C 18.0.1 and gcc/7.1.0 environment modules loaded
                              PrgEnv-cray with cce/9.0.0 environment module loaded
                              ALCF's PrgEnv-llvm/4.0

This configure command is attempt to mix Intel C++ with Gnu C. The current configure logic is incorrectly adding an Intel-specific option to the non-Intel C compiler, resulting in immediate breakage.

We don't officially support this configuration due to ABI compatibility concerns (mostly concerning the standard libraries, see issue 474), and would be justified in warning about such a combo (as the GASNet configure script does). We should fix this defect so we don't actively prevent such a combination with a misleading error.

Comments (2)

  1. Paul Hargrove
    • changed status to open

    It is worth noting that CC=gcc is default, so configure CXX=icpc without any CC is sufficient to hit this problem.

  2. Log in to comment