Bug 185394 - cannot link statically with g77
Summary: cannot link statically with g77
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: lapack
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-03-14 11:33 UTC by Patrice Dumas
Modified: 2007-11-30 22:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-03-14 17:43:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


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