[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20021127: Some problem with cfortran.h
- Subject: 20021127: Some problem with cfortran.h
- Date: Wed, 27 Nov 2002 08:26:29 -0700
>From: Arnaud Mequignon <address@hidden>
>Organization: METEO FRANCE(CNRM)
>Keywords: 200211270908.gAR98B413767 UDUNITS Linux
Arnaud,
>I worked on a Linux PC
>Here is the result of an "uname -a" :
>oredon:/home/tramm/aida/extern/src/udunits/src => uname -a
>Linux oredon 2.4.18-6mdkenterprise #1 SMP Fri Mar 15 02:28:20 CET 2002
>i686 unknown
>
>I had some problem when I compiled udunits.
>
>In the directory .../udunits-1.11.7/src/, I maked a "./configure ..."
>and "make install"
>
>The error message was :
>
>In file included from utlib.c:29:
>../port/cfortran/cfortran.h:132:3: #error "cfortran.h: Can't find your
>environment among: - MIPS cc and f77 2.0. (e.g. Silicon Graphics,
>...
Did you define your CPPFLAGS environment variable to include the
-Df2cFortran flag before running configure? If no, this is most likely
your problem.
Here is a list of the Unix environment variables that I recommend you
set before running configure:
CC=/usr/bin/gcc
CPPFLAGS="-DNDEBUG -Df2cFortran"
CFLAGS=-O
FC=/usr/bin/g77
FFLAGS="-O -Wuninitialized -fno-automatic"
CXX=
The important item in this list as far as cfortran goes for Linux is
CPPFLAGS.
After you define these on your system, you will need to clean up any
files left over from the previous configure attempt: config config.status,
config.log, before you rerun configure.
>I think i have resolved the problem like this :
>
>In file ...../udunits-1.11.7/src/port/cfortran/cfortran.h, line ~130
>I replaced :
I would suggest that you go back to the original UDUNITS distribution
and try the setting of the envionment variables first. Hacking the
cfortran.h code can get to be a real time consumer especially if you
have to do it for each distribution you try to use.
>#if!(defined(mipsFortran)||defined(DECFortran)||defined(vmsFortran)||defined(C
> ONVEX
>Fortran)||defined(PowerStationFortran)||defined(AbsoftUNIXFortran)||defined(Ab
> so
>ftProFortran)||defined(SXFortran))
>
>by
>
#define f77
>#if!(defined(mipsFortran)||defined(DECFortran)||defined(vmsFortran)||defined(C
> ONVEX
>Fortran)||defined(PowerStationFortran)||defined(AbsoftUNIXFortran)||defined(Ab
> so
>ftProFortran)||defined(SXFortran)||defined(f77))
>
>I don't know if it the right method but it works on my computer.
>
>Best regards.
>Arnaud Méquignon
>
>Please, read below for more details.
>
>export AIDA_HOME=/home/tramm/aida
>
>cd $AIDA_HOME
>mkdir extern
>mkdir extern/include
>mkdir extern/lib
>mkdir extern/src
>get udunits-1.11.7.tar.Z and put it in $AIDA_HOME/extern/src
>uncompress udunits-1.11.7.tar.Z; tar xvf udunits-1.11.7.tar
>
>cd $AIDA_HOME/extern/src/udunits-1.11.7/src
>./configure -prefix=$AIDA_HOME/extern
>
>oredon:/home/tramm/aida/extern/src/udunits/src => ./configure
>-prefix=$AIDA_HOME/extern
>creating cache ./config.cache
>checking type of operating system... linux
>checking for manual-page index command...
>checking for c89... no
>checking for cc... cc
>checking for dependency generation mechanism... cc -M
>checking how to run the C preprocessor... cc -E
>checking the C preprocessor... works
>checking for C const... yes
>checking for C volatile... yes
>checking for C signed... yes
>checking for C function prototypes... yes
>checking for standard C variadic functions... yes
>checking for standard C string generation... yes
>checking for standard C token pasting... yes
>checking C void pointer... yes
>checking for ar... ar
>checking for tar flags... -chof
>checking for ranlib... ranlib
>checking binary distribution directory... /home/ftp/pub/binary/dummy_system
>checking the installation prefix... /home/tramm/aida/extern
>checking the installation exec-prefix... /home/tramm/aida/extern
>checking for neqn... neqn
>checking for tbl... tbl
>checking for ar... (cached) ar
>checking for C math library...
>checking for (void)sin(0.0) in default library(s)... no
>checking for (void)sin(0.0) in -lm... yes
>checking style for cfortran.h... Standard
>checking for stddef.h... yes
>checking C header file <stddef.h> for typedef size_t... declared
>checking for stddef.h... (cached) yes
checking C header file <stddef.h> for typedef ptrdiff_t... declared
>checking for float.h... yes
>checking for stdlib.h... yes
>checking C header file <stdlib.h> for typedef size_t... declared
>checking for atexit... yes
>checking for stdlib.h... (cached) yes
>checking C header file <stdlib.h> for function atexit()... declared
>checking for getenv... yes
>checking for stdlib.h... (cached) yes
>checking C header file <stdlib.h> for function getenv()... declared
>checking for string.h... yes
>checking C header file <string.h> for typedef size_t... declared
>checking for strerror... yes
>checking for string.h... (cached) yes
>checking C header file <string.h> for function strerror()... declared
>checking for string.h... (cached) yes
>checking C header file <string.h> for function strchr()... declared
>checking for string.h... (cached) yes
>checking C header file <string.h> for function strcpy()... declared
>checking for string.h... (cached) yes
>checking C header file <string.h> for function strrchr()... declared
>checking for string.h... (cached) yes
>checking C header file <string.h> for function strncpy()... declared
>checking for string.h... (cached) yes
>checking C header file <string.h> for function strtok()... declared
>checking for strstr... yes
>checking for string.h... (cached) yes
>checking C header file <string.h> for function strstr()... declared
>checking for memmove... yes
>checking for string.h... (cached) yes
>checking C header file <string.h> for function memmove()... declared
>checking for time.h... yes
>checking C header file <time.h> for typedef time_t... declared
>checking for time.h... (cached) yes
>checking C header file <time.h> for typedef size_t... declared
>checking for difftime... yes
>checking for time.h... (cached) yes
>checking C header file <time.h> for function difftime()... declared
>checking for strftime... yes
>checking for time.h... (cached) yes
>checking C header file <time.h> for function strftime()... declared
>checking for search.h... yes
>checking C header file <search.h> for typedef ENTRY... declared
>checking for search.h... (cached) yes
>checking C header file <search.h> for typedef ACTION... declared
>checking for search.h... (cached) yes
>checking C header file <search.h> for typedef VISIT... declared
>checking for tsearch... yes
>checking for search.h... (cached) yes
>checking C header file <search.h> for function tsearch()... declared
>checking for tfind... yes
>checking for search.h... (cached) yes
>checking C header file <search.h> for function tfind()... declared
>checking for tdelete... yes
>checking for search.h... (cached) yes
>checking C header file <search.h> for function tdelete()... declared
>checking for twalk... yes
>checking for search.h... (cached) yes
>checking C header file <search.h> for function twalk()... declared
>checking for perl... perl
>checking for type of perl executable to create... dynamic
>checking for position-independent compilation flags... ''
>updating cache ./config.cache
>creating ./config.status
>creating Makefile
>creating lib/Makefile
>creating udunits/Makefile
>creating perl/Makefile.PL
>creating port/master.mk
>creating port/Makefile
>creating port/misc/Makefile
>creating port/cfortran/Makefile
>creating port/misc/udposix.h
>creating port/misc/stdarg.h
>creating port/misc/stddef.h
>creating port/misc/stdlib.h
>creating port/misc/string.h
>creating port/misc/time.h
>creating port/misc/limits.h
>creating port/misc/search.h
>expanding `include's in file `Makefile'
>expanding `include's in file `lib/Makefile'
>expanding `include's in file `udunits/Makefile'
>expanding `include's in file `perl/Makefile.PL'
>expanding `include's in file `port/master.mk'
>expanding `include's in file `port/Makefile'
>expanding `include's in file `port/misc/Makefile'
>expanding `include's in file `port/cfortran/Makefile'
>
>
>oredon:/home/tramm/aida/extern/src/udunits/src => make install
>
>making `install' in directory /home/tramm/aida/extern/src/udunits/src/port
>
>make[1]: Entre dans le répertoire
>`/home/tramm/aida/extern/src/udunits-1.11.7/src/port'
>
>making `install' in directory
>/home/tramm/aida/extern/src/udunits/src/port/misc
>
>make[2]: Entre dans le répertoire
>`/home/tramm/aida/extern/src/udunits-1.11.7/src/port/misc'
>cc -c -O -I. -D_REENTRANT uddummy.c
>make -w /home/tramm/aida/extern/lib LIBDIR=/home/tramm/aida/extern/lib
>make[3]: Entre dans le répertoire
>`/home/tramm/aida/extern/src/udunits-1.11.7/src/port/misc'
>make[3]: `/home/tramm/aida/extern/lib' est à jour.
>make[3]: Quitte le répertoire
>`/home/tramm/aida/extern/src/udunits-1.11.7/src/port/misc'
>ar rcuv /home/tramm/aida/extern/lib/libudport.a uddummy.o
>a - uddummy.o
>ranlib /home/tramm/aida/extern/lib/libudport.a
>make[2]: Quitte le répertoire
>`/home/tramm/aida/extern/src/udunits-1.11.7/src/port/misc'
>
>returning to directory /home/tramm/aida/extern/src/udunits/src/port
>
>
>making `install' in directory
>/home/tramm/aida/extern/src/udunits/src/port/cfortran
>
>make[2]: Entre dans le répertoire
>`/home/tramm/aida/extern/src/udunits-1.11.7/src/port/cfortran'
>make[2]: Rien à faire pour `install'.
>make[2]: Quitte le répertoire
>`/home/tramm/aida/extern/src/udunits-1.11.7/src/port/cfortran'
>
>returning to directory /home/tramm/aida/extern/src/udunits/src/port
>
>make[1]: Quitte le répertoire
>`/home/tramm/aida/extern/src/udunits-1.11.7/src/port'
>
>returning to directory /home/tramm/aida/extern/src/udunits/src
>
>
>making `install' in directory /home/tramm/aida/extern/src/udunits/src/lib
>
>make[1]: Entre dans le répertoire
>`/home/tramm/aida/extern/src/udunits-1.11.7/src/lib'
>make[2]: Entre dans le répertoire
>`/home/tramm/aida/extern/src/udunits-1.11.7/src/lib'
>cc -c -O -I../port/misc -I../port/cfortran
>-DUT_DEFAULT_PATH='"/home/tramm/aida/extern/etc/udunits.dat"' utlib.c
>In file included from utlib.c:29:
>../port/cfortran/cfortran.h:132:3: #error "cfortran.h: Can't find your
>environment among: - MIPS cc and f77 2.0. (e.g. Silicon Graphics,
>DECstations, ...) - IBM AIX XL C and FORTRAN Compiler/6000 Version
>01.01.0000.0000 - VAX VMS CC 3.1 and FORTRAN
>5.4.
> - Alpha VMS DEC C 1.3 and DEC FORTRAN
>6.0.
> - Alpha OSF DEC C and DEC Fortran for OSF/1 AXP Version
>1.2
> - Apollo DomainOS 10.2 (sys5.3) with f77 10.7 and cc
>6.7. -
>CRAY - NEC
>SX-4 SUPER-UX -
>CONVEX
> -
>Sun
> - PowerStation Fortran
>with Visual C++ - HP9000s300/s700/s800
>Latest test with: HP-UX A.08.07 A 9000/730 - LynxOS: cc or gcc with
>f2c. - VAXUltrix: vcc,cc or gcc
>with f2c. gcc or cc with f77. - f77 with vcc
>works;
>but missing link magic for f77 I/O. - NO fort. None of
>gcc, cc
>or vcc generate required names. - f2c : Use #define f2cFortran,
>or cc
>-Df2cFortran - NAG f90: Use #define NAGf90Fortran, or cc
>-DNAGf90Fortran - Absoft UNIX F77: Use #define
>AbsoftUNIXFortran
>or cc -DAbsoftUNIXFortran - Absoft Pro Fortran: Use #define
>AbsoftProFortran - Portland Group Fortran: Use #define pgiFortran"
>make[2]: *** [utlib.o] Erreur 1
>make[2]: Quitte le répertoire
>`/home/tramm/aida/extern/src/udunits-1.11.7/src/lib'
>make[1]: *** [installed_library] Erreur 2
>make[1]: Quitte le répertoire
>`/home/tramm/aida/extern/src/udunits-1.11.7/src/lib'
>make: *** [lib/install] Erreur 1
>
>
> ===> dans cfortran.h
>#if
>!(defined(mipsFortran)||defined(DECFortran)||defined(vmsFortran)||defined(CONV
> EX
>Fortran)||defined(PowerStationFortran)||defined(AbsoftUNIXFortran)||defined(Ab
> so
>ftProFortran)||defined(SXFortran))
>
>devient
>
>#define f77
>#if
>!(defined(mipsFortran)||defined(DECFortran)||defined(vmsFortran)||defined(CONV
> EX
>Fortran)||defined(PowerStationFortran)||defined(AbsoftUNIXFortran)||defined(Ab
> so
>ftProFortran)||defined(SXFortran)||defined(f77))
>
>--
>-------------------- Errare Informaticum Est -----------------
> MEQUIGNON Arnaud Tel : 05.61.07.96.29
> Météo-France Fax : 05.61.07.96.27
> CNRM/GMEI/TRAMM mailto:address@hidden
> 42, Av Gaspard Coriolis
> 31057 Toulouse Cedex
>
>Les positions exprimées ci-dessus n'engagent que leur auteur
>et en aucune façon Meteo-France.
>----------------------------------------------------------------
Tom Yoksas
>From address@hidden Tue Dec 3 01:41:14 2002
Hi Tom,
I Thank you very much for your help.
I made (and not "maked" as i wrote in the previous message :( ) what you
wrote and it works !
Thank you, best regards
Arnaud.