[ncl-install] troubles compiling NCL with PGI and gcc on CentOS
Mary Haley
haley at ucar.edu
Thu Oct 25 09:56:52 MDT 2012
Tiziana,
Since you are using gcc and not pgcc, the "-pgf90libs" option is not going to be recognized. You may need to uncomment
the other CtoFLibraries line that lists the "-l" libraries separately.
Is there a reason you're using gcc and not pgcc?
--Mary
On Oct 24, 2012, at 4:58 PM, Tiziana Cherubini wrote:
> Aloha,
>
> I am trying to compile the ncl/ncarg graphics on our server running CentOS (uname -a => Linux io.ifa.hawaii.edu 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux), with gcc (v4.4.6 ), and pgi (v12.9).
>
> I set up the configuration file to look like:
>
> /*
> * Description: This file contains all the directives needed to
> * tell ymake how to build NCARG/NCL on a 64-bit
> * LINUX system using the Portland Group compilers.
> *
> * Copy this file to the LINUX file in this directory
> * before you start the NCL/NCARG build.
> */
> #define HdfDefines -DLINUX64
> #define StdDefines -DSYSV -D_POSIX_SOURCE -D_XOPEN_SOURCE -DByteSwapped
> #define ByteSwapped
> #define Cstatic
> #define Cdynamic
> #define CppCommand '/usr/bin/cpp -traditional'
> #define CCompiler gcc
> #define FCompiler pgf90 -tp k8-64 -O -Msignextend -Mreentrant -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> /*
> #define CtoFLibraries -lpgc -lpgf90 -lpgf90_rpm1 -lpgf902 -lpgftnrtl -lpghpf
> */
> #define CtoFLibraries -pgf90libs
> #define XToolLibrary -lXt -lSM -lICE
> #define BuildShared NO
> #define ExtraExportFlags -Wl,--export-dynamic
>
> #define ArchRecLibSearch -L/usr/X11R6/lib64
> #define ArchRecIncSearch -I/usr/X11R6/include
>
> FC = $(F77)
>
>
> But I get undefined references to the fortran libraries (please see below for an extract of the make log file). I believe the problem is in the CtoFlibaries… perhaps I shouldn't be using the -pgf90libs ? Any suggestion on what to change in this respect would be greatly appreciated.
>
> Thank you very much,
>
> Tiziana.
>
> ...
> gcc -O -o ictrans main.o ../../../.././ncarview/src/lib/libictrans/libictrans.o ../../../.././ncarview/src/lib/libctrans/libctrans.o -L../../../.././ncarview/src/lib/libcgm -lcgm -L../../../.././ncarview/src/lib/libncarg_ras -lncarg_ras -L../../../.././common/src/libncarg_c -lncarg_c -L/usr/local/ncarg/lib -L/usr/lib64/X11 -L/usr/local/lib -L/opt/pgi/linux86-64/12.9/lib -L/usr/local/netcdf-4.1.3-NoHDF4/lib -lX11 -lmfhdf -ldf -ljpeg -lz -lsz -pgf90libs
> gcc: unrecognized option '-pgf90libs'
> ../../../.././ncarview/src/lib/libcgm/libcgm.a(meta_edit.o): In function `CGM_initMetaEdit':
> meta_edit.c:(.text+0x1295): warning: the use of `mktemp' is dangerous, better use `mkstemp'
> ../../../.././ncarview/src/lib/libictrans/libictrans.o: In function `giargs_':
> /usr/local/ncl_ncarg-6.0.0-src/ncarview/src/lib/libictrans/./fort_ictrans.f:54: undefined reference to `pgf90_str_copy'
> ../../../.././ncarview/src/lib/libictrans/libictrans.o: In function `.C2_303':
> fort_ictrans.f:(.data+0x1b20): undefined reference to `pgf90_compiled'
> collect2: ld returned 1 exit status
> make[5]: *** [ictrans] Error 1
> make[5]: Leaving directory `/usr/local/ncl_ncarg-6.0.0-src/ncarview/src/bin/ictrans'
>
>
> ---
> Tiziana Cherubini, PhD
> Research Meteorologist, MKWC (http://mkwc.ifa.hawaii.edu)
> University of Hawaii - Dept. of Meteorology
> 2525 Correa Rd HIG 367 Honolulu HI 96822
> tel (808) 956 4593
> fax (808) 956 2877
>
>
>
> _______________________________________________
> ncl-install mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-install
More information about the ncl-install
mailing list