This is the mail archive of the
mailing list for the GCC project.
Problem with gfortran or did I messsed up GMP installation?
- From: Aleksandar Milivojevic <alex at milivojevic dot org>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 13 Jan 2006 11:36:08 -0600
- Subject: Problem with gfortran or did I messsed up GMP installation?
I've just recompiled GCC 4.0.2 for sparc-sun-solaris2.9 with fortran
language enabled. To test it, I found short hello world program on the
If I produce 32-bit binary by simply using "gfortran hello.f", it
compiles, but the resulting binary exits immediatelly (no output). If
I produce 64-bit binary using "gfortran -m64 hello.f", the program
prints hello world in an infinite loop. Hmph...
The only "unusual" thing on my system was small manual fix to have both
32-bit and 64-bit GMP installed with same prefix. The fix was to
compare gmp.h file from 32-bit and 64-bit build and merge them (so that
I can use same gmp.h file for compiling both 32-bit and 64-bit
programs) by changing lines that define __GMP_BITS_PER_MP_LIMB and
GMP_LIMB_BITS like this:
#define __GMP_BITS_PER_MP_LIMB 64
#else /* _ILP32 */
#define __GMP_BITS_PER_MP_LIMB 32
#define GMP_LIMB_BITS 64
#else /* _ILP32 */
#define GMP_LIMB_BITS 32
This looked like the correct way to go. The same ifdef construct is
used throughout system include files (/usr/include) for the same
Of course, 32-bit and 64-bit libgmp and libmpfr libraries live each in
its own directory (32-bit in /prefix/lib, 64-bit in
So, the question is, did I broke something by attempting to have both
32-bit and 64-bit GMP library installed simultaniously? Did I miss
anything needed to have both 32-bit and 64-bit GMP available on the
system? Or is there something wrong with gfortran compiler?
The "hello world" program looks like this. I haven't done anything
fortran in a veeeeeeeery long time (last time like in 1992 or
something). Looks to me like it should just print hello world in
c Hello, world.
DO while (.NOT. DONE)
10 format('Hello, world.')
This message was sent using IMP, the Internet Messaging Program.