problems installing 0.9.0

Rob Ross rross at mcs.anl.gov
Wed Sep 3 11:48:08 CDT 2003


John,

Please try copying the attached configure.in into the build directory, 
re-running, autoconf, and repeating the script you used below.

Sorry this didn't just work!

Thanks,

Rob

On Wed, 3 Sep 2003, John Tannahill wrote:

> Robert,
> 
> When I execute the following script to install 0.9.0 on NERSC's IBM-SP
> (seaborg) =>
> 
> #
> 
> module load gnu
> 
> setenv CC     xlc
> setenv FC     xlf
> 
> setenv MPICC  mpcc_r
> setenv MPIF77 mpxlf_r
> 
> ./configure --prefix=/usr/common/homes/j/jrt/tb2/parallel-netcdf-0.9.0 \
>              --with-mpi=/usr/lpp/ppe.poe/bin
> 
> 
> I get =>
> 
> loading cache ./config.cache
> checking for top-level source-directory
> /u2/jrt/tb2/parallel-netcdf-0.9.0
> checking for a BSD compatible install... /usr/common/usg/gnu/bin/ginstall -c
> checking for m4 preprocessor
> checking for m4... m4
> checking m4 flags... -B10000
> checking for gcc... xlc
> checking whether the C compiler (xlc -O ) works... yes
> checking whether the C compiler (xlc -O ) is a cross-compiler... no
> checking whether we are using GNU C... no
> checking whether xlc accepts -g... yes
> checking for c++... no
> checking for g++... no
> checking for gcc... no
> checking for CC... no
> checking for cxx... no
> checking for cc++... no
> checking for cl... no
> checking whether the C++ compiler (gcc  ) works... no
> configure: error: installation or configuration problem: C++ compiler cannot 
> create executables.
> 
> John
> 
> -- 
> ============================
> John R. Tannahill
> Lawrence Livermore Nat. Lab.
> P.O. Box 808, M/S L-103
> Livermore, CA  94551
> 925-423-3514
> Fax:  925-423-4908
> ============================
> 
> 
-------------- next part --------------
AC_REVISION($Id: configure.in,v 1.30 2003/08/11 19:12:24 robl Exp $)dnl
dnl -*- Mode: shell-script-mode; -*-
dnl Process this file with GNU autoconf(1) to produce a configure script.
dnl

dnl Defaults:
CPPFLAGS=${CPPFLAGS--DNDEBUG}
CFLAGS=${CFLAGS--O}
FPPFLAGS=${FPPFLAGS-}
FFLAGS=${FFLAGS-}

AC_INIT(src/lib/ncconfig.in)
UD_SRCDIR
dnl AC_PREFIX_DEFAULT(`(cd ..; pwd)`)

AC_CONFIG_HEADER(src/lib/ncconfig.h:src/lib/ncconfig.in)
AC_CONFIG_AUX_DIR(./scripts)

AC_ARG_ENABLE(fortran,
[--enable-fortran - Turn on support for the Fortran interface.  Turn this
         off if you only need the C interface (on by default)],,enable_fortran=yes)

dnl I took the "-ansi" off the CFLAGS for the strict case, as it was
dnl preventing PATH_MAX from being defined for some of the test files,
dnl and I was having a tough time figuring out how to get it back! -- RobR
AC_ARG_ENABLE(strict,[--enable-strict - Turn on strict debugging with gcc],
CFLAGS="$CFLAGS -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wpointer-arith -Wbad-function-cast")
AC_ARG_ENABLE(echo, 
[--enable-echo  - Turn on strong echoing. The default is enable=no.] ,set -x)

AC_PROG_INSTALL

UD_PROG_M4
AC_PROG_CC
dnl AC_PROG_CXX
dnl AC_PROG_F77
UD_PROG_FC
dnl UD_PROG_CC
UD_PROG_CC_MAKEDEPEND
dnl need a --with-cxx=no and --with-fortran=no
dnl UD_PROG_CXX
dnl UD_PROG_F90
# Checking for Fortran types also determines the Fortran name mangling
# and places the value into FCALLSCSUB as a the C name corresponding
# to the Fortran name SUB 
UD_CHECK_FCALLSCSUB
UD_CHECK_LIB_MATH
UD_PROG_AR()
UD_PROG_NM()
# We could use the PAC check for ranlib (it also makes sure that ranlib works,
# which is not always true, particularly when GNU tools are installed on 
# a system that doesn't have (or need) ranlib
AC_PROG_RANLIB

