[Users] GSL compiling problems using XL compilers

Erik Schnetter schnetter at cct.lsu.edu
Thu Jun 28 22:38:51 CDT 2007


On Jun 28, 2007, at 22:27:27, Hee Il Kim wrote:

> Hi,
>
> I have a problem in compiling AEIThorns/GSL with xlc on a ibm  
> pseries64 machine. I tested with gsl-1.8 & 1.9. i found the similar  
> problems in the gsl mailing list and also found a bunch of similar  
> problems by searching "xlc redeclaration" in google but I don't  
> understand them at all and no hints found yet.
>
> --- error messages ---
>
> Checking status of thorn GSL
> ______________________________________________________________________ 
> __
> Preprocessing /home/hmlee/Cactus/arrangements/AEIThorns/GSL/src/ 
> gsl_sf_erf.c
> Compiling /home/hmlee/Cactus/arrangements/AEIThorns/GSL/src/ 
> gsl_sf_erf.c
> "/home/hmlee/Cactus/configs/lo_gsl/build/GSL/gsl_sf_erf.c", line  
> 15.1: 1506-343 (S) Redeclaration of gsl_sf_erfc_e differs from  
> previous declaration on line 45 of "/home/hmlee/local/gsl- 1.8/ 
> include/gsl/gsl_sf_erf.h".
> "/home/hmlee/Cactus/configs/lo_gsl/build/GSL/gsl_sf_erf.c", line  
> 15.1: 1506-377 (I) The type "const double* restrict const" of  
> parameter 1 differs from the previous type "double".
> ...
>
> make[3]: *** [gsl_sf_erf.c.o] Error 1
> make[2]: *** [make.checked] Error 2
> make[1]: *** [/home/hmlee/Cactus/configs/lo_gsl/lib/libthorn_GSL.a]  
> Error 2
> make: *** [lo_gsl] Error 2
> ---

Hee Il,

this error is caused by a Fortran compiler which does not add  
underscores to names.  That means that functions written in C and in  
Fortran have the same names; since they use different calling  
conventions, this cannot work.

You can pass the option "-qextname" to the Fortran compiler to change  
this behaviour.  For Cactus, you use the options

F77FLAGS = -qextname
F90FLAGS = -qextname

when you configure.

-erik

-- 
Erik Schnetter <schnetter at cct.lsu.edu>

My email is as private as my paper mail.  I therefore support encrypting
and signing email messages.  Get my PGP key from www.keyserver.net.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://www.cactuscode.org/pipermail/users/attachments/20070628/d1ae1a13/attachment.bin 


More information about the Users mailing list