pro64-support
[Top] [All Lists]

Re: Link error with big fortran program

To: mpm@xxxxxxxxxxxxxxxxx (Michael Murphy), jcarter@xxxxxxxxxxxxxxxxxxx (Jack Carter), pro64-support@xxxxxxxxxxx, jcarter@xxxxxxxxxxxxxxxxxxx
Subject: Re: Link error with big fortran program
From: Stuart McNicholas <sjm@xxxxxxxxxxxxx>
Date: Fri, 16 Jun 2000 10:40:11 +0100
In-reply-to: <200006151821.LAA55580@rohi.engr.sgi.com>
References: <00061510543005.12601@tcdec3> <10006150919.ZM117796@johmar.engr.sgi.com> <200006151821.LAA55580@rohi.engr.sgi.com>
Sender: owner-pro64-support@xxxxxxxxxxx
Dear John and Mike,
  Ok, using -Wl,-Wl\,--relax makes gcc take the option and presumably pass it 
to the linker:

sgif90 -show -i8 -i64 -Wl,-Wl\,--relax -O3 -lcrypt -o 
/hosts/fs/home2/sjm/molpro2000.5/bin/molpro.exe molver.o molpro.o 
-L/hosts/fs/home2/sjm/molpro2000.5/lib -lmolpro -lgks0

The -show option makes it produce the following:

/usr/bin/gcc -Wl --relax -L/hosts/fs/home2/sjm/molpro2000.5/lib 
-L/hosts/fs/home2/sjm/molpro2000.5/lib 
-L/usr/lib/gcc-lib/ia64-sgi-linux/sgicc-1.0 -o 
/hosts/fs/home2/sjm/molpro2000.5/bin/molpro.exe -lcrypt molver.o molpro.o 
-lmolpro -lgks0 -lfortran -lffio -lmsgi -lmv -lm 

But still .....

/usr/lib/gcc-lib/ia64-hp-linux/2.9-ia64-000216/crtbegin.o(.fini+0x2): 
relocation truncated to fit: PCREL21B fini
collect2: ld returned 1 exit status
sgif90 ERROR:  /usr/bin/gcc returned non-zero status 1

However, I am still getting the link error.  Using either -Wl,-Wl\,--relax  
or -Wl,-Wl\,-relax produces same error. Any ideas?

Thanks for the help you are both offering. I didn't really expect such rapid 
respones!

Stuart

On Thu, 15 Jun 2000, Michael Murphy wrote:
> From: Stuart McNicholas <sjm@xxxxxxxxxxxxxxxx>
>
>       On Thu, 15 Jun 2000, Jack Carter wrote:
>       > Try -Wl,-relax from the driver.
>       >
>       > Jack
>
>       By which, I think you mean:
>
>       sgif90 -i8 -i64 -Wl,-relax -O3 -lcrypt -o
>       /hosts/fs/home2/sjm/molpro2000.5/bin/molpro.exe molver.o molpro.o
>       -L/hosts/fs/home2/sjm/molpro2000.5/lib -lmolpro -lgks0
>
>       Then I get:
>
>       gcc: unrecognized option `-relax'
>       /usr/lib/gcc-lib/ia64-hp-linux/2.9-ia64-000216/crtbegin.o(.fini+0x2):
>       relocation truncated to fit: PCREL21B fini
>       collect2: ld returned 1 exit status
>
>       ie, same error as before and unknown option -relax.
>
> This is an compiler driver error which exists in the version we
> open-sourced last month.  We have since fixed it, so -Wl,-relax
> will work in the next release update.  This was a general bug with
> how -Wl flags are passed to the linker.  In the meantime,
> you can either do:
> -Wl,-Wl\\,--relax
> or you can invoke gcc directly to do the link and add in -relax
> (if you do sgif90 -show you'll see how gcc is invoked to do the link,
> then just add the -relax option by hand).
>
> -- Mike Murphy
> -- mpm@xxxxxxx
> -- quote of the day:
> --  "To laugh often and much; to win the respect of intelligent people and
> --  the affection of children; to earn the appreciation of honest critics
> --  and endure the betrayal of false friends; to appreciate beauty;
> --  to find the best in others; to leave the world a bit better,
> --  whether by a healthy child, a garden patch or a redeemed social
> condition; --  to know even one life has breathed easier because you have
> lived. --  This is to have succeeded."  (Ralph Waldo Emerson)

-- 
Stuart McNicholas,                email:     sjm@xxxxxxxxxxxxx
School of Chemistry,              Telephone: +44-121-414-4388
University of Birmingham,         Fax:       +44-121 414 4403 
Edgbaston, Birmingham B15 2TT, UK

<Prev in Thread] Current Thread [Next in Thread>