Bug 185394

Summary: cannot link statically with g77
Product: [Fedora] Fedora Reporter: Patrice Dumas <pertusus>
Component: lapackAssignee: Tom "spot" Callaway <tcallawa>
Status: CLOSED CANTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: extras-qa, hdegoede
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-03-14 17:43:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Patrice Dumas 2006-03-14 11:33:53 UTC
Description of problem:

Not sure that it is fixable. gfortran is still immature and lacking g77
features. So there is still a need to compile with g77. Now i am trying to link
statically with lapack, using g77 as a linker, but it fails. Here is what I get:

[dumas@nor75-15-82-67-190-22 examples]$ cat call_sgemm.f 
       program main
       call sgemm
       end

[dumas@nor75-15-82-67-190-22 examples]$  g77 -static -o call_sgemm -g -O2
call_sgemm.f -lblas
/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../libblas.a(xerbla.o): In
function `xerbla_': undefined reference to `_gfortran_st_write'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../libblas.a(xerbla.o): In
function `xerbla_': undefined reference to `_gfortran_transfer_character'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../libblas.a(xerbla.o): In
function `xerbla_': undefined reference to `_gfortran_transfer_integer'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../libblas.a(xerbla.o): In
function `xerbla_': undefined reference to `_gfortran_st_write_done'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../../libblas.a(xerbla.o): In
function `xerbla_': undefined reference to `_gfortran_stop_numeric'
collect2: ld returned 1 exit status

It works when called with -lgfortran:
 g77 -static -o call_sgemm -g -O2 call_sgemm.f -lblas -L
/usr/lib/gcc/i386-redhat-linux/4.1.0/ -lgfortran




Version-Release number of selected component (if applicable):


How reproducible:

always

Steps to Reproduce:
1. link statically with g77 without an expplicit call to -lgfortran
2.
3.
  
Actual results:

link failure.

Expected results:

No link error.

Additional info:

This is one of many issues with g77/gfortran incompatibilities issues. The ABI
is different, too, but it doesn't affect lapack because it only affect functions.

Comment 1 Tom "spot" Callaway 2006-03-14 17:43:15 UTC
i'm not sure how this is resolvable. g77 is dead branch code, instead of trying to use it, I recommend that you file bugs against gfortran where it does not provide needed feature functionality.

Comment 2 Patrice Dumas 2006-03-14 20:19:16 UTC
There is allready a meta bug with g77 regressions. There aren't that much move
on the intrinsic front...

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19292

but the gfortran team isn't very big. Given that fact their solution is to keep
g77 in distributions. But if it isn't usable... For example you can have a look
on what kind of 'discussion' this leads to:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13082

I have reported the lack of intrinsics that prevent cernlib to build on fedora
in the fedora bugzilla, but I was (rightfully) redirected to upstream.

Comment 3 Hans de Goede 2006-07-21 18:36:43 UTC
Erm,

why is the Component for this bug set to aalib? That can't be right.


Comment 4 Patrice Dumas 2006-07-21 20:05:15 UTC
It should be on lapack or blas. I'll try to fix it.