Subject: port-pmax/8574: fortran is broken
To: None <gnats-bugs@gnats.netbsd.org>
From: None <mcmahill@mit.edu>
List: netbsd-bugs
Date: 10/06/1999 18:53:22
>Number: 8574
>Category: port-pmax
>Synopsis: fortran is broken
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-pmax-maintainer (NetBSD/pmax Portmaster)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Oct 6 18:50:01 1999
>Last-Modified:
>Originator: Dan McMahill
>Organization:
>Release: 1.4.1/pmax<NetBSD-current source date>
>Environment:
System: NetBSD cowboy-burt 1.4.1 NetBSD 1.4.1 (COWBOY-BURT) #1: Sat Oct 2 21:08:08 EDT 1999 dan@cowboy-burt:/amd/dinah-moe/export/src/sys/arch/sparc/compile/COWBOY-BURT sparc
>Description:
fortran compiler on NetBSD-1.4.1/pmax is totally broken.
>How-To-Repeat:
try to compile _any_ fortran program and watch it fail miserably. For
example, 'hello.f' has:
PROGRAM hello
print*, 'hello world'
END
Then I see the following:
dan@sy-borg 103 % uname -srm
NetBSD 1.4.1 pmax
dan@sy-borg 104 % f77 -c hello.f
dan@sy-borg 105 % f77 -o hello hello.o
/usr/lib/libg2c.so: warning: tempnam() possibly used unsafely, use mkstemp() or mkdtemp()
/usr/bin/ld: hello.o: linking PIC files with non-PIC files
Bad value: failed to merge target specific data of file hello.o
collect2: ld returned 1 exit status
dan@sy-borg 106 % f77 -fPIC -c hello.f
/tmp/ccyJbK8i.s: Assembler messages:
/tmp/ccyJbK8i.s:40: Warning: No .cprestore pseudo-op used in PIC code
/tmp/ccyJbK8i.s:45: Warning: No .cprestore pseudo-op used in PIC code
/tmp/ccyJbK8i.s:46: Warning: No .cprestore pseudo-op used in PIC code
/tmp/ccyJbK8i.s:49: Warning: No .cprestore pseudo-op used in PIC code
dan@sy-borg 107 % f77 -o hello hello.o
/usr/lib/libg2c.so: warning: tempnam() possibly used unsafely, use mkstemp() or mkdtemp()
dan@sy-borg 108 % ./hello
Bus error (core dumped)
It should do:
dan@cowboy-burt 121 % uname -srm
NetBSD 1.4.1 sparc
dan@cowboy-burt 122 % f77 -c hello.f
dan@cowboy-burt 123 % f77 -o hello hello.o
dan@cowboy-burt 124 % ./hello
hello world
dan@cowboy-burt 125 % f77 -fPIC -c hello.f
dan@cowboy-burt 126 % f77 -o hello hello.o
dan@cowboy-burt 127 % ./hello
hello world
dan@cowboy-burt 128 % f2c-f77 -c hello.f
hello.f:
MAIN hello:
dan@cowboy-burt 129 % f2c-f77 -o hello hello.o
dan@cowboy-burt 130 % ./hello
hello world
>Fix:
workaround is to use the script f2c-f77 which is part of the package system
in lang/f2c as the fortran compiler.
no fix that I know.
>Audit-Trail:
>Unformatted: