[netcdfgroup] Problem compiling NetCDF with PGI compiler

Dear NetCDF group,

I have been struggling with installing NetCDF with my PGI compiler for
some time now. I have set all the appropriate environmental variables in
the configure command as follows: "CC=gcc CFLAGS="-O3 -march=k8 -m64
-msse2 -mcmodel=medium" FC=pgf90 F90=pgf90 FFLAGS="-fastsse -tp k8-64"
CXX=pgCC CPPFLAGS="-DNDEBUG -DpgiFortran"
SRCDIR=/home/zcakf89/netcdf/netcdf-4.0.1/src ./configure
-prefix=/home/zcakf89/netcdf/netcdf-4.0.1/ -exec_prefix=$(prefix)
INCDIR=$(exec_prefix)/include LIBDIR=$(exec_prefix)/lib
BINDIR=$(exec_prefix)/bin". In addition, I have the environment variables
MANPATH and MANDIR set, in my .bashrc file, to a subdirectory within my
main NetCDF directory.

I have gone through the configure and make stages without a problem but
the compilation process crashes midway through the make install stage.
Here is the error that I get:

"...
Making install in f90
make[1]: Entering directory `/shared/home/zcakf89/netcdf/netcdf-4.0.1/f90'
make  install-am
make[2]: Entering directory `/shared/home/zcakf89/netcdf/netcdf-4.0.1/f90'
make[3]: Entering directory `/shared/home/zcakf89/netcdf/netcdf-4.0.1/f90'
make[3]: Nothing to be done for `install-exec-am'.
test -z "/home/zcakf89/netcdf/netcdf-4.0.1/share/man/man3" || /bin/mkdir
-p "/home/zcakf89/netcdf/netcdf-4.0.1/share/man/man3"
 /usr/bin/install -c -m 644 './netcdf_f90.3'
'/home/zcakf89/netcdf/netcdf-4.0.1/share/man/man3/netcdf_f90.3'
test -z "/home/zcakf89/netcdf/netcdf-4.0.1/include" || /bin/mkdir -p
"/home/zcakf89/netcdf/netcdf-4.0.1/include"
 /usr/bin/install -c -m 644 'typesizes.mod'
'/home/zcakf89/netcdf/netcdf-4.0.1/include/typesizes.mod'
 /usr/bin/install -c -m 644 'netcdf.mod'
'/home/zcakf89/netcdf/netcdf-4.0.1/include/netcdf.mod'
make[3]: Leaving directory `/shared/home/zcakf89/netcdf/netcdf-4.0.1/f90'
make[2]: Leaving directory `/shared/home/zcakf89/netcdf/netcdf-4.0.1/f90'
make[1]: Leaving directory `/shared/home/zcakf89/netcdf/netcdf-4.0.1/f90'
Making install in fortran
make[1]: Entering directory
`/shared/home/zcakf89/netcdf/netcdf-4.0.1/fortran'
make  install-am
make[2]: Entering directory
`/shared/home/zcakf89/netcdf/netcdf-4.0.1/fortran'
make[3]: Entering directory
`/shared/home/zcakf89/netcdf/netcdf-4.0.1/fortran'
test -z "/lib" || /bin/mkdir -p "/lib"
test -z "/home/zcakf89/netcdf/netcdf-4.0.1/share/man/man3" || /bin/mkdir
-p "/home/zcakf89/netcdf/netcdf-4.0.1/share/man/man3"
 /usr/bin/install -c -m 644 './netcdf_f77.3'
'/home/zcakf89/netcdf/netcdf-4.0.1/share/man/man3/netcdf_f77.3'
test -z "/home/zcakf89/netcdf/netcdf-4.0.1/include" || /bin/mkdir -p
"/home/zcakf89/netcdf/netcdf-4.0.1/include"
 /usr/bin/install -c -m 644 'netcdf.inc'
'/home/zcakf89/netcdf/netcdf-4.0.1/include/netcdf.inc'
make[3]: Leaving directory `/shared/home/zcakf89/netcdf/netcdf-4.0.1/fortran'
make[2]: Leaving directory `/shared/home/zcakf89/netcdf/netcdf-4.0.1/fortran'
make[1]: Leaving directory `/shared/home/zcakf89/netcdf/netcdf-4.0.1/fortran'
Making install in libsrc
make[1]: Entering directory `/shared/home/zcakf89/netcdf/netcdf-4.0.1/libsrc'
make[2]: Entering directory `/shared/home/zcakf89/netcdf/netcdf-4.0.1/libsrc'
test -z "/lib" || /bin/mkdir -p "/lib"
 /bin/sh ../libtool   --mode=install /usr/bin/install -c  'libnetcdf.la'
'/lib/libnetcdf.la'
libtool: install: /usr/bin/install -c .libs/libnetcdf.lai /lib/libnetcdf.la
/usr/bin/install: cannot create regular file `/lib/libnetcdf.la':
Permission denied
make[2]: *** [install-libLTLIBRARIES] Error 1
make[2]: Leaving directory `/shared/home/zcakf89/netcdf/netcdf-4.0.1/libsrc'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/shared/home/zcakf89/netcdf/netcdf-4.0.1/libsrc'
make: *** [install-recursive] Error 1"

I have searched for this error message in the archives and the advice
given was to include the "-prefix=[path direction]" option. But I already
have the prefix option set so I'm not sure what else might be missing. Are
there any other environment variables I need to set in my configure
command or .bashrc script? Any input that anyone can offer will be
immensely appreciated as my system support staff is backed up and cannot
get back to me until late next week.

Thanks so much in advance!

All the best,
Max Schneider
Department of Statistical Science, University College London
max@xxxxxxxxxxxxxxx
+447909180979



  • 2009 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: