Installing gfortran with conda

I have installed gfortran on linux using conda.

Is it a good way to install it?
Is there any drawbacks?

Thansk

Depends, I haven’t worked with the compiler distribution from the defaults / Anaconda channel, but made good experience with the conda-forge compiler distribution on Linux. From conda-forge you have quite some choice in GFortran versions on Linux including cross-compilers (ppc64le, aarch64 and s390x), see GitHub - conda-forge/ctng-compilers-feedstock: A conda-smithy repository for ctng-compilers..

If you use CMake for building you can get a full setup by adding $CMAKE_ARGS to the configure step, which will ensure the compiler are used correctly. The default install location will be the conda environment, which is actually an okay choice all in all considered. A similar variable exists for meson with $MESON_ARGS.

A big advantage can be the conda-forge sysroot, which usually provides an older GLIBC version (there are two variants comp7 and cos7, the latter is somewhat newer). I haven’t linked statically against the conda-forge sysroot yet, but in principle this should result in quite universally usable binaries on Linux.