This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: GCC 4.5.0 - libgfortran issue


Hi Phillip

Great. Thanks a ton for your mail and solution. I will try as you had
suggested. Since this mail was posted, I have now moved to gcc 4.5.1
skipped 4.5.0 altogether. It is nice to know that you had the same issue
on 4.5.1 and will try your suggestion in that. I will send an update
soon.

With Regards

Vardhan 

-----Original Message-----
From: Philipp Edelmann [mailto:edelmann@MPA-Garching.MPG.DE] 
Sent: Tuesday, August 10, 2010 4:39 AM
To: Vardhan, Sundara (GE Energy)
Cc: gcc-help@gcc.gnu.org
Subject: Re: GCC 4.5.0 - libgfortran issue

Dear Vardhan,

On Tue, May 18, 2010 at 08:21:21AM -0400, Vardhan, Sundara (GE Infra,
Energy) wrote:
> I downloaded the GCC 4.5.0 source and am compiling on AIX 6.1. The 
> following is the configure command used to build the make files etc
> 
> /cots/gnu/gcc-4.5.0/configure --with-as=/usr/bin/as 
> --with-ld=/usr/bin/ld --enable-languages=c,c++,fortran 
> --prefix=/cots/gnu/gcc450 --enable-threads --disable-nls 
> --enable-decimal-float=dpd --with-mpfr=/cots/gnu/mpfr242
> --with-gmp=/cots/gnu/gmp501 --with-mpc=/cots/gnu/mpc081
> 
> Set the CONFIG_SHELL to bash and when compiled I get the following 
> error
> :
> 
> ld: 0711-317 ERROR: Undefined symbol: .__copysignl128
> ld: 0711-317 ERROR: Undefined symbol: .__nextafterl128
> ld: 0711-317 ERROR: Undefined symbol: .__scalbnl128
> ld: 0711-317 ERROR: Undefined symbol: .__cabsl128
> ld: 0711-317 ERROR: Undefined symbol: .__cargl128
> ld: 0711-317 ERROR: Undefined symbol: .__truncl128
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more 
> information.
> collect2: ld returned 8 exit status
> make[3]: *** [libgfortran.la] Error 1
> make[3]: Leaving directory
> `/cots/gnu/build450/powerpc-ibm-aix6.1.4.0/libgfortran'

I encountered the same problem while compiling gcc-4.5.1 on AIX. The
problem is that GCC tries to use the 128 bit long double functions.
These are not the default on AIX (see [1]). I tried to find the library
comprising the missing functions but I could not find it. A quick and
dirty solution is to undefine the macro __LONGDOUBLE128, which causes
the compiler to use the normal long double functions instead of the 128
bit variants. I am not sure what happens to quad precision Fortran
calculations in this case, you should definitely check that first.
I attached a patch that fixes compilation for me. I would be glad to
hear if were successful with it. Also a GCC developer could maybe
comment on a real solution to the problem. It seems that only some of
the
128 bit functions are missing (or I just didn't find them with find and
objdump), so we need a replacement. Anyway, the 128 bit floats on AIX
are not IEEE 754 compliant (they are just two normal 64 bit floats that
are added to yield a larger mantissa), so I am not sure if it actually
makes sense to use those functions when strict floating point behavior
is required.


Cheers,

[1]
http://publib.boulder.ibm.com/infocenter/aix/v6r1/index.jsp?topic=/com.i
bm.aix.genprogc/doc/genprogc/128bit_long_double_floating-point_datatype.
htm
--
Philipp Edelmann
Max Planck Institute for Astrophysics
Tel. +49-89-30000-2272


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]