#
# If we are building the Fortran interface, determine the correct name mapping
case $FCALLSCSUB in 
    SUB)
    AC_DEFINE(F77_NAME_UPPER,,[Define if Fortran names are uppercase])
    ;;
    sub_)
    # This is the hard case.  Gcc uses one _ unless the name includes
    # an underscore, in which case it gets two trailing underscores.
    # Use essentially the same configure code that the original configure
    # used to determine SUB
    AC_MSG_CHECKING(for C-equivalent to Fortran routine \"SUB_A\") 
	    cat >conftest.f <<\EOF
              call sub_a()
              end
EOF
	    doit='$FC -c ${FFLAGS} conftest.f'
	    if AC_TRY_EVAL(doit); then
		FCALLSCSUBA=`$NM $NMFLAGS conftest.o | awk '
		    /SUB_A_/{print "SUB_A_";exit}
		    /SUB_A/ {print "SUB_A"; exit}
                    /sub_a__/ {print "sub_a__"; exit}
		    /sub_a_/{print "sub_a_";exit}
		    /sub_a/ {print "sub_a"; exit}'`
		case "$FCALLSCSUBA" in
		    '') AC_MSG_ERROR(not found)
			;;
		    *)  AC_MSG_RESULT($FCALLSCSUBA)
			;;
		esac
	    else
		AC_MSG_ERROR(Could not compile conftest.f)
	    fi
	    rm -f conftest*
    case "$FCALLSCSUBA" in 
        sub_a__) 
	AC_DEFINE(F77_NAME_LOWER_2USCORE,,[Define if Fortran names are lower case with two trailing underscore2])
	;;
	sub_a_)    
	AC_DEFINE(F77_NAME_LOWER_USCORE,,[Define if Fortran names are lower case with one trailing underscore])
	;;
	*)
        AC_MSG_WARN([Unrecognized Fortran name mapping])
	;;
    esac	    
    ;;
    sub)
    AC_DEFINE(F77_NAME_LOWER,,[Define if Fortran names are lower case])
    ;;
    *)
    AC_MSG_WARN([Unrecognized Fortran name mapping])
    ;;
esac

dnl do the automagic mpi-compiler-checking if MPICC and MPIF77 are not set
if test x${MPICC} = x -a x${MPIF77} = x ; then
	MPICC=$CC
	AC_MSG_CHECKING(mpi implementation)
	AC_ARG_WITH(mpi, 
	[  --with-mpi=/path/to/implementation
				  installation prefix for mpi implementation],
		if test x$withval = xyes; then
			AC_MSG_ERROR(--with-mpi must be given a pathname)
		else
			AC_MSG_RESULT(using $withval)
			MPICC=${withval}/bin/mpicc
			if test ! -x "${MPICC}"; then
				AC_MSG_WARN($MPICC either does not exist or is not executable: falling back to $CC)
				MPICC="$CC"
			fi
			MPIF77=${withval}/bin/mpif77
			if test ! -x "${MPIF77}"; then
				AC_MSG_WARN($MPIF77 either does not exist or is not executable: falling back to $FC)
				MPIF77="$FC"
			fi

		fi
	)
fi


AC_MSG_CHECKING(MPI-IO support in MPI implementation)
saveCC="$CC"
CC=$MPICC
AC_TRY_COMPILE([#include "mpi.h"], [int a = MPI_MODE_RDWR],
	AC_MSG_RESULT(yes),
	AC_MSG_ERROR([mpi implementation does not support MPI-IO])
)
CC="$saveCC"
AC_SUBST(MPICC)
AC_SUBST(MPIF77)

AC_CHECK_HEADER(stdlib.h, ,AC_DEFINE(NO_STDLIB_H))
AC_CHECK_HEADER(sys/types.h, ,AC_DEFINE(NO_SYS_TYPES_H))
AC_CHECK_FUNC(strerror, ,AC_DEFINE(NO_STRERROR))
UD_CHECK_FTRUNCATE
AC_FUNC_ALLOCA
AC_STRUCT_ST_BLKSIZE
UD_CHECK_IEEE
AC_TYPE_SIZE_T

dnl Check that sizeof(size_t) == sizeof(int); bail otherwise.
dnl
dnl This is important because we do some casting in the Fortran
dnl bindings based on this assumption. (Needed only for Fortran)
if test "$enable_fortran" = "yes" ; then
    AC_MSG_CHECKING(whether size_t and int size match)
    AC_TRY_RUN([
	#include <stdio.h>
	
	int main(void)
	{
		if (sizeof(size_t) == sizeof(int)) return 0; /* true */
		else return 1; /* false */
	}
],pac_cv_size_t_within_int=yes,
pac_cv_size_t_within_int=no)
    AC_MSG_RESULT($pac_cv_size_t_within_int)
    if test "$pac_cv_size_t_within_int" != yes ; then
        AC_DEFINE(HAVE_SIZET_LARGER_THAN_INT,1,[Define if sizet is larger than int])
    fi
fi

AC_TYPE_OFF_T
AC_CHECK_TYPE(ssize_t, int)
AC_CHECK_TYPE(ptrdiff_t, int)
AC_CHECK_TYPE(uchar, unsigned char)
AC_C_CHAR_UNSIGNED
AC_C_BIGENDIAN
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(float)
AC_CHECK_SIZEOF(double)
UD_CHECK_SIZEOF(off_t)
UD_CHECK_SIZEOF(size_t)
UD_FORTRAN_TYPES
UD_MAKEWHATIS
UD_FTPBINDIR

chmod u+x ${srcdir}/scripts/install-sh

AC_OUTPUT(macros.make Makefile src/Makefile test/Makefile src/lib/Makefile src/libf/Makefile  test/common/Makefile test/test_double/Makefile test/test_double_int/Makefile test/test_float/Makefile test/test_int/Makefile test/nc_test/Makefile test/nf_test/Makefile test/fandc/Makefile)


More information about the parallel-netcdf mailing list