C compiler cannot run C compiled programs

Hi all,
I’m trying to compile netcdf-3.6.0-p1 with pgf90 in linux machine,but i get the error, C compiler cannot run C compiled programs.This error is in config.log file.
Can anyone help me with this?
thanks,

Petero.

---------------------here is my config.log file------------------
checking build system type… i686-pc-linux-gnu
checking host system type… i686-pc-linux-gnu
checking for top-level source-directory… /tmp/working/netcdf-3.6.0-p1/src
checking for C compiler default output file name… b.out
checking whether the C compiler works… configure: error: cannot run C compiled programs. If you meant to cross compile, use --host'. See config.log’ for more details.

uname -s = Linux
uname -v = #1 Thu Dec 18 12:53:39 EST 2003

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = i686
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/local/lf9562/bin
PATH: /usr/local/lf9562/bin
PATH: /usr/local/bin
PATH: /bin
PATH: /usr/bin
PATH: /usr/X11R6/bin
PATH: /home/3dvar/bin
PATH: /bin
PATH: /usr/pgi/linux86/6.0/bin
PATH: /usr/bin/perl
PATH: usr/local/bin
PATH: /sbin
PATH: /usr/bin
PATH: /usr/sbin
PATH: /home/3dvar/bin
PATH: /bin
PATH: /usr/sbin
PATH: /usr/pgi/linux86/6.0/bin
PATH: /usr/local/perl
PATH: usr/local/bin
PATH: /sbin
PATH: /usr/bin

\

-----------

Core tests.

-----------

configure:1369: checking build system type
configure:1387: result: i686-pc-linux-gnu
configure:1395: checking host system type
configure:1409: result: i686-pc-linux-gnu
configure:1421: checking for top-level source-directory
configure:1424: result: /tmp/working/netcdf-3.6.0-p1/src
configure:1531: checking for C compiler version
configure:1534: pgcc --version </dev/null >&5
pgcc-Warning-Unknown switch: --version
pgcc-Warning-No files to process
configure:1537: $? = 0
configure:1539: pgcc -v </dev/null >&5
pgcc-Warning-No files to process
configure:1542: $? = 0
configure:1544: pgcc -V </dev/null >&5
pgcc 6.0-1 32-bit target on x86 Linux
configure:1576: $? = 0
configure:1622: result: b.out
configure:1627: checking whether the C compiler works
configure:1633: ./b.out
./configure: line 1: ./b.out: No such file or directory
configure:1636: $? = 127
configure:1645: error: cannot run C compiled programs.
If you meant to cross compile, use --host'. See config.log’ for more details.

Hi Petero,

I started with a fresh NetCDF 3.6.0p1 install by untaring package and then running configure using the following command:

env CC=pgcc CFLAGS="-O2 -Msignextend -V" FC=pgf90 F90=pgf90 FFLAGS="-O2 -w -V" CXX=pgCC CPPFLAGS="-DNDEBUG -DpgiFortran" ./configure -prefix=/tmp/final

From my config.log file:

-----------

Core tests.

-----------

configure:1369: checking build system type
configure:1387: result: i686-pc-linux-gnu
configure:1395: checking host system type
configure:1409: result: i686-pc-linux-gnu
configure:1421: checking for top-level source-directory
configure:1424: result: /tmp/qa/netcdf-3.6.0-p1
configure:1531: checking for C compiler version
configure:1534: pgcc --version </dev/null >&5
pgcc-Warning-Unknown switch: --version
pgcc-Warning-No files to process
configure:1537: ? = 0 configure:1539: pgcc -v </dev/null >&5 pgcc-Warning-No files to process configure:1542: ? = 0
configure:1544: pgcc -V </dev/null >&5

pgcc Rel Dev 32-bit target on x86 Linux
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2005, STMicroelectronics, Inc. All Rights Reserved.
configure:1547: ? = 0 **configure:1570: checking for C compiler default output file name configure:1573: pgcc -O2 -Msignextend -V -DNDEBUG -DpgiFortran conftest.c >&5 PGC/x86 Linux/x86 Rel Dev Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved. Copyright 2000-2005, STMicroelectronics, Inc. All Rights Reserved.\ \ pgcc Rel Dev 32-bit target on x86 Linux Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved. Copyright 2000-2005, STMicroelectronics, Inc. All Rights Reserved. configure:1576: ? = 0**
configure:1622: result: a.out
configure:1627: checking whether the C compiler works
configure:1633: ./a.out
configure:1636: $? = 0

