[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20010405: netcdf-3.5.0 on hp-ux 10.20: bad g++ compiler



Michael,

We don't have access to an HP-UX 10 system -- so we can't diagnose the
problem definitively.

It appears from the configure script output in the file "config.log",
however, that your g++ installation is faulty:

    configure:1243: /usr/local/gcc-2.95.3/bin/c++ -o conftest -O3 -g -DNDEBUG  
conftest.C  1>&5
    /usr/ccs/bin/ld: Unsatisfied symbols:
       pthread_once (code)
       pthread_setspecific (code)
       pthread_getspecific (code)
       pthread_keycreate (code)
    collect2: ld returned 1 exit status
    configure: failed program was:
    #line 1230 "configure"
    #include "confdefs.h"
    #ifdef __cplusplus
    extern "C" void exit(int);
    #endif

                                    #include <iostream.h>
                                    int main() {
                                        cout << "";
                                        return 0;
                                    }

We haven't seen this problem with g++ on any other system (and we've
tested several).

I suggest that you diagnose your g++ installation problem by trying to
manuall build the above program.

Regards,
Steve Emmerson   <http://www.unidata.ucar.edu>

> To: address@hidden
> From: Michael Vrencur <address@hidden>
> Subject: netcdf-3.5.0 on hp-ux 10.20
> Organization: NOAA/FSL
> Keywords: 200104051430.f35EUpL19365
>
> I am trying to build netcdf-3.5.0 on hp-ux 10.20 with a gcc compiler and
> configure seems to fail on the c++ test. Are there any other CXX flags
> that you would suggest trying?
> 
> Thanks for the help,
> 
> mpv
> 
> A)
> 
> HP-UX mystic B.10.20 A 9000/715 2012985569 two-user license
> 
> B)  ---------------->>
> 
> 3.5.0
> 
> C) ---------------->>
> 
> /usr/local/gcc-2.95.3/bin/gcc
> /usr/local/gcc-2.95.3/bin/c++
> /opt/fortran/bin/fort77
> /opt/fortran90/bin/f90
> 
> D) ---------------->>
> # more configure.log
> creating cache ./config.cache
> checking for top-level source-directory
> /scratch/vrencur/netcdf-3.5.0/src
> checking for m4 preprocessor
> checking for m4... m4
> checking m4 flags... -B10000
> checking C compiler "/usr/local/gcc-2.95.3/bin/gcc"... works
> checking how to make dependencies... false
> checking for /usr/local/gcc-2.95.3/bin/c++...
> /usr/local/gcc-2.95.3/bin/c++
> checking C++ compiler "/usr/local/gcc-2.95.3/bin/c++"... configure:
> warning: /us
> r/local/gcc-2.95.3/bin/c++ failed on test program
> configure: warning: Could not find working C++ compiler
> configure: warning: Setting CXX to the empty string
> configure: warning: The C++ interface will not be built
> checking how to run the C preprocessor... /usr/local/gcc-2.95.3/bin/gcc
> -E
> checking user-defined Fortran-77 compiler "/opt/fortran90/bin/f90"...
> works
> checking for Fortran .F compiler...
> checking if Fortran-77 compiler handles *.F files... yes
> checking user-defined Fortran-90 compiler "/opt/fortran90/bin/f90"...
> works
> checking for nm utility
> checking for nm... nm
> checking nm flags...
> checking for C-equivalent to Fortran routine "SUB"... sub
> checking for Fortran "byte"... yes
> checking for Fortran "integer*2"... yes
> checking if Fortran "byte" is C "signed char"... yes
> checking if Fortran "byte" is C "short"... no
> checking if Fortran "byte" is C "int"... no
> checking if Fortran "byte" is C "long"... no
> checking if Fortran "integer*2" is C "short"... yes
> checking if Fortran "integer*2" is C "int"... no
> checking if Fortran "integer*2" is C "long"... no
> checking if Fortran "integer" is C "int"... yes
> checking if Fortran "real" is C "float"... yes
> checking if Fortran "doubleprecision" is C "double"... yes
> checking for Fortran-equivalent to netCDF "byte"... byte
> checking for Fortran-equivalent to netCDF "short"... integer*2
> checking for math library
> checking for tanh in -lc... no
> checking for tanh in -lm... yes
> checking for ar utility
> checking for ar... ar
> checking ar flags... cru
> checking for nm utility
> checking for nm... (cached) nm
> checking nm flags...
> checking for ranlib... ranlib
> checking for stdlib.h... yes
> checking for sys/types.h... yes
> checking for strerror... yes
> checking for working ftruncate()... yes
> checking for working alloca.h... yes
> checking for alloca... yes
> checking for st_blksize in struct stat... yes
> checking for IEEE floating point format... yes
> checking for ANSI C header files... yes
> checking for size_t... yes
> checking for off_t... yes
> checking for ssize_t... yes
> checking for ptrdiff_t... yes
> checking for uchar... no
> checking whether char is unsigned... no
> checking whether byte ordering is bigendian... yes
> checking size of short... 2
> checking size of int... 4
> checking size of long... 4
> checking size of float... 4
> checking size of double... 8
> checking size of off_t... 4
> checking size of size_t... 4
> checking for manual-page index command...
> checking binary distribution directory...
> /home/ftp/pub/binary/dummy_system
> updating cache ./config.cache
> creating ./config.status
> creating macros.make
> udcreating fortran/nfconfig.inc
> creating libsrc/ncconfig.h
> 
> E) --------------->>
> # more 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-2.95.3/bin/gcc"
> configure:1094: /usr/local/gcc-2.95.3/bin/gcc -c -O3 -g -DNDEBUG
> conftest.c 1>&5
> configure:1121: checking how to make dependencies
> configure:1189: checking for /usr/local/gcc-2.95.3/bin/c++
> configure:1225: checking C++ compiler "/usr/local/gcc-2.95.3/bin/c++"
> configure:1243: /usr/local/gcc-2.95.3/bin/c++ -o conftest -O3 -g
> -DNDEBUG  conft
> est.C  1>&5
> /usr/ccs/bin/ld: Unsatisfied symbols:
>    pthread_once (code)
>    pthread_setspecific (code)
>    pthread_getspecific (code)
>    pthread_keycreate (code)
> collect2: ld returned 1 exit status
> configure: failed program was:
> #line 1230 "configure"
> #include "confdefs.h"
> #ifdef __cplusplus
> extern "C" void exit(int);
> #endif
> 
>                                 #include <iostream.h>
>                                 int main() {
>                                     cout << "";
>                                     return 0;
>                                 }
> 
> configure:1294: checking how to run the C preprocessor
> configure:1315: /usr/local/gcc-2.95.3/bin/gcc -E -DNDEBUG conftest.c
> >/dev/null
> 2>conftest.out
> configure:1383: checking user-defined Fortran-77 compiler
> "/opt/fortran90/bin/f9
> 0"
> configure:1389: /opt/fortran90/bin/f90 -c  conftest.f
> conftest.f
>    main program
> 
> 2 Lines Compiled
> configure:1548: checking for Fortran .F compiler
> configure:1558: checking if Fortran-77 compiler handles *.F files
> configure:1569: /opt/fortran90/bin/f90 -o conftest  conftest.F -lU77
> /var/tmp/fcpAAAa21751.F
>    main program
> 
> 8 Lines Compiled
> configure:1608: checking user-defined Fortran-90 compiler
> "/opt/fortran90/bin/f9
> 0"
> configure:1615: /opt/fortran90/bin/f90 -c  conftest.f90
> conftest.f90
>    external subroutine FOO
> 
> 3 Lines Compiled
> configure:1751: checking for nm utility
> configure:1758: checking for nm
> configure:1825: checking nm flags
> configure:1841: checking for C-equivalent to Fortran routine "SUB"
> configure:1847: /opt/fortran90/bin/f90 -c  conftest.f
> conftest.f
>    main program
> 
> 2 Lines Compiled
> configure:1876: checking for Fortran "byte"
configure:1883: /opt/fortran90/bin/f90 -c  conftest.f
> conftest.f
>    external subroutine SUB
> 
> 3 Lines Compiled
> configure:1900: checking for Fortran "integer*2"
> configure:1907: /opt/fortran90/bin/f90 -c  conftest.f
> conftest.f
>    external subroutine SUB
> 
> 3 Lines Compiled
> configure:1933: checking if Fortran "byte" is C "signed char"
> configure:1942: /usr/local/gcc-2.95.3/bin/gcc -c -DNDEBUG -O3 -g
> conftest.c
> configure:1944: /opt/fortran90/bin/f90  -c conftestf.f
> conftestf.f
>    main program
> 
> 4 Lines Compiled
> configure:1946: /opt/fortran90/bin/f90 -o conftest   conftestf.o
> conftest.o
> configure:1948: ./conftest
> configure:1981: checking if Fortran "byte" is C "short"
> configure:1990: /usr/local/gcc-2.95.3/bin/gcc -c -DNDEBUG -O3 -g
> conftest.c
> configure:1992: /opt/fortran90/bin/f90  -c conftestf.f
> conftestf.f
>    main program
> 
> 4 Lines Compiled
> configure:1994: /opt/fortran90/bin/f90 -o conftest   conftestf.o
> conftest.o
> configure:1996: ./conftest
> configure:2029: checking if Fortran "byte" is C "int"
> configure:2038: /usr/local/gcc-2.95.3/bin/gcc -c -DNDEBUG -O3 -g
> conftest.c
> configure:2040: /opt/fortran90/bin/f90  -c conftestf.f
> conftestf.f
>    main program
> 
> 4 Lines Compiled
> configure:2042: /opt/fortran90/bin/f90 -o conftest   conftestf.o
> conftest.o
> configure:2044: ./conftest
> configure:2077: checking if Fortran "byte" is C "long"
> configure:2086: /usr/local/gcc-2.95.3/bin/gcc -c -DNDEBUG -O3 -g
> conftest.c
> configure:2088: /opt/fortran90/bin/f90  -c conftestf.f
> conftestf.f
>    main program
> 
> 4 Lines Compiled
> configure:2090: /opt/fortran90/bin/f90 -o conftest   conftestf.o
> conftest.o
> configure:2092: ./conftest
> configure:2129: checking if Fortran "integer*2" is C "short"
> configure:2138: /usr/local/gcc-2.95.3/bin/gcc -c -DNDEBUG -O3 -g
> conftest.c
> configure:2140: /opt/fortran90/bin/f90  -c conftestf.f
> conftestf.f
>    main program
> 
> 4 Lines Compiled
> configure:2142: /opt/fortran90/bin/f90 -o conftest   conftestf.o
> conftest.o
> configure:2144: ./conftest
> configure:2177: checking if Fortran "integer*2" is C "int"
> configure:2186: /usr/local/gcc-2.95.3/bin/gcc -c -DNDEBUG -O3 -g
> conftest.c
> configure:2188: /opt/fortran90/bin/f90  -c conftestf.f
> conftestf.f
>    main program
> 
> 4 Lines Compiled
> configure:2190: /opt/fortran90/bin/f90 -o conftest   conftestf.o
> conftest.o
> configure:2192: ./conftest
> configure:2225: checking if Fortran "integer*2" is C "long"
> configure:2234: /usr/local/gcc-2.95.3/bin/gcc -c -DNDEBUG -O3 -g
> conftest.c
> configure:2236: /opt/fortran90/bin/f90  -c conftestf.f
> conftestf.f
>    main program
> 
> 4 Lines Compiled
> configure:2238: /opt/fortran90/bin/f90 -o conftest   conftestf.o
> conftest.o
> configure:2240: ./conftest
> configure:2275: checking if Fortran "integer" is C "int"
> configure:2284: /usr/local/gcc-2.95.3/bin/gcc -c -DNDEBUG -O3 -g
> conftest.c
> configure:2286: /opt/fortran90/bin/f90  -c conftestf.f
> conftestf.f
>    main program
> 
> 4 Lines Compiled
> configure:2288: /opt/fortran90/bin/f90 -o conftest   conftestf.o
> conftest.o
> configure:2290: ./conftest
> configure:2323: checking if Fortran "real" is C "float"
> configure:2332: /usr/local/gcc-2.95.3/bin/gcc -c -DNDEBUG -O3 -g
> conftest.c
> configure:2334: /opt/fortran90/bin/f90  -c conftestf.f
> conftestf.f
>    main program
> 
> 4 Lines Compiled
> configure:2336: /opt/fortran90/bin/f90 -o conftest   conftestf.o
> conftest.o
> configure:2338: ./conftest
> configure:2371: checking if Fortran "doubleprecision" is C "double"
> configure:2380: /usr/local/gcc-2.95.3/bin/gcc -c -DNDEBUG -O3 -g
> conftest.c
> configure:2382: /opt/fortran90/bin/f90  -c conftestf.f
> conftestf.f
>    main program
> 
> 4 Lines Compiled
> configure:2384: /opt/fortran90/bin/f90 -o conftest   conftestf.o
> conftest.o
> configure:2386: ./conftest
> configure:2413: checking for Fortran-equivalent to netCDF "byte"
> configure:2420: /opt/fortran90/bin/f90 -c  conftest.f
> conftest.f
>    main program
> 
> 2 Lines Compiled
> configure:2435: checking for Fortran-equivalent to netCDF "short"
> configure:2442: /opt/fortran90/bin/f90 -c  conftest.f
> conftest.f
>    main program
> 
> 2 Lines Compiled
> configure:2462: checking for math library
> configure:2466: checking for tanh in -lc
> configure:2485: /usr/local/gcc-2.95.3/bin/gcc -o conftest -O3 -g
> -DNDEBUG  conft
> est.c -lc   1>&5
> /usr/ccs/bin/ld: Unsatisfied symbols:
>    tanh (code)
> collect2: ld returned 1 exit status
> configure: failed program was:
> #line 2474 "configure"
> #include "confdefs.h"
> /* Override any gcc2 internal prototype to avoid an error.  */
> /* We use char because int might match the return type of a gcc2
>     builtin and then its argument prototype would still apply.  */
> char tanh();
> 
> int main() {
> tanh()
> ; return 0; }
> configure:2504: checking for tanh in -lm
> configure:2523: /usr/local/gcc-2.95.3/bin/gcc -o conftest -O3 -g
> -DNDEBUG  conft
> est.c -lm   1>&5
> configure:2555: checking for ar utility
> configure:2562: checking for ar
> configure:2629: checking ar flags
> configure:2638: checking for nm utility
> configure:2680: checking for nm
> configure:2712: checking nm flags
> configure:2722: checking for ranlib
> configure:2751: checking for stdlib.h
> configure:2761: /usr/local/gcc-2.95.3/bin/gcc -E -DNDEBUG conftest.c
> >/dev/null
> 2>conftest.out
> configure:2788: checking for sys/types.h
> configure:2798: /usr/local/gcc-2.95.3/bin/gcc -E -DNDEBUG conftest.c
> >/dev/null
> 2>conftest.out
> configure:2824: checking for strerror
> configure:2852: /usr/local/gcc-2.95.3/bin/gcc -o conftest -O3 -g
> -DNDEBUG  conft
> est.c  1>&5
> configure:2877: checking for working ftruncate()
> configure:2930: /usr/local/gcc-2.95.3/bin/gcc -o conftest -O3 -g
> -DNDEBUG  conft
> est.c  1>&5
> configure:2952: checking for working alloca.h
> configure:2964: /usr/local/gcc-2.95.3/bin/gcc -o conftest -O3 -g
> -DNDEBUG  conft
> est.c  1>&5
> configure:2985: checking for alloca
> configure:3018: /usr/local/gcc-2.95.3/bin/gcc -o conftest -O3 -g
> -DNDEBUG  conft
> est.c  1>&5
> configure:3184: checking for st_blksize in struct stat
> configure:3197: /usr/local/gcc-2.95.3/bin/gcc -c -O3 -g -DNDEBUG
> conftest.c 1>&5
> configure:3219: checking for IEEE floating point format
> configure:3257: /usr/local/gcc-2.95.3/bin/gcc -o conftest -O3 -g
> -DNDEBUG  conft
> est.c  1>&5
> configure:3278: checking for ANSI C header files
> configure:3291: /usr/local/gcc-2.95.3/bin/gcc -E -DNDEBUG conftest.c
> >/dev/null
> 2>conftest.out
> configure:3358: /usr/local/gcc-2.95.3/bin/gcc -o conftest -O3 -g
> -DNDEBUG  conft
> est.c  1>&5
> configure:3382: checking for size_t
> configure:3415: checking for off_t
> configure:3448: checking for ssize_t
> configure:3481: checking for ptrdiff_t
> configure:3514: checking for uchar
> configure:3547: checking whether char is unsigned
> configure:3610: checking whether byte ordering is bigendian
> configure:3628: /usr/local/gcc-2.95.3/bin/gcc -c -O3 -g -DNDEBUG
> conftest.c 1>&5
> configure: In function `main':
> configure:3623: `bogus' undeclared (first use in this function)
> configure:3623: (Each undeclared identifier is reported only once
> configure:3623: for each function it appears in.)
> configure:3623: parse error before `endian'
> configure: failed program was:
> #line 3617 "configure"
> #include "confdefs.h"
> #include <sys/types.h>
> #include <sys/param.h>
> int main() {
> 
> #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
>  bogus endian macros
> #endif
> ; return 0; }
> configure:3676: /usr/local/gcc-2.95.3/bin/gcc -o conftest -O3 -g
> -DNDEBUG  conft
> est.c  1>&5
> configure: failed program was:
> #line 3663 "configure"
> #include "confdefs.h"
> main () {
>   /* Are we little or big endian?  From Harbison&Steele.  */
>   union
>   {
>     long l;
>     char c[sizeof (long)];
>   } u;
>   u.l = 1;
>   exit (u.c[sizeof (long) - 1] == 1);
> }
> configure:3700: checking size of short
> configure:3719: /usr/local/gcc-2.95.3/bin/gcc -o conftest -O3 -g
> -DNDEBUG  conft
> est.c  1>&5
> configure:3739: checking size of int
> configure:3758: /usr/local/gcc-2.95.3/bin/gcc -o conftest -O3 -g
> -DNDEBUG  conft
> est.c  1>&5
> configure:3778: checking size of long
> configure:3797: /usr/local/gcc-2.95.3/bin/gcc -o conftest -O3 -g
> -DNDEBUG  conft
> est.c  1>&5
> configure:3817: checking size of float
> configure:3836: /usr/local/gcc-2.95.3/bin/gcc -o conftest -O3 -g
> -DNDEBUG  conft
> est.c  1>&5
> configure:3856: checking size of double
> configure:3875: /usr/local/gcc-2.95.3/bin/gcc -o conftest -O3 -g
> -DNDEBUG  conft
> est.c  1>&5
> configure:3895: checking size of off_t
> configure:3918: /usr/local/gcc-2.95.3/bin/gcc -o conftest -O3 -g
> -DNDEBUG  conft
> est.c  1>&5
> configure:3938: checking size of size_t
> configure:3961: /usr/local/gcc-2.95.3/bin/gcc -o conftest -O3 -g
> -DNDEBUG  conft
> est.c  1>&5
> configure:4062: checking for manual-page index command
> configure:4066: checking binary distribution directory
> #
> 
> 
> --
> Michael Vrencur
> FSL/NOAA System Administrator
> address@hidden
> 303.497.7526