I am trying to compile some legacy software. (CERN Root 5.34)
In order to do this, I needed to install gcc-5, as I encountered errors with the latest version of gcc.
(Using gcc-5 is just a guess. I am fairly confident this should be a "ok" version to use.)
Root compiles with a configure / make system.
My system is debian 9 stretch. In order not to break my system, and to install multiple versions of gcc simultaneously, I followed the info here:
I chose the prefix:
I compiled gcc with no issues, and ran
I can see for example the file
/home/user/Programs/bin/g++ --version g++ (GCC) 5.5.0 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I ran into a problem when building root.
The error I encounter is
make CC=/home/user/Programs/bin/gcc CXX=/home/user/Programs/bin/g++ g++ -shared -Wl,-soname,libminicern.so -m64 -O2 -Wl,--no-undefined -Wl,--as-needed -o lib/libminicern.so misc/minicern/src/cernlib.o -ldl misc/minicern/src/kernlib.o misc/minicern/src/zebra.o misc/minicern/src/hbook.o /usr/lib/gcc/x86_64-linux-gnu/6/libgfortran.so libgfortranbegin.a g++: error: libgfortranbegin.a: No such file or directory /home/ecb/directory/root/misc/minicern/Module.mk:48: recipe for target 'lib/libminicern.so' failed
As you can see I have specified make to use the gcc-5 C and C++ compilers.
I have found 2 versions of
libgfortranbegin.a on my system. One is at
/usr/lib/gcc/x86_64-linux-gnu/6 and the other is at
I thought it was a bit weird that the path was "unknown-linux" so I made the symlink
~/Programs/lib/gcc/x86_64-linux-gnu/5.5.0 - this didn't fix the issue however.
I tried to search for info on this, but I only found one hit
I don't think this is particularly relevant - not only is a different (major) version of the software used, with a different (major) version of the compiler, but in addition this person had issues with
make install I can't even get past
One thing that I noted reading about was when building gcc-5, I was not supposed to specify an option to change where the general C and C++ includes and libs are placed. I do not fully understand what the consequences of this are... Do the gcc-5 related
lib... directories get placed relative to
If I look inside
/home/user/Programs I have directories such as
include - so this suggests the answer to the above question is "Yes" and therefore this is not the cause of the problem.
I no longer have any further ideas of how to proceed with this. I know where
libgfortranbegin.a is - at least 2 versions are installed, one for the default system wide one for gcc6 and one for my local gcc-5 install.
Do I need to tell make or configure where to find
libgfortranbegin.a? If so how do I do this?