Operating System - HP-UX
1833756 Members
2821 Online
110063 Solutions
New Discussion

Re: help ::error with f77

 
lou_jun21
Occasional Contributor

help ::error with f77

i am to compile a software from source code. and encounter this error:

under the source code folder:
$./confiugre
checking for vendor f77 to be used instead of g77...
checking for f77... f77
checking for Fortran 77 compiler default output... configure: error: Fortran 77 compiler cannot create executables
$
can anyone help me. (HP-UX10.20).
thanx
7 REPLIES 7
Niraj Kumar Verma
Trusted Contributor

Re: help ::error with f77

Hi,

you can download g77 fortran compiler
instead of using f77 it will be
available on gnu site.


-Niraj
Niraj.Verma@philips.com
Felix J. Liu
Advisor

Re: help ::error with f77

Probably you are running ./configure in a directory where you don't have write permission.

Good luck.
Shannon Petry
Honored Contributor

Re: help ::error with f77

There is a gnu compiler package which will fix this. It will require you install the gnu-binutils as well so that you have an assembler, linker, etc...
While you download this, I would recommend you install gnu-make as well. These packages are available from "http://hpux.cs.utah.edu/hppd/hpux/alpha.html"

If your not comfortable with gnu software, HP sells a fortran compiler! It will come with a better make program as well as de-bug tools.
contact your HP sales rep for info

Regards,
Shannon
Microsoft. When do you want a virus today?
lou_jun21
Occasional Contributor

Re: help ::error with f77

more detail about this error
some error is observed in config.log file. as below.

## ------------ ##
## Core tests. ##
## ------------ ##

configure:945: PATH=".;."; conftest.sh
./configure[946]: conftest.sh: not found.
configure:948: $? = 127
configure:961: checking for vendor f77 to be used instead of g77
configure:963: result:
configure:969: checking for f77
configure:984: found /opt/fortran/bin/f77
configure:992: result: f77
configure:1087: checking for Fortran 77 compiler version
configure:1090: f77 --version &5
f77: Option not recognized: --
f77: Option not recognized: -e
f77: Option not recognized: -r
f77: Option not recognized: -i
LPATH is : /opt/fortran/lib/pa1.1:/usr/lib/pa1.1:/opt/fortran/lib:/usr/lib:/opt/langtools/lib
configure:1093: $? = 0
configure:1095: f77 -v &5
LPATH is : /opt/fortran/lib/pa1.1:/usr/lib/pa1.1:/opt/fortran/lib:/usr/lib:/opt/langtools/lib
configure:1098: $? = 0
configure:1100: f77 -V &5
configure:1103: $? = 0
configure:1116: checking for Fortran 77 compiler default output
configure:1119: f77 -L/opt/fortran/lib conftest.f >&5
f77: Option not recognized: -/
conftest.f:
MAIN main:
HP FORTRAN 77 Tue Apr 30 11:55:09 2002
Ver: B.10.20 conftest.f Page 1

1 program main
2
3 end


Compilation statistics for procedure: main

Number of errors: 0 Number of Warnings: 0
Procedure number: 1

Accumulated number of source lines read: 3



Final Compilation Statistics for file: conftest.f

Accumulated errors: 0 Number of Warnings: 0
Total number of procedures: 1

Accumulated number of source lines read: 3


Timing Statistics for:

f77pass1: real: 0.08s user: 0.00s sys: 0.00s

/usr/ccs/bin/ld: Can't create pt/fortran/lib
/usr/ccs/bin/ld: No such file or directory
configure:1122: $? = 1
configure: failed program was:
program main

end
configure:1145: error: Fortran 77 compiler cannot create executables
Steve Steel
Honored Contributor

Re: help ::error with f77

Hi

Your error suggests to me that the Directory
pointed to by pt/fortran/lib does not exist
(Relative to uour local directory.)
and I see in your error log that a setup shell was not found.
./configure[946]: conftest.sh: not found.

Probably a bad Path setting caused by the script not running..


"Permission denied" faults can happen if ld is writing to a directory where the user doesn't have write permission , either when writing
the working files in /var/tmp or the output libxxxx.sl file into the directory.

Another possiblity is if a libxxxx.sl file already exists, but is owned by another user and cannot be overwritten by ld.

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
lou_jun21
Occasional Contributor

Re: help ::error with f77

the directory opt/fortran/lib exits as

$ ls -sal /opt/fortran/lib

total 938

1 dr-xr-xr-x 7 bin bin 1024 Apr 28 1999 .
1 dr-xr-xr-x 9 bin bin 1024 Apr 28 1999 ..
1 dr-xr-xr-x 5 bin bin 1024 Apr 28 1999 demos
63 -r--r--r-- 1 bin bin 64112 May 15 1997 libU77.a
672 -r--r--r-- 1 bin bin 673344 May 15 1997 libblas.a
152 -r--r--r-- 1 bin bin 142840 May 15 1997 libfsys.a
5 -r--r--r-- 2 bin bin 4920 May 15 1997 libisamstub.a
5 -r--r--r-- 2 bin bin 4920 May 15 1997 libisamstubs.a
1 dr-xr-xr-x 2 bin bin 1024 Apr 28 1999 libp
34 -r--r--r-- 1 bin bin 33948 May 15 1997 libvis.a
1 dr-xr-xr-x 3 bin bin 1024 Apr 28 1999 nls
1 dr-xr-xr-x 2 bin bin 1024 Apr 28 1999 pa1.1
1 dr-xr-xr-x 2 bin bin 1024 Apr 28 1999 pa2.0
Timothy Butler
Advisor

Re: help ::error with f77

It's found an f77 in your path, and is testing its capabilities. However, it's using command line options that the compiler does not support.

I'd just edit configure to drop the test with "--version" as an argument, and in the test where it tries to compile a file, drop the "-L/opt/fortran/lib" since it will link against the appropriate libraries automatically.