Build Rust with Intel Classic suite?

I am attempting to build Rust through the Spack package manager using the Intel Classic compiler suite. On a couple of different machines, when I export CC=icc and Spack runs the following command:

'./configure' '--set' 'install.prefix=/opt/spack_nov23/var/spack/environments/intel/install/linux-centos8-zen3/intel-2021.10.0/rust-1.73.0-loiur4ftbc2h7ssh6c4iakogxt662geh' '--s
et' 'install.sysconfdir=etc' '--set' 'build.extended=true' '--set' 'build.docs=false' '--set' 'build.cargo=/opt/spack_nov23/var/spack/environments/intel/install/linux-centos8-zen3/intel-2021.10.0/rust-bootstrap
-1.73.0-wwn45x3ghjbu4ambymj2d6tpz2duvgb3/bin/cargo' '--set' 'build.rustc=/opt/spack_nov23/var/spack/environments/intel/install/linux-centos8-zen3/intel-2021.10.0/rust-bootstrap-1.73.0-wwn45x3ghjbu4ambymj2d6tpz2
duvgb3/bin/rustc' '--set' 'llvm.download-ci-llvm=false' '--tools=cargo,rustdoc,clippy,src,rustfmt'

it fails on the "Compiling build_helper v0.1.0" step trying to generate "build/bootstrap/debug/deps/bootstrap-8d477eb8daba6006" with the following error:

          ld: /opt/intel/oneapi/compiler/2023.2.1/linux/compiler/lib/intel64_lin//libimf.a(libm_feature_flag.o): undefined reference to symbol '__intel_cpu_feature_indicator_x'
          //opt/intel/oneapi/compiler/2023.2.1/linux/compiler/lib/intel64_lin//libintlc.so.5: error adding symbols: DSO missing from command line
          
  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)

error: could not compile `bootstrap` (bin "bootstrap") due to previous error
Building bootstrap

Is it possible to compile Rust with CC=icc, or does it need gcc/clang?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.