Notice that your configuration is skipping line 1570 which determines the default executable name. However, instead of failing, your configure script sets the default exe name to ‘b.out’. Since ‘b.out’ doesn’t actually exist, your configuration fails. Unless your configure script has been modified, I find this behavior very odd.

Starting at the point where you have untar’d the NetCDF package and change to the “src” directory, what are the steps you do to run configure?

  • Mat

Hi Mat,

These are steps which i did in installing netcdf.

  1. First i started a fresh installation by downloading the source code and put in the /tmp.
  2. I created two directories working and final.
  3. At /tmp, i unzip the netcdf.tar.gz
  4. I changed the directory to /tmp/working and run tar -xvf /tmp/netcdf.tar
  5. At /tmp/working,where i untar the netcdf.tar i changed to net*/src and run env CC=pgcc CFLAGS="-O2 -Msignextend -V" FC=pgf90 F90=pgf90 FFLAGS="-O2 -w -V" CXX=pgCC CPPFLAGS="-DNDEBUG -DpgiFortran" ./configure -prefix=/tmp/final >& config.log
  6. i looked in config.log and i get the same error message: C compiler cannot run the compiled program.

-----------see my config.log------------------------------
checking build system type… i686-pc-linux-gnu
checking host system type… i686-pc-linux-gnu
checking for top-level source-directory… /tmp/working/netcdf-3.6.0-p1/src
checking for C compiler default output file name… b.out
checking whether the C compiler works… configure: error: cannot run C compiled programs.
If you meant to cross compile, use --host'. See config.log’ for more details.

uname -s = Linux
uname -v = #1 Thu Dec 18 12:53:39 EST 2003

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = i686
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/local/lf9562/bin
PATH: /usr/local/lf9562/bin
PATH: /usr/local/bin
PATH: /bin
PATH: /usr/bin
PATH: /usr/X11R6/bin
PATH: /home/3dvar/bin
PATH: /bin
PATH: /usr/pgi/linux86/6.0/bin
PATH: /usr/bin/perl
PATH: usr/local/bin
PATH: /sbin
PATH: /usr/bin
PATH: /usr/sbin
PATH: /home/3dvar/bin
PATH: /bin
PATH: /usr/sbin
PATH: /usr/pgi/linux86/6.0/bin
PATH: /usr/local/perl
PATH: usr/local/bin
PATH: /sbin

configure:1369: checking build system type
configure:1387: result: i686-pc-linux-gnu
configure:1395: checking host system type
configure:1409: result: i686-pc-linux-gnu
configure:1421: checking for top-level source-directory
configure:1424: result: /tmp/working/netcdf-3.6.0-p1/src
configure:1531: checking for C compiler version
configure:1534: pgcc --version </dev/null >&5
pgcc-Warning-Unknown switch: --version
pgcc-Warning-No files to process
configure:1537: $? = 0
configure:1539: pgcc -v </dev/null >&5
pgcc-Warning-No files to process
configure:1542: $? = 0
configure:1544: pgcc -V </dev/null >&5

pgcc 6.0-1 32-bit target on x86 Linux
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2005, STMicroelectronics, Inc. All Rights Reserved.
configure:1547: $? = 0
configure:1570: checking for C compiler default output file name
configure:1573: pgcc -o2 -Msignextend -V -DNDEBUG -DpgiFortran conftest.c >&5
NOTE: your evaluation license will expire in 9 days, 8.06 hours.
Waiting for 4 seconds…
For a permanent license, please read the order acknowledgement
that you received. Connect to https://www.pgroup.com/License with
the username and password in the order acknowledgement.

PGC/x86 Linux/x86 6.0-1
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2005, STMicroelectronics, Inc. All Rights Reserved.

pgcc 6.0-1 32-bit target on x86 Linux
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2005, STMicroelectronics, Inc. All Rights Reserved.
configure:1576: $? = 0
configure:1622: result: b.out
configure:1627: checking whether the C compiler works
configure:1633: ./b.out
./configure: line 1: ./b.out: No such file or directory
configure:1636: $? = 127
configure:1645: error: cannot run C compiled programs.
If you meant to cross compile, use --host'. See config.log’ for more details.

----------------

Cache variables.

----------------

