Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29541 Discussions

IFX compiler replacing IFORT and requiring GCC makes no sense

cpmech
Beginner
692 Views

I recently had to replace ifort with ifx because ifort is being deprecated (what an annoyance), and now it is requiring gcc!!! I've read that the point of ifx is to use the newer llvm (clang and alike) but still requires gcc. My first try was to uninstall gcc, install clang, and then ifx won't work due to Requires 'install path' setting gathered from 'gcc'. What's wrong with Intel developers?!

0 Kudos
6 Replies
andrew_4619
Honored Contributor III
643 Views

" but still requires gcc."  No it does not .

0 Kudos
cpmech
Beginner
468 Views

Yes, it does. Without gcc, it fails with: Requires 'install path' setting gathered from 'gcc'.

0 Kudos
JohnNichols
Honored Contributor I
435 Views

No you are incorrect, I have about ten computers scattered about the world, most use IFX most days and only one has gcc and that is not because I need it for Intel Fortran.  

A clean install of MSVS followed by all the OneAPIs and then normal Fortran, and you can run IFX to your heart's content.  

 

0 Kudos
cpmech
Beginner
429 Views

So, why does the following IFX execution fail with "ifx: error #10417: Problem setting up the Intel(R) Compiler compilation environment. Requires 'install path' setting gathered from 'gcc'"?

 

The test is carried out using a fresh install of Ubuntu 22.04 via Docker. The error happens if "gcc" is removed from the "install essential tools" step in the Dockerfile below:

FROM ubuntu:22.04

# disable tzdata questions
ENV DEBIAN_FRONTEND=noninteractive

# use bash
SHELL ["/bin/bash", "-c"]

# install apt-utils
RUN apt-get update -y && \
  apt-get install -y apt-utils 2> >( grep -v 'debconf: delaying package configuration, since apt-utils is not installed' >&2 ) \
  && apt-get clean && rm -rf /var/lib/apt/lists/*

# install essential tools
RUN apt-get update -y && apt-get install -y --no-install-recommends \
  ca-certificates \
  curl \
  gcc \
  gnupg \
  libc6-dev \
  lsb-release \
  && apt-get clean && rm -rf /var/lib/apt/lists/*

# add oneapi to sources
RUN curl -fsSL https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
    | gpg --dearmor -o /usr/share/keyrings/oneapi-archive-keyring.gpg \
  && echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" \
    > /etc/apt/sources.list.d/oneAPI.list

# install ifx
RUN apt-get update -y && apt-get install -y --no-install-recommends \
    intel-oneapi-compiler-fortran

# copy files
COPY . /tmp/ifx_example
WORKDIR /tmp/ifx_example

# compile and run the example
RUN source /opt/intel/oneapi/setvars.sh && \
  ifx hello_world.f90 -o hello_world && \
  ./hello_world

 

The hello_world.f90 file is:

program hello
  implicit none
  print *, "Hello, World!"
end program hello

 

The Docker image may be compiled with:

docker buildx build --progress=plain -f Dockerfile -t ifx_example:test .

 

Further tests may be carried out in a temporary container with:

docker run --rm -it ifx_example:latest /bin/bash

 

Note that with "gcc", the following expected output is obtained:

#12 [8/8] RUN source /opt/intel/oneapi/setvars.sh &&   ifx hello_world.f90 -o hello_world &&   ./hello_world
#12 0.336  
#12 0.336 :: initializing oneAPI environment ...
#12 0.336    bash: BASH_VERSION = 5.1.16(1)-release
#12 0.336    args: Using "$@" for setvars.sh arguments: 
#12 0.352 :: compiler -- latest
#12 0.397 :: debugger -- latest
#12 0.442 :: mpi -- latest
#12 0.508 :: umf -- latest
#12 0.565 :: oneAPI environment initialized ::
#12 0.565  
#12 0.672  Hello, World!
#12 DONE 0.7s

 

 

0 Kudos
JohnNichols
Honored Contributor I
414 Views

Well I tried for several years to use Linux - Ubuntu to do the monitoring work. But you cannot get the accelerometer I used at the time and still do to work nicely with the network data sends.  

So I decided to leave Ubuntu and use only Windows. 

So I have no idea.  

But if it helps, I remember my pain, even the University Linux experts would say, easy and then give up.   They blamed the kernel, I blamed God.  It is much more satisfying to accept there are things you cannot fix.  I got it running on a Raspberry PI 2, not Fortran, but no cloud link would work.  

So I feel your pain.  

Of course, you can buy an Intel NUC, load windows and OneAPI and have a jolly good system.  

Unless you are in the deep world of large matrices, in which case I also feel your pain.  

If it is any consolation, I am now looking at dual quaternions as part of the answer. 

So jolly good hunting and splice the main brace. 

0 Kudos
nathn34
New Contributor I
310 Views

Yeah I get the frustration feels like you switched compilers to avoid one dependency and it still drags it along.

So basically you expected ifx = LLVM/clang world, no gcc baggage… but it still needs gcc just to function. I hit something similar a while back when moving from ifort too, and it confused me the same way.

What I realized (after some pain) is:

ifx uses LLVM internally, but still relies on gcc toolchain for linking + system libs

it’s not really replacing gcc, just replacing the frontend/compiler part

removing gcc completely kinda breaks the environment detection

What worked for me:

keep a minimal gcc install (even older version works fine)

set proper environment vars (like CC, LIBRARY_PATH)

don’t fight the dependency, just treat gcc as backend support

Not sure if it helps, but I just accepted the hybrid setup and moved on. Even in some builds I handled for dooflix-Shop configs, same pattern showed up.

Are you trying to fully eliminate gcc, or just clean up your toolchain?

0 Kudos
Reply