Hi, I've found in the past bugs in software are often found on one platform that don't seem to get noticed on another. For this reason I just tried to build gcc-2.0 on an old Sun SPARCstation 20 running SunOs 4.1.4 (ie hardware/software about 10 years old) to test some software.
gcc-2.0 needed bison, so I built bison-1.25 (1996 era) first, using Sun's C compiler. That used a 'configure' script and was quick, fast and built without any hassle. Then I tried gcc-2.0 again. While the configure script was less intelligent than those built with newer versions of autoconf (i.e. needed to specify the host), it worked with no hassle. However, trying to run configure scripts built with autoconf today on this older software results in failure. The first thing one notices is that there is a long delay (a minute or so) before a single line of output appears from a relatively small configure script. This is not just due to the age of the computer. Then there are a list of tmp files it can't find. Finally the configure script says gcc can't create executables (it did incidentally say the same about Sun's C compiler, despite the fact I used Sun's compiler to build gcc-2.0). Given I thought the aim of autoconf/automake was to allow easy configuration of software, does one not think supporting older hardware useful? I'd certainly like to be able to configure my software so it runs on new and old hardware, if that is possible. One thing that is clear is that version 2.0 of gcc will not accept the --version option, but does accept -v to print the version number: crow# /usr/local/bin/gcc -v Reading specs from /usr/local/lib/gcc/sun4/2.0/specs gcc version 2.0 This seems to throw the configure script. I note that the newer gcc-3.2 I normally use on my newer Sun does take the -v option, but gives a bit different information to the --version one. However both methods print the version number. Anyway, here is the output from 'configure'. Below that is the config.log and finally at the end is the configure.in. A row of ******'s sepparates the 3 sets of information. Do others think I'm totally mad and we should just ignore older software/hardware? crow# configure CC=/usr/local/bin/gcc configure: /tmp/sh54215: No such file or directory configure: /tmp/sh54216: No such file or directory configure: /tmp/sh54217: No such file or directory configure: /tmp/sh54218: No such file or directory configure: /tmp/sh54219: No such file or directory configure: /tmp/sh542110: No such file or directory configure: /tmp/sh542111: No such file or directory configure: /tmp/sh542112: No such file or directory configure: loading cache /dev/null checking for a BSD-compatible install... /bin/install -c checking whether build environment is sane... yes configure: /tmp/sh542113: No such file or directory sed: conftest.sed: No such file or directory rm: conftest.sed: No such file or directory checking for gawk... no checking for mawk... no checking for nawk... nawk checking whether make sets ${MAKE}... configure: /tmp/sh542114: No such file or directory no checking for gcc... /usr/local/bin/gcc configure: /tmp/sh542115: No such file or directory checking for C compiler default output... configure: error: C compiler cannot create executables ************************************************************* The config.log is shown below. crow# more config.log PATH: /bin PATH: /usr/bin PATH: /usr/ucb PATH: /etc PATH: /usr/etc PATH: . configure:1138: loading cache /dev/null configure:1271: checking for a BSD-compatible install configure:1325: result: /bin/install -c configure:1336: checking whether build environment is sane configure:1379: result: yes configure:1412: checking for gawk configure:1441: result: no configure:1412: checking for mawk configure:1441: result: no configure:1412: checking for nawk configure:1428: found /bin/nawk configure:1438: result: nawk configure:1448: checking whether make sets ${MAKE} configure:1472: result: no configure:1651: checking for gcc configure:1677: result: /usr/local/bin/gcc configure:1921: checking for C compiler version configure:1924: /usr/local/bin/gcc --version </dev/null >&5 /usr/local/bin/gcc: unrecognized option `--version' /usr/local/bin/gcc: No input files specified. configure:1927: $? = 1 configure:1929: /usr/local/bin/gcc -v </dev/null >&5 Reading specs from /usr/local/lib/gcc/sun4/2.0/specs gcc version 2.0 configure:1932: $? = 0 configure:1934: /usr/local/bin/gcc -V </dev/null >&5 /usr/local/bin/gcc: argument to `-V' is missing configure:1937: $? = 1 configure:1963: checking for C compiler default output configure:1966: /usr/local/bin/gcc conftest.c >&5 ld: Undefined symbol _main configure:1969: $? = 1 configure: failed program was: configure:1996: error: C compiler cannot create executables ## ---------------- ## ## Cache variables. ## ## ---------------- ## ac_cv_env_CC_set='set' ac_cv_env_CC_value='/usr/local/bin/gcc' ac_cv_env_CFLAGS_set='' ac_cv_env_CFLAGS_value='' ac_cv_env_CPPFLAGS_set='' ac_cv_env_CPPFLAGS_value='' ac_cv_env_CPP_set='' ac_cv_env_CPP_value='' ac_cv_env_CXXCPP_set='' ac_cv_env_CXXCPP_value='' ac_cv_env_CXXFLAGS_set='' ac_cv_env_CXXFLAGS_value='' ac_cv_env_CXX_set='' ac_cv_env_CXX_value='' 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_path_install='/bin/install -c' ac_cv_prog_AWK='nawk' ac_cv_prog_ac_ct_CC='/usr/local/bin/gcc' ac_cv_prog_make_make_set='no' ## ----------- ## ## confdefs.h. ## ## ----------- ## configure: exit 77 *********************************************************** more configure.in dnl Process this file with autoconf to produce a configure script. dnl Order of itmes is suggested in the autoconf documentation to be that dnl below, to be as below. Let's try to stick to it. dnl AC_INIT(file) dnl checks for programs dnl checks for libraries dnl checks for header files dnl checks for typedefs dnl checks for structures dnl checks for compiler characteristics dnl checks for library functions dnl checks for system services dnl AC_OUTPUT([file...]) AC_INIT(atlc, 5.0.0, [EMAIL PROTECTED]) AM_INIT_AUTOMAKE(atlc, 5.0.0, [EMAIL PROTECTED]) dnl Checks for programs. AC_PROG_CC AC_PROG_CXX AC_PROG_CXXCPP AC_PROG_RANLIB AC_ISC_POSIX dnl AC_OUTPUT_COMMANDS([exit]) dnl Checks for libraries. AC_CHECK_LIB(m,main) AC_CHECK_LIB(c,memalign, AC_DEFINE(HAVE_MEMALIGN)) dnl check for optimised math library on SPARC dnl AC_CHECK_LIB(mopt,main) dnl check for the optimised dnl AC_CHECK_LIB(copt,main) gsl_libgsl=1 gsl_libcblas=1 AC_CHECK_LIB(gslcblas,cblas_scasum,,gsl_libcblas=0) AC_CHECK_LIB(gsl,main,,gsl_libgsl=0) dnl Checks for header files. dnl AC_STDC_HEADERS AC_HAVE_HEADERS(stdio.h math.h errno.h stdlib.h string.h thread.h pthread.h pthreads.h mpi.h) gsl_ellint=1 gsl_bessel=1 AC_HAVE_HEADERS(gsl/gsl_sf_ellint.h,,gsl_ellint=0) AC_HAVE_HEADERS(gsl/gsl_sf_bessel.h,,gsl_bessel=0) dnl checks for typedefs (none need to be tested) dnl checks for structures (none need to be tested) dnl checks for compiler characteristics AC_C_BIGENDIAN AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(size_t) dnl checks for system services dnl Check if the user wants a GUI. If so makes sure GTK and wxWindows are around. dnl The macro is in the file gtk.m4, so it must be read it here. sinclude(gtk.m4) AC_ARG_WITH(gui, AC_HELP_STRING([--with-gui=[no]],[Add a GUI (needs GTK >= 1.2.7 installed) but the GUI does not work!! ])) if test "x$with_gui" = "xyes"; then AC_PATH_GTK(1.2.7, GTK127=1) if test "$GTK127" != 1; then AC_MSG_ERROR([ Please check that gtk-config is in path, the directory where GTK+ libraries are installed (returned by 'gtk-config --libs' command) is in LD_LIBRARY_PATH or equivalent variable and GTK+ is version 1.2.7 or above. ]) fi AC_CHECK_PROG(WXWINDOWS,wx-config, 1, 0) if test "$WXWINDOWS" != 1; then AC_MSG_ERROR([ wxWindows must be installed to use the GUI version of atlc ]) fi AC_SUBST(EXTRA_WXWINDOWS_LIBS,`wx-config --libs`) AC_SUBST(EXTRA_WXWINDOWS_CFLAGS,`wx-config --cflags`) AC_SUBST(GUI_DIRECTORY,gui) fi dnl Multi-Processor Support AC_ARG_WITH(threads, AC_HELP_STRING([--with-threads=[no]],[support multiple processors (needs pthreads or similar installed)])) if test "x$with_threads" = "xyes"; then AC_DEFINE(ENABLE_MP) AC_DEFINE(_REENTRANT) AC_DEFINE(_THREAD_SAFE) AC_CHECK_LIB(thread, pthread_create) AC_CHECK_LIB(pthread, pthread_create) dnl thr_setconcurrency is only needed on Solaris as far as I know. AC_CHECK_LIB(thread, thr_setconcurrency, [AC_DEFINE(HAVE_THR_SETCONCURRENCY)]) fi dnl MPI and MPE Support AC_ARG_WITH(mpi, AC_HELP_STRING([--with-mpi=[mpi_install_prefix]],[support MPI-based parallel computation (needs MPICH installed)])) AC_ARG_WITH(mpe, AC_HELP_STRING([--with-mpe=[mpi_install_prefix]],[implies --with-mpi and additionally links in MPE logging support])) if test "x$with_mpi" != "x" \ || test "x$with_mpe" != "x"; then if test "x$with_mp" = "xyes"; then AC_MSG_ERROR([it does not make sense to use --with-mp with --with-mpi or --with-mpe]) fi AC_DEFINE(ENABLE_MPI) AC_CHECK_LIB(socket, getsockopt) AC_CHECK_LIB(nsl, xdr_void) AC_CHECK_LIB(rt, sched_yield) if test "x$with_mpe" != "x"; then if test "x$with_mpe" = "xyes"; then path_to_mpe=/usr/local else path_to_mpe=$with_mpe fi CFLAGS="$CFLAGS -I$path_to_mpe/include -L$path_to_mpe/lib" AC_CHECK_LIB(pmpich, MPI_Init , , [AC_MSG_ERROR([Could not link test program with libpmpich.a])]) AC_CHECK_LIB(mpe, MPE_Init_log , , [AC_MSG_ERROR([Could not link test program with libmpe.a])]) AC_CHECK_LIB(lmpe, MPE_Init_log , ,[AC_MSG_ERROR([Could not link test program with liblmpe.a])] , -lmpe) else if test "x$with_mpi" = "xyes"; then path_to_mpi=/usr/local else path_to_mpi=$with_mpi fi CFLAGS="$CFLAGS -I$path_to_mpi/include -L$path_to_mpi/lib" AC_CHECK_LIB(mpich, MPI_Init, , [AC_MSG_ERROR([Could not link test program with libmpich.a])]) fi fi dnl Check for a functioning gsl installation. if test $gsl_ellint = 1 && test $gsl_bessel = 1 && test $gsl_libcblas = 1 && test $gsl_libgsl = 1; then AC_DEFINE(HAVE_GSL) elif test $gsl_ellint = 0 || test $gsl_bessel = 0 || test $gsl_libcblas = 0 || test $gsl_libgsl = 0; then AC_MSG_WARN([To get full functionality you should install the GNU scientific library (gsl) available at http://sources.redhat.com/gsl. Without gsl it will be impossible to evaluate the theoretical impedance of a coupler using \"design_coupler\" or of a stripline using \"usage_create_bmp_for_symmetrical_stripline\". Some self tests will fail too. However, much of the atlc package will work without gsl.]) else dnl some libraries/headers exist, but not all of them. AC_MSG_WARN([Some of the gsl headers and libraries were found, but others were not. Since the installation appears to be broken, the use of gsl will be disabled. Without gsl, it will be impossible to evaluate the theoretical impedance of a coupler using \"design_coupler\" or of a stripline using \"usage_create_bmp_for_symmetrical_stripline\". Some self tests will fail too. However, much of the atlc package will work without gsl.]) fi AC_OUTPUT([\ Makefile \ src/Makefile \ src/non_gui/Makefile \ src/gui/Makefile \ man/Makefile \ man/man1/Makefile \ examples/Makefile \ tools/Makefile \ tools/src/Makefile \ tests/Makefile \ docs/html-docs/Makefile \ docs/html-docs/jpgs/Makefile \ docs/qex-december-1996/Makefile \ docs/theory/Makefile \ docs/Makefile ]) -- Dr. David Kirkby, Senior Research Fellow, Department of Medical Physics, University College London, 11-20 Capper St, London, WC1E 6JA. Tel: 020 7679 6408 Fax: 020 7679 6269 Internal telephone: ext 46408 e-mail [EMAIL PROTECTED]