ac_cv_build=i686-pc-linux-gnu
ac_cv_build_alias=i686-pc-linux-gnu
ac_cv_env_CC_set=set
ac_cv_env_CC_value=pgcc
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value=’-o2 -Msignextend -V’
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=’-DNDEBUG -DpgiFortran’
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXFLAGS_set=set
ac_cv_env_CXXFLAGS_value=-g
ac_cv_env_CXX_set=set
ac_cv_env_CXX_value==pgCC
ac_cv_env_FCFLAGS_set=
ac_cv_env_FCFLAGS_value=
ac_cv_env_FC_set=set
ac_cv_env_FC_value=pgf90
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_exeext=
ac_cv_host=i686-pc-linux-gnu
ac_cv_host_alias=i686-pc-linux-gnu

-----------------

ARFLAGS=’’
CC=‘pgcc’
CC_MAKEDEPEND=’’
CFLAGS=’-o2 -Msignextend -V’
COMPILE_F=’’
CPP=’’
CPPFLAGS=’-DNDEBUG -DpgiFortran’
CXX=’=pgCC’
CXXFLAGS=’-g’
DEFS=’’
ECHO_C=’’
ECHO_N=’-n’
ECHO_T=’’
EGREP=’’
EXEEXT=’’
F90=‘pgf90’
F90FLAGS=’-g’
F90LIBS=’’
FC=‘pgf90’
FCFLAGS=’’
FFLAGS=’-o2 -w -V’
FLIBS=’’
FPP=’’
FPPFLAGS=’’
FTPBINDIR=’’
IGNORE_FPE=’’
INSTALL_DATA=’’
INSTALL_PROGRAM=’’
INSTALL_SCRIPT=’’
LDFLAGS=’’
LIBOBJS=’’
LIBS=’’
LTLIBOBJS=’’
M4=’’
M4FLAGS=’’
MAKEWHATIS_CMD=’’
MATHLIB=’’
NM=’’
NMFLAGS=’’
OBJEXT=’’
PACKAGE_BUGREPORT=‘support@unidata.ucar.edu
PACKAGE_NAME=‘netCDF’
PACKAGE_STRING=‘netCDF 3.6.0’
PACKAGE_TARNAME=‘netcdf’
PACKAGE_VERSION=‘3.6.0’
PATH_SEPARATOR=’:’
RANLIB=’’
SHELL=’/bin/sh’
SRCDIR=’/tmp/working/netcdf-3.6.0-p1/src’
WHATIS=’’
ac_ct_CC=’’
ac_ct_CXX=’’
ac_ct_FC=’’
ac_ct_RANLIB=’’
bindir=’${exec_prefix}/bin’
build=‘i686-pc-linux-gnu’
build_alias=’’
build_cpu=‘i686’
build_os=‘linux-gnu’
build_vendor=‘pc’
datadir=’${prefix}/share’
exec_prefix=‘NONE’
host=‘i686-pc-linux-gnu’
host_alias=’’
host_cpu=‘i686’
host_os=‘linux-gnu’
host_vendor=‘pc’
includedir=’${prefix}/include’
infodir=’${prefix}/info’
libdir=’${exec_prefix}/lib’
libexecdir=’${exec_prefix}/libexec’
localstatedir=’${prefix}/var’
mandir=’${prefix}/man’
oldincludedir=’/usr/include’
prefix=’/tmp/final’
prog=’’
program_transform_name=‘s,x,x,’
sbindir=’${exec_prefix}/sbin’
sharedstatedir=’${prefix}/com’
sysconfdir=’${prefix}/etc’
target_alias=’’

-----------

confdefs.h.

-----------

-----------

confdefs.h.

-----------

#define PACKAGE_BUGREPORT “support@unidata.ucar.edu
#define PACKAGE_NAME “netCDF”
#define PACKAGE_STRING “netCDF 3.6.0”
#define PACKAGE_TARNAME “netcdf”
#define PACKAGE_VERSION “3.6.0”

configure: exit 1

Hi Petero,

This is really odd. I have not seen this before nor quite understand why your getting this error. Perhaps another user has encountered this? Also, you may consider contacting Unidata.

Let’s by pass the configuration step. I’ve posted my macros.make file which is what the configuration script is attempting to create. Copy this file to your NetCDF “src” directory and modify it so that the “SRCDIR” and “prefix” variables have the correct path names for your system. Next, type ‘make’ to create the library.

Let me know how it goes.
Mat

Mat,

