3

I am trying to use fortran code called SAMMY-8 which has its binary ready for use.

I was using without any issue while I had f25 installed. When upgrading to f27 I got the following error when trying to run the software

sammy: error while loading shared libraries: libgfortran.so.3: cannot open shared object file: No such file or directory

At first I though of making a soft link to libgfortran.so.4 by using

ln -s /usr/lib/libgfortran.so.4 /usr/lib/libgfortran.so.3

but when trying to run the code I got

sammy: /lib64/libgfortran.so.3: version `GFORTRAN_1.0' not found (required by sammy) 
sammy: /lib64/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by sammy)

I also tried to install gcc-4.9.2 by installing the following rpm files

  • devtoolset-3-gcc-4.9.2-6.2.el7.x86_64.rpm
  • devtoolset-3-gcc-c++-4.9.2-6.2.el7.x86_64.rpm
  • devtoolset-3-libstdc++-devel-4.9.2-6.2.el7.x86_64.rpm
  • devtoolset-3-runtime-3.1-12.el7.x86_64.rpm

The installation was successful so I typed scl enable devtoolset-3 bash in order to be able to use gcc-4.9.2 and then run SAMMY again, but I still get

sammy: /lib64/libgfortran.so.3: version `GFORTRAN_1.0' not found (required by sammy)
sammy: /lib64/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by sammy)

Any idea on how to GFORTRAN_1.0 and GFORTRAN_1.4 on f27?

3
  • What does rpm -qf /lib64/libgfortran.so.3 output? Did you create your symlink in /usr/lib64 or /usr/lib? Mar 26, 2018 at 17:43
  • You should rebuild it from source (which should be present on the CD you received). The included binary is for very old Linux distributions. Mar 26, 2018 at 17:57
  • @StephenKitt : Thank you very much for your comment! The output is file /lib64/libgfortran.so.3 is not owned by any package and in fact I created a symlink in both lib and lib64.
    – Thanos
    Mar 26, 2018 at 19:57

1 Answer 1

2

libgfortran.so.3 from Fedora 9 : provides.log →

libgfortran.so.3(GFORTRAN_1.0)(64bit)    
libgfortran = 4.3.0-8

The original package libgfortran-4.3.0-8.x86_64.rpm will conflict, if any fortran dependent applications are installed (e.g. 'openblas-thread'), so a rebuild to a new name is required.

compat-libgfortran-4.3.0-8.fc27.x86_64.rpm installs with no issues. Link → https://drive.google.com/file/d/18uMtX2n4-bwM2V2TfOl-w_Fk8t6YSlsk/view?usp=sharing

Install: # cd Downloads/ && yum install ./compat-libgfortran-4.3.0-8.fc27.x86_64.rpm

P.S.: The objects GFORTRAN_1.0), GFORTRAN_1.4) are also present in later versions, till v.6.x : Fedora 24 → v. 6.3.1 ,

"compat" package = compat-libgfortran-6.3.1-1.fc27.x86_64.rpm : Updates the previous installed compat-libgfortran. Link https://drive.google.com/file/d/1f9nPFjuMBGg1XIza_Ajokkm_d7VYmF0_/view?usp=sharing


describe how you built the renamed packages

Write a new spec file ( I used pkgtool2 to create compat-libgfortran.spec https://drive.google.com/file/d/0B7S255p3kFXNQ0ZEbHB1V1BUa0E/view?usp=sharing )

Summary:   None
Name:      compat-libgfortran
Version:   6.3.1
Release:   1.fc27
License:   GPL
Group:     None          
Packager:  Jerry Donut <[email protected]>
BuildArchitectures: x86_64
BuildRoot:

%description
No description

%files
/usr/lib64/libgfortran.so.3
/usr/lib64/libgfortran.so.3.0.0

Copy compat-libgfortran.spec to /home/[name]/rpms/SPECS/ https://www.linuxquestions.org/questions/linux-software-2/need-rpm-package-for-php-version-5-2-7-and-up-on-redhat-5-1-a-766486/#13 ... and run $ rpmbuild -bb compat-libgfortran.spec

6
  • Thanks for your answer! I think it's partially solved because now when I run the code I get only this error sammy: /lib64/libgfortran.so.3: version GFORTRAN_1.4' not found (required by sammy)` so I somehow need GFORTRAN_1.4. Any idea?
    – Thanos
    Mar 26, 2018 at 20:01
  • I also don't get your P.S. Can you please explain? Thanks in advance!!
    – Thanos
    Mar 26, 2018 at 20:03
  • 1. Please see my edited answer : the "P.S". ... 2. We will give it another try : version 6.x → I will add the package to the answer. Mar 26, 2018 at 20:07
  • Thank you very much! I'll be waiting for the other package!
    – Thanos
    Mar 26, 2018 at 20:13
  • Done : compat-libgfortran-6.3.1-1.fc27.x86_64.rpm, see the answer. Mar 26, 2018 at 20:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .