Quantcast
Channel: Intel® Software - Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1175

catastrophic error - bits/c++config.h (icpc 19.0.1.144)

$
0
0

Hi,

I am trying to compile a simple program with icpc version 19.0.1.144 (gcc version 8.2.0 compatibility) and I get the following error:

icpc -g -O2 -std=c++17 -I. -c main.cc -o main.o
In file included from main.cc(4):
/usr/include/c++/8/iostream(38): catastrophic error: cannot open source file "bits/c++config.h"
  #include <bits/c++config.h>
                                            ^

If I add the gcc8 include path "-I/usr/include/x86_64-linux-gnu/c++/8", I can compile the code. However, this seems like a bug (I shouldn't have to tell the compiler where it's headers are installed.)

I have also tried using gcc7, but get the same error, i.e.,

icpc -g -O2 -std=c++17 -gxx-name=/usr/bin/x86_64-linux-gnu-g++-7 -I. -c main.cc -o main.o
In file included from main.cc(4):
/usr/include/c++/7/iostream(38): catastrophic error: cannot open source file "bits/c++config.h"
  #include <bits/c++config.h>
                                            ^

I am running on Ubuntu 18.04:

Linux momoney 4.15.0-43-generic #46-Ubuntu SMP Thu Dec 6 14:45:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

>>>>>> lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:    18.04
Codename:    bionic

My g++ version is:

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 8.2.0-1ubuntu2~18.04' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 8.2.0 (Ubuntu 8.2.0-1ubuntu2~18.04)

The test program that I am trying to compile is:

#include <iostream>

int main(int argc, char ** argv) {

  return 0;
} // main


Viewing all articles
Browse latest Browse all 1175

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>