This is so weird, i tried to copy the file macros.make and do some modification to SRCDIR and prefix paths,but i got the following errors after running make.
NB: i have just install a fresh linux86 compiler, and succesful compile and run a simple hello world program.
Also i have attached my .bashrc file to show you how i set up my environment

-----------------------errors----------------------------
make[1]: Entering directory `/tmp/working/netcdf-3.6.0-p1/src’

Making `all’ in directory /tmp/working/netcdf-3.6.0-p1/src/libsrc

make[2]: Entering directory /tmp/working/netcdf-3.6.0-p1/src/libsrc' make[2]: *** No rule to make target ncconfig.h’, needed by attr.o'. Stop. make[2]: Leaving directory /tmp/working/netcdf-3.6.0-p1/src/libsrc’
make[1]: *** [subdir_target] Error 1
make[1]: Leaving directory `/tmp/working/netcdf-3.6.0-p1/src’
make: *** [libsrc/all] Error 2
----------------------end of errors-------------------------------------
.bashrc file
PATH=$PATH:$HOME/bin:/bin:$PGI/linux86/6.0/bin:/usr/bin/perl:usr/local/bin:/sbin:/usr/bin:/usr/sbin
export PATH
MANPATH=/usr/pgi/linux86/6.0/man
export MANPATH
export LM_LICENSE_FILE=/usr/pgi/license.dat

#Specifying Netcdf environment variable
export CC=/usr/pgi/linux86/6.0/bin/pgcc
export FC=/usr/pgi/linux86/6.0/bin/pgf90
export F90=/usr/pgi/linux86/6.0/bin/pgf90
export CXX=/usr/pgi/linux86/6.0/bin/pgCC
export CFLAGS="-o2 -Msignextend -V"
export CPPFLAGS="-DNDEBUG -DpgiFortran"
export FFLAGS="-o2 -w -V"
export F90FLAGS=-g
export CXXFLAGS=-g

Sorry Petero, I missed some files. Heres the complete configured files in a tar package. Note I created these files on a Pentium 4 system running SuSE 9.1.

  • Mat

Mat,
Thank you so much for your help.I didn’t get any errors!.
thanks,
take care,
petero
[/url]

Hi mat,
Soory for showing up again,
It seems that, the netCDF library wasn’t correctly installed with pgf90 compiler.Because i was trying to link it with WRF 3DVAR software but , the netCDF library couldn’t load the file wrfio_nf.
So i guess skipping the ./configure step during the netCDF installation could be the cause or do you have any suggestion may be?
petero.

Hi Petero,

While possible, its more likely a problem with your WRF configuration. What is the exact error? I’m wondering if you mean that your getting a link error like an undefined reference.

  • Mat

Mat,
Below is what happened, and i have bolded the error.
############################################

make[1]: Entering directory `/home/3dvar/dat_dir/wrf3dvar/main’
rm -f da_3dvar.o
sed /!.*’/s/’//g da_3dvar.F > da_3dvar.b
/lib/cpp -I…/inc -I. -C -P -DDEREF_KLUDGE -DIO_DEREF_KLUDGE -DIWORDSIZE=4 -DRWORDSIZE=8 -DLWORDSIZE=4 -DNETCDF -DTRIEDNTRUE -DONLY_WRFMODEL_IO -DD3VAR_KLUDGE -DPGF90 -traditional da_3dvar.b > da_3dvar.f
rm -f da_3dvar.b
pgf90 -c -fast -r8 -Ktrap=fp -tp p6 -byteswapio -Mfree -g -I. -I…/da_3dvar -I…/external/io_netcdf -I…/external/io_int -I…/frame -I…/share -I…/inc da_3dvar.f
NOTE: your evaluation license will expire in 14 days, 23.7 hours.
For a permanent license, please read the order acknowledgement
that you received. Connect to https://www.pgroup.com/License with
the username and password in the order acknowledgement.

ranlib lib_3dvar.a
pgf90 -o da_3dvar.exe da_3dvar.o lib_3dvar.a -L…/external/io_netcdf -lwrfio_nf -L/usr/local/netcdf-3.6.0-p1/lib -lnetcdf …/frame/internal_header_util.o …/frame/pack_utils.o
/usr/bin/ld: cannot find -lwrfio_nf

