This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 191497 - "gcc -lgfortran" fails because libgfortran RPM lacks libgfortran.so
"gcc -lgfortran" fails because libgfortran RPM lacks libgfortran.so
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: gcc4 (Show other bugs)
5
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-12 10:50 EDT by Sam Steingold
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-05-16 03:04:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Sam Steingold 2006-05-12 10:50:57 EDT
libgfortran 4.1.0 does not install /usr/lib/libgfortran.so
on which some executables rely.
the user has to create a symlink:

cd /usr/lib
test -f libgfortran.so || sudo ln -sv libgfortran.so.*.* libgfortran.so

(there is no component named libgfortran in bugzilla, so I have to use gcc which
is the source of the Fortran 95 runtime)
Comment 1 Jakub Jelinek 2006-05-12 10:59:52 EDT
Programs which do that are incredibly broken.
libgfortran.so is included in gcc/gfortran specific directory, similarly
to other gcc provided libraries, as what exactly this points to is dependent
on the compiler version used (you need different libgfortran (libgfortran.so.0)
when using GCC 4.0.x, different when using 4.1.x (libgfortran.so.1) and yet
different when using 4.2.x (libgfortran.so.2)).
So, rather than using crappy checks for /usr/lib/libgfortran.so (after all,
on x86_64, ppc64, s390x etc. that wouldn't be in /usr/lib64 anyway) they should
use standard (e.g. autoconf) checks for presence of libraries.
Comment 2 Sam Steingold 2006-05-15 17:13:25 EDT
without the symbolic link /usr/lib/libgfortran.so, "-lgfortran" does not work:
/usr/bin/ld: cannot find -lgfortran
collect2: ld returned 1 exit status

I am reopening the bug:
 how do I recompile my program so that it uses /usr/lib/libgfortran.so.1?

thanks!
Comment 3 Jakub Jelinek 2006-05-15 17:21:23 EDT
When you forgot to install gcc-gfortran package, that's not really surprising.
If you install it, that command will work just fine.
Comment 4 Sam Steingold 2006-05-15 18:15:13 EDT
I have these packages:
compat-gcc-32
compat-gcc-32-c++
compat-gcc-32-g77
compat-libf2c-32

(Alas, I am stuck with c++ software that want 3.2)
Comment 5 Jakub Jelinek 2006-05-16 03:04:01 EDT
If you are using compat-gcc-32, then you obviously can't mix that with gfortran,
you should use compat-gcc-32 with g77 (and it's -lg2c), or gcc 4.x with gfortran.
Please stop reopening this.

Note You need to log in before you can comment on or make changes to this bug.