AMBER Archive (2006)

Subject: Re: AMBER: Compiling Amber 9 on SGI with gcc

From: Scott Brozell (sbrozell_at_scripps.edu)
Date: Fri Dec 08 2006 - 21:29:15 CST


Hi,

I am interested in this because I want to know why -m32 fails ?
Is it just a gcc version issue ???

On Fri, 8 Dec 2006, Shin, John Y CONTRACTOR WRAIR-Wash DC wrote:

> I'm trying to compile Amber 9 on an Octane 2 SGI machine running IRIX
> 6.5.25f using gcc 4.0.3, binutils 2.17, and g95 0.9. I use the
> following commands to compile:
> 1. ./configure g95
> 2. make serial
>
> It proceeds fine until the first instance that gcc is invoked, and the
> following occurs:
> gcc -c -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -02 -m32 -o
> mmtsb_client.o mmtsb_client.c
> cc1: error: invalid option '32'
>
> I read elsewhere in the mail archives that some people who had a similar
> problem were able to make Amber compile by deleting the "-m32" flag from
> config.h.

Yes, I found this
http://amber.ch.ic.ac.uk/archive/200604/0204.html
But nothing of interest to me in it.

For the record on an itanium with -m32 in the gcc man page, gcc -m32 failed:
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-52)
Linux ipf-login1 2.4.21-sgi306rp21 #1 SMP Thu Oct 13 18:51:34 EDT 2005 ia64 ia64 ia64 GNU/Linux
Red Hat Enterprise Linux AS release 3 (Taroon Update 5)

> In my case, deleting the flag does allow compilation to
> proceed further, but it runs into another error down the road and gives
> the following message:
> ld32: FATAL 2 : Internal: at ../../ld/multigot.c lgot_local_got_offset()
> seg_ndx exceeds per_seg_lgot_table
> ld32: INFO 152: Output file removed because of error.

I only found this hit which does not offer an explaination:
http://gcc.gnu.org/ml/gcc-bugs/2001-07/msg00225.html

> According to the GCC 4.0.3 manual it seems -m32 is a valid flag for some
> architectures, although I didn't see the SGI listed as one of them. If
> the flag is not valid for SGIs, what would be the SGI equivalent I need
> to use? Any help would be greatly appreciated!

Option wise -mabi=32 from the MIPS section of the gcc man page
will result in 32 bit ints, longs, and pointers.

Another approach is to remove all occurrences of
mmtsb_client.o
from the sander Makefile.
Since you did not configure with mmtsb, mmtsb_client.o does not have
anything useful in it.

Scott

-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber_at_scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo_at_scripps.edu