Bug 38097

Summary: g77 does not compile anything
Product: [Retired] Red Hat Linux Reporter: John Deisz <john.deisz>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-04-29 18:32:56 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 John Deisz 2001-04-27 15:38:04 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.2-2smp i686)


g77 is not compiling Fortran programs using redhat 7.1 that compile fine
under redhat 7.0.

Here is a sample fortran program:


      program testg77

      stop
      end


Under redhat 7.1, compilation produces the following:

[deisz@landau deisz]$ g77 -v test.f
g77 version 2.96 20000731 (Red Hat Linux 7.1 2.96-81) (from FSF-g77 version
0.5.26 20000731 (Red Hat Linux 7.1 2.96-81))
Driving: g77 -v test.f -lg2c -lm
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-81)
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/f771 test.f -quiet -dumpbase
test.f -version -o /tmp/ccK3abq4.s
GNU F77 version 2.96 20000731 (Red Hat Linux 7.1 2.96-81)
(i386-redhat-linux) compiled by GNU C version 2.96 20000731 (Red Hat Linux
7.1 2.96-81).
 as -V -Qy -o /tmp/ccs3AWn0.o /tmp/ccK3abq4.s
GNU assembler version 2.10.91 (i386-redhat-linux) using BFD version
2.10.91.0.2
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/collect2 -m elf_i386
-dynamic-linker /lib/ld-linux.so.2
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crti.o
/usr/lib/gcc-lib/i386-redhat-linux/2.96/crtbegin.o
-L/usr/lib/gcc-lib/i386-redhat-linux/2.96
-L/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../../i386-redhat-linux/lib
-L/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../.. /tmp/ccs3AWn0.o -lg2c
-lm -lgcc -lc -lgcc /usr/lib/gcc-lib/i386-redhat-linux/2.96/crtend.o
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crtn.o
/usr/lib/gcc-lib/i386-redhat-linux/2.96/libg2c.a(main.o): In function
`main':
main.o(.text+0x25): undefined reference to `atexit'
collect2: ld returned 1 exit status


While under Redhat 7.0, the same program compiles as 
below:

[deisz@cec04 deisz]$ g77 -v test.f
g77 version 2.96 20000731 (Red Hat Linux 7.0) (from FSF-g77 version 0.5.26
20000731 (Red Hat Linux 7.0))
Driving: g77 -v test.f -lg2c -lm
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.0)
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/f771 test.f -quiet -dumpbase
test.f -version -o /tmp/ccWENabK.s
GNU F77 version 2.96 20000731 (Red Hat Linux 7.0) (i386-redhat-linux)
compiled by GNU C version 2.96 20000731 (Red Hat Linux 7.0).
 as -V -Qy -o /tmp/ccIR9Wwl.o /tmp/ccWENabK.s
GNU assembler version 2.10.90 (i386-redhat-linux) using BFD version
2.10.0.18
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/collect2 -m elf_i386
-dynamic-linker /lib/ld-linux.so.2
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crti.o
/usr/lib/gcc-lib/i386-redhat-linux/2.96/crtbegin.o
-L/usr/lib/gcc-lib/i386-redhat-linux/2.96
-L/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../.. /tmp/ccIR9Wwl.o -lg2c
-lm -lgcc -lc -lgcc /usr/lib/gcc-lib/i386-redhat-linux/2.96/crtend.o
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crtn.o


Reproducible: Always
Steps to Reproduce:
1. Try to compile on a redhat 7.1 machine
2.  Successfully compile on a redhat 7.0 machine
3.
	

Actual Results:  Doesn't compile on 7.1, will using 7.0.

Comment 1 Jakub Jelinek 2001-04-27 16:21:01 UTC
Works for me, atexit is provided by /usr/lib/libc_nonshared.a which
should be brought in by /usr/lib/libc.so linker script.
Can you a) make sure your /usr/lib/libc.so is a linker script
b) rerun the above command with -Wl,--verbose so that it is clear
what the linker is doing?

Comment 2 John Deisz 2001-04-29 18:32:51 UTC
When you pointed out the connection to libc I queried my glibc packages and got
the following:

     glibc-devel-2.2-12
     glibc-common-2.2.2-10
     glibc-2.2.2-10
     glibc-profile-2.2-12 
     compat-glibc-6.2-2.1.3.2

So, the glibc-devel package wasn't upgraded during 7.0 -> 7.1 (probably my fault
-- I'm
not sure) and the dependency of gcc-g77 on the new glibc-devel wasn't caught
somehow.

In any case, after upgrading glibc-devel by hand, compilation now works.  Thus,
my
bug report probably wasn't valid.


Comment 3 Jakub Jelinek 2001-08-09 13:03:10 UTC
Oopsie, forgot to close this. Since glibc-2.2.3-6 glibc conflicts with
glibc-devel < 2.2.3.