Can't find libgfortranbegin.a when installing root-6.06.04

I have installed gcc-6.1.0 before installing root-6.06.04. The only one configure added to gcc is “–prefix”. Then I use “make” to compile the root. It succeeded without any errors. But when use “make install” on root, it stopped with following error:

g++ -shared -Wl,-soname,libHbook.so -m64 -O2 -DNDEBUG -Wl,--no-undefined -Wl,--as-needed -o lib/libHbook.so hist/hbook/src/THbookBranch.o hist/hbook/src/THbookFile.o hist/hbook/src/THbookKey.o hist/hbook/src/THbookTree.o hist/hbook/src/G__Hbook.o -Llib -lCore -ldl -Llib -lHist -lMatrix -lTree -lGraf -lTreePlayer -lRIO -lminicern /home/bioinformatics2/wangshuaihu/software/gcc/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../lib64/libgfortran.so libgfortranbegin.a g++: error: libgfortranbegin.a: No such file or directory make: *** [lib/libHbook.so] Error 1

then I find that libgfortranbegin.a not included in the gcc/lib64. What should I do now?

Please use the cmake build for 6.X versions. See instructions at root.cern.ch/installing-root-source
If you do not need any fortran component you can disable them with

Pere

Install gfortran.

This happened to me as well, with root-6.06.08 and gcc 6.2.1. It is not related to a lack of gfortran, but rather that the library libgfortranbegin.a is no longer used in modern versions of GCC/GFortran.

The issue on the GCC tracker is here: gcc.gnu.org/bugzilla/show_bug.cgi?id=40267

I fixed the compilation (on my system) by wiping out the command -print-file-name=libgfortran.a in the various makefiles in $ROOTSYS/config

Presumably a compiler-specific check would be required for actual support.