make[1]: [da_3dvar] Error 2 (ignored)
make[1]: Leaving directory `/home/3dvar/dat_dir/wrf3dvar/main’
( cd run ; /bin/rm -f da_3dvar.exe ; ln -s …/main/da_3dvar.exe . )
#############################################

Your “libwrfio_nf.a” library either wasn’t built, failed to build, or is not in the /home/3dvar/dat_dir/wrf3dvar/external/io_netcdf directory. This is the first thing the “compile” script builds so either an error occured or it was skipped. Re-run “compile” and see if there are any errors when building this library.

  • Mat

hi Mat,
I tried to reinstall the compiler again,and compile a simple hello.c program to see if the pgcc is working ,and this is what i get.Is this usual?
thanks,
petero.

[root@drizzle 3dvar]# pgcc -v hello.c

/usr/pgi/linux86/6.0/bin/pgc hello.c -opt 1 -x 119 0xa10000 -x 119 0x100000 -x 1 22 0x40 -x 123 0x1000 -x 127 4 -x 119 0x40000000 -x 19 0x400000 -x 80 0x300 -y 8 0 0x1000 -x 80 0x40000000 -x 119 0x8000000 -astype 0 -stdinc /usr/pgi/linux86/6. 0/include:/usr/local/include:/usr/lib/gcc-lib/i386-redhat-linux/3.2/include:/usr /lib/gcc-lib/i386-redhat-linux/3.2/include:/usr/include -def unix -def __unix -d ef unix -def linux -def __linux -def linux -def inline= -def i386 -d ef __i386 -def i386 -def __NO_MATH_INLINES -def linux86 -def __THROW= -predi cate ‘#machine(i386) #lint(off) #system(unix) #system(posix) #cpu(i386)’ -cmdlin e ‘+pgcc hello.c -v’ -asm /tmp/pgccaaaaaeCsal.s
NOTE: your evaluation license will expire in 14 days, 0.347 hours.
For a permanent license, please read the order acknowledgement
that you received. Connect to https://www.pgroup.com/License with
the username and password in the order acknowledgement.

PGC-I-0222-Redundant definition for symbol __THROW (/usr/include/sys/cdefs.h: 57 )
PGC-I-0222-Redundant definition for symbol __stub___kernel_cosl (/usr/include/gn u/stubs.h: 11)
PGC-I-0222-Redundant definition for symbol __stub___kernel_sinl (/usr/include/gn u/stubs.h: 13)
PGC-I-0222-Redundant definition for symbol __stub___kernel_tanl (/usr/include/gn u/stubs.h: 15)
PGC-I-0222-Redundant definition for symbol __stub_chflags (/usr/include/gnu/stub s.h: 17)
PGC-I-0222-Redundant definition for symbol __stub_fattach (/usr/include/gnu/stub s.h: 19)
PGC-I-0222-Redundant definition for symbol __stub_fchflags (/usr/include/gnu/stu bs.h: 21)
PGC-I-0222-Redundant definition for symbol __stub_fdetach (/usr/include/gnu/stub s.h: 23)
PGC-I-0222-Redundant definition for symbol __stub_futimes (/usr/include/gnu/stub s.h: 25)
PGC-I-0222-Redundant definition for symbol __stub_gtty (/usr/include/gnu/stubs.h : 27)
PGC-I-0222-Redundant definition for symbol __stub_lchmod (/usr/include/gnu/stubs .h: 29)
PGC-I-0222-Redundant definition for symbol __stub_lutimes (/usr/include/gnu/stub s.h: 31)
PGC-I-0222-Redundant definition for symbol __stub_posix_fadvise64 (/usr/include/ gnu/stubs.h: 33)
PGC-I-0222-Redundant definition for symbol __stub_remap_file_pages (/usr/include /gnu/stubs.h: 35)
PGC-I-0222-Redundant definition for symbol __stub_revoke (/usr/include/gnu/stubs .h: 37)
PGC-I-0222-Redundant definition for symbol __stub_setlogin (/usr/include/gnu/stu bs.h: 39)
PGC-I-0222-Redundant definition for symbol __stub_sigreturn (/usr/include/gnu/st ubs.h: 41)
PGC-I-0222-Redundant definition for symbol __stub_sstk (/usr/include/gnu/stubs.h : 43)
PGC-I-0222-Redundant definition for symbol __stub_stty (/usr/include/gnu/stubs.h : 45)
PGC-I-0222-Redundant definition for symbol __need_wint_t (/usr/include/wchar.h: 47)
PGC-I-0222-Redundant definition for symbol __need_wint_t (/usr/include/wchar.h: 47)
PGC/x86 Linux/x86 6.0-4: compilation completed with informational messages

/usr/bin/as /tmp/pgccaaaaaeCsal.s -o /tmp/pgccbaaaaeCsal.o

/usr/bin/ld /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/gcc-lib/i386-redhat-linux/3 .2/crtbegin.o -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /tmp/pgccbaaaaeCsal .o -L/usr/pgi/linux86/6.0/lib -L/usr/lib -L/usr/lib/gcc-lib/i386-redhat-linux/3. 2 -rpath /usr/pgi/linux86/6.0/lib -lc -lnspgc -lpgc -lm -lgcc -lc -lgcc /usr/lib /gcc-lib/i386-redhat-linux/3.2/crtend.o /usr/lib/crtn.o
Unlinking /tmp/pgccaaaaaeCsal.s
Unlinking /tmp/pgccbaaaaeCsal.o

hi Mat,
I tried to reinstall the compiler again,and compile a simple hello.c program to see if the pgcc is working ,and this is what i get.Is this usual?
thanks,
petero.

[root@drizzle 3dvar]# pgcc -v hello.c

/usr/pgi/linux86/6.0/bin/pgc hello.c -opt 1 -x 119 0xa10000 -x 119 0x100000 -x 1 22 0x40 -x 123 0x1000 -x 127 4 -x 119 0x40000000 -x 19 0x400000 -x 80 0x300 -y 8 0 0x1000 -x 80 0x40000000 -x 119 0x8000000 -astype 0 -stdinc /usr/pgi/linux86/6. 0/include:/usr/local/include:/usr/lib/gcc-lib/i386-redhat-linux/3.2/include:/usr /lib/gcc-lib/i386-redhat-linux/3.2/include:/usr/include -def unix -def __unix -d ef unix -def linux -def __linux -def linux -def inline= -def i386 -d ef __i386 -def i386 -def __NO_MATH_INLINES -def linux86 -def __THROW= -predi cate ‘#machine(i386) #lint(off) #system(unix) #system(posix) #cpu(i386)’ -cmdlin e ‘+pgcc hello.c -v’ -asm /tmp/pgccaaaaaeCsal.s
NOTE: your evaluation license will expire in 14 days, 0.347 hours.
For a permanent license, please read the order acknowledgement
that you received. Connect to https://www.pgroup.com/License with
the username and password in the order acknowledgement.

PGC-I-0222-Redundant definition for symbol __THROW (/usr/include/sys/cdefs.h: 57 )
PGC-I-0222-Redundant definition for symbol __stub___kernel_cosl (/usr/include/gn u/stubs.h: 11)
PGC-I-0222-Redundant definition for symbol __stub___kernel_sinl (/usr/include/gn u/stubs.h: 13)
PGC-I-0222-Redundant definition for symbol __stub___kernel_tanl (/usr/include/gn u/stubs.h: 15)
PGC-I-0222-Redundant definition for symbol __stub_chflags (/usr/include/gnu/stub s.h: 17)
PGC-I-0222-Redundant definition for symbol __stub_fattach (/usr/include/gnu/stub s.h: 19)
PGC-I-0222-Redundant definition for symbol __stub_fchflags (/usr/include/gnu/stu bs.h: 21)
PGC-I-0222-Redundant definition for symbol __stub_fdetach (/usr/include/gnu/stub s.h: 23)
PGC-I-0222-Redundant definition for symbol __stub_futimes (/usr/include/gnu/stub s.h: 25)
PGC-I-0222-Redundant definition for symbol __stub_gtty (/usr/include/gnu/stubs.h : 27)
PGC-I-0222-Redundant definition for symbol __stub_lchmod (/usr/include/gnu/stubs .h: 29)
PGC-I-0222-Redundant definition for symbol __stub_lutimes (/usr/include/gnu/stub s.h: 31)
PGC-I-0222-Redundant definition for symbol __stub_posix_fadvise64 (/usr/include/ gnu/stubs.h: 33)
PGC-I-0222-Redundant definition for symbol __stub_remap_file_pages (/usr/include /gnu/stubs.h: 35)
PGC-I-0222-Redundant definition for symbol __stub_revoke (/usr/include/gnu/stubs .h: 37)
PGC-I-0222-Redundant definition for symbol __stub_setlogin (/usr/include/gnu/stu bs.h: 39)
PGC-I-0222-Redundant definition for symbol __stub_sigreturn (/usr/include/gnu/st ubs.h: 41)
PGC-I-0222-Redundant definition for symbol __stub_sstk (/usr/include/gnu/stubs.h : 43)
PGC-I-0222-Redundant definition for symbol __stub_stty (/usr/include/gnu/stubs.h : 45)
PGC-I-0222-Redundant definition for symbol __need_wint_t (/usr/include/wchar.h: 47)
PGC-I-0222-Redundant definition for symbol __need_wint_t (/usr/include/wchar.h: 47)
PGC/x86 Linux/x86 6.0-4: compilation completed with informational messages

/usr/bin/as /tmp/pgccaaaaaeCsal.s -o /tmp/pgccbaaaaeCsal.o

/usr/bin/ld /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/gcc-lib/i386-redhat-linux/3 .2/crtbegin.o -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /tmp/pgccbaaaaeCsal .o -L/usr/pgi/linux86/6.0/lib -L/usr/lib -L/usr/lib/gcc-lib/i386-redhat-linux/3. 2 -rpath /usr/pgi/linux86/6.0/lib -lc -lnspgc -lpgc -lm -lgcc -lc -lgcc /usr/lib /gcc-lib/i386-redhat-linux/3.2/crtend.o /usr/lib/crtn.o
Unlinking /tmp/pgccaaaaaeCsal.s
Unlinking /tmp/pgccbaaaaeCsal.o

Hi Peter,

These are normal informational messages and your PGI installation is most likely working correctly. Note, you should not need to re-install the compilers since the problem is “libwrfio_nf.a” didn’t get built. Were you able to determine why?

  • Mat

Mat,
I have recompile again ./compile 3dvar and i have got the following errors
,So i think,this might be the reason as to why the libwrfio_nf.a is not be created.
Any ideas?
thanks,
Petero

PGF90-S-0038-Symbol, nf_inq_varid, has not been explicitly declared (wrf_io.f)
PGF90-S-0038-Symbol, nf_inq_vartype, has not been explicitly declared (wrf_io.f)
PGF90-S-0038-Symbol, nf_get_att_int, has not been explicitly declared (wrf_io.f)
0 inform, 0 warnings, 12 severes, 0 fatal for ext_ncd_get_var_info
make[3]: [wrf_io.o] Error 2 (ignored)


PGF90-S-0038-Symbol, nf_put_vara_real, has not been explicitly declared (field_routines.f)
PGF90-S-0038-Symbol, nf_get_vara_real, has not been explicitly declared (field_routines.f)
0 inform, 0 warnings, 2 severes, 0 fatal for ext_ncd_logicalfieldio
make[3]: [field_routines.o] Error 2 (ignored)
/bin/rm -f libwrfio_nf.a
ar cr libwrfio_nf.a wrf_io.o field_routines.o
ar: wrf_io.o: No such file or directory
make[3]: [libwrfio_nf.a] Error 1 (ignored)
make[3]: Leaving directory `/home/3dvar/dat_dir/wrf3dvar/external/io_netcdf

Hi Petero,

These functions are defined in the NetCDF file ‘netcdf.inc’ so the compiler is most likely not finding this file. By default, WRF 3dVar is expecting this file to be located in the ‘$NETCDFPATH/include’ directory. This and the ‘lib’ directory get created when you install NetCDF after its built. Go back to the NetCDF directory and run ‘make install’. You will also need to change the ‘NETCDFPATH’ variable in the ‘/home/3dvar/dat_dir/wrf3dvar/configure.3dvar’ to the location where you just installed.

Note, a less correct but still works way is to go to your NetCDF directory and do the following:

mkdir lib
mkdir include 
cp libsrc/libnetcdf.a. lib
cp fortran/*.inc include
cp f90/*.mod include
cp libsrc/netcdf.h include
cp cxx/ncvalues.h  include
cp cxx/netcdfcpp.h include
cp cxx/netcdf.hh include
cp cxx/libnetcdf_c++.a lib

After NetCDF is installed, go back and run ‘./compile 3dvar’.

  • Mat

Mat,
Thank you for your help.
I have compile the WRF 3DVAR succesfully.The problem was the installation of netcdf,instead of installing the appropriate files,it was installing the directories with same name without include the source code files. So i copy files manually and it works.
thanks,
take care.
petero.