[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20030308: using g++ 3.2 to build netCDF (cont.)
- Subject: 20030308: using g++ 3.2 to build netCDF (cont.)
- Date: Wed, 12 Mar 2003 13:21:48 -0700
>From: Mike Dixon <address@hidden>
>Organization: NCAR/RAP
>Keywords: 200303051637.h25GbC315003 netCDF g++ 3.2
Mike,
Once again I have to apologize for the tardiness of this reply.
>Thanks for getting back to me. Attached is the configure log.
I just checked through the online netCDF support archives:
http://www.unidata.ucar.edu/glimpsedocs/ghnetcdf.html
and found (using g++ as the search key) the following snippit from
another user about using g++ 3.5.1:
http://www.unidata.ucar.edu/glimpsedocs/ghnetcdf.html
> From: Hein Zelle <address@hidden>
> I had to modify the configure script to accept and detect my g++
> compiler: it found an error trying to compile the test program. In the
> test program
>
> #line 1230 "configure"
> #include "confdefs.h"
> //#ifdef __cplusplus
> //extern "C" void exit(int);
> //#endif
>
> #include <iostream.h>
> int main() {
> cout << "";
> return 0;
> }
>
> I had to comment out the line "extern "C" void exit(int);", because
> g++ was complaining about a different kind of exception being thrown
> by in the declaration and implementation of exit(). Without that line
> it worked fine, but it may be better to actually fix the code. Why is
> that line included anyway?
Russ Rew commented:
Good question. It's unfortunately generated automatically by the old
version of autoconf we used to generate the configure script from a
"configure.in" file. Before releasing this version, I would like to
update it to use the current autoconf/automake/libtool packages, so we
don't have problems like this.
So, it looks like you were correct in your comment that 'configure'
should be modified to correctly test g++ 3.2.2. Until we do that, you
will need to do the same sort of thing that Hein Zelle did:
comment out the line "extern "C" void exit(int);"
Tom
-- config.log --
>--------------------------------------------------------------
>
>This file contains any messages produced by compilers while
>running configure, to aid debugging if configure makes a mistake.
>
>configure:928: checking for top-level source-directory
>configure:938: checking for m4 preprocessor
>configure:945: checking for m4
>configure:1012: checking m4 flags
>configure:1085: checking C compiler "/usr/local/gcc-3.2.2/bin/gcc"
>configure:1094: /usr/local/gcc-3.2.2/bin/gcc -c -O -DNDEBUG conftest.c 1>&5
>configure:1121: checking how to make dependencies
>configure:1189: checking for /usr/local/gcc-3.2.2/bin/g++
>configure:1225: checking C++ compiler "/usr/local/gcc-3.2.2/bin/g++"
>configure:1243: /usr/local/gcc-3.2.2/bin/g++ -o conftest -DNDEBUG conftest.C
> 1>&5
>configure: failed program was:
>#line 1230 "configure"
>#include "confdefs.h"
>#ifdef __cplusplus
>//extern "C" void exit(int);
>#endif
>
> #include <iostream>
> int main() {
> std::cout << "";
> return 0;
> }
>
>configure:1294: checking how to run the C preprocessor
>configure:1475: checking for f77
>configure:1516: f77 -c conftest.f
>configure:1548: checking for Fortran .F compiler
>configure:1558: checking if Fortran-77 compiler handles *.F files
>configure:1569: f77 -o conftest conftest.F
>configure:1638: checking "f77" as Fortran-90 compiler
>configure:1640: f77 -o conftest conftest.f90
>/usr/bin/ld:conftest.f90: file format not recognized; treating as linker scrip
> t
>/usr/bin/ld:conftest.f90:1: parse error
>collect2: ld returned 1 exit status
>configure:1669: checking for xlf90
>configure:1669: checking for f90
>configure:1740: checking for nm utility
>configure:1747: checking for nm
>configure:1814: checking nm flags
>configure:1830: checking for C-equivalent to Fortran routine "SUB"
>configure:1836: f77 -c conftest.f
>configure:1865: checking for Fortran "byte"
>configure:1872: f77 -c conftest.f
>configure:1889: checking for Fortran "integer*2"
>configure:1896: f77 -c conftest.f
>configure:1922: checking if Fortran "byte" is C "signed char"
>configure:1931: /usr/local/gcc-3.2.2/bin/gcc -c -DNDEBUG -O conftest.c
>configure:1933: f77 -c conftestf.f
>configure:1935: f77 -o conftest conftestf.o conftest.o
>configure:1937: ./conftest
>configure:1970: checking if Fortran "byte" is C "short"
>configure:1979: /usr/local/gcc-3.2.2/bin/gcc -c -DNDEBUG -O conftest.c
>configure:1981: f77 -c conftestf.f
>configure:1983: f77 -o conftest conftestf.o conftest.o
>configure:1985: ./conftest
>configure:2018: checking if Fortran "byte" is C "int"
>configure:2027: /usr/local/gcc-3.2.2/bin/gcc -c -DNDEBUG -O conftest.c
>configure:2029: f77 -c conftestf.f
>configure:2031: f77 -o conftest conftestf.o conftest.o
>configure:2033: ./conftest
>configure:2066: checking if Fortran "byte" is C "long"
>configure:2075: /usr/local/gcc-3.2.2/bin/gcc -c -DNDEBUG -O conftest.c
>configure:2077: f77 -c conftestf.f
>configure:2079: f77 -o conftest conftestf.o conftest.o
>configure:2081: ./conftest
>configure:2118: checking if Fortran "integer*2" is C "short"
>configure:2127: /usr/local/gcc-3.2.2/bin/gcc -c -DNDEBUG -O conftest.c
>configure:2129: f77 -c conftestf.f
>configure:2131: f77 -o conftest conftestf.o conftest.o
>configure:2133: ./conftest
>configure:2166: checking if Fortran "integer*2" is C "int"
>configure:2175: /usr/local/gcc-3.2.2/bin/gcc -c -DNDEBUG -O conftest.c
>configure:2177: f77 -c conftestf.f
>configure:2179: f77 -o conftest conftestf.o conftest.o
>configure:2181: ./conftest
>configure:2214: checking if Fortran "integer*2" is C "long"
>configure:2223: /usr/local/gcc-3.2.2/bin/gcc -c -DNDEBUG -O conftest.c
>configure:2225: f77 -c conftestf.f
>configure:2227: f77 -o conftest conftestf.o conftest.o
>configure:2229: ./conftest
>configure:2264: checking if Fortran "integer" is C "int"
>configure:2273: /usr/local/gcc-3.2.2/bin/gcc -c -DNDEBUG -O conftest.c
>configure:2275: f77 -c conftestf.f
>configure:2277: f77 -o conftest conftestf.o conftest.o
>configure:2279: ./conftest
>configure:2312: checking if Fortran "real" is C "float"
>configure:2321: /usr/local/gcc-3.2.2/bin/gcc -c -DNDEBUG -O conftest.c
>configure:2323: f77 -c conftestf.f
>configure:2325: f77 -o conftest conftestf.o conftest.o
>configure:2327: ./conftest
>configure:2360: checking if Fortran "doubleprecision" is C "double"
>configure:2369: /usr/local/gcc-3.2.2/bin/gcc -c -DNDEBUG -O conftest.c
>configure:2371: f77 -c conftestf.f
>configure:2373: f77 -o conftest conftestf.o conftest.o
>configure:2375: ./conftest
>configure:2402: checking for Fortran-equivalent to netCDF "byte"
>configure:2409: f77 -c conftest.f
>configure:2424: checking for Fortran-equivalent to netCDF "short"
>configure:2431: f77 -c conftest.f
>configure:2451: checking for math library
>configure:2455: checking for tanh in -lc
>configure:2493: checking for tanh in -lm
>configure:2544: checking for ar utility
>configure:2551: checking for ar
>configure:2618: checking ar flags
>configure:2627: checking for nm utility
>configure:2669: checking for nm
>configure:2701: checking nm flags
>configure:2711: checking for ranlib
>configure:2740: checking for stdlib.h
>configure:2777: checking for sys/types.h
>configure:2813: checking for strerror
>configure:2866: checking for working ftruncate()
>configure:2919: /usr/local/gcc-3.2.2/bin/gcc -o conftest -O -DNDEBUG conftest
> .c 1>&5
>/tmp/cc8WNdlS.o: In function `main':
>/tmp/cc8WNdlS.o(.text+0x1d): the use of `tmpnam' is dangerous, better use `mks
> temp'
>configure:2941: checking for working alloca.h
>configure:2974: checking for alloca
>configure:3173: checking for st_blksize in struct stat
>configure:3208: checking for IEEE floating point format
>configure:3246: /usr/local/gcc-3.2.2/bin/gcc -o conftest -O -DNDEBUG conftest
> .c 1>&5
>configure:3267: checking for ANSI C header files
>configure:3371: checking for size_t
>configure:3404: checking for off_t
>configure:3437: checking for ssize_t
>configure:3470: checking for ptrdiff_t
>configure:3503: checking for uchar
>configure:3536: checking whether char is unsigned
>configure:3599: checking whether byte ordering is bigendian
>configure:3689: checking size of short
>configure:3728: checking size of int
>configure:3767: checking size of long
>configure:3806: checking size of float
>configure:3845: checking size of double
>configure:3884: checking size of off_t
>configure:3927: checking size of size_t
>configure:4051: checking for manual-page index command
>configure:4055: checking binary distribution directory
>
>From address@hidden Fri Mar 14 15:02:34 2003
>Subject: Re: 20030308: using g++ 3.2 to build netCDF (cont.)
Hi Tom
Thanks for the feedback.
Mike