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

20030418: Building UDUNITS under FreeBSD: cfortran.h



Mark,

> To: address@hidden
> From: Mark Tucker <address@hidden>
> Subject: Udunits & freebsd.
> Organization: Lyndon State

The above message contained the following:

> I'm trying to build udunits on freebsd (4.8) and have run into an
> error in the build process.  I am running the make process with the
> following commandline:
> 
> ( ./configure && make all install clean ) > & ! log &
> 
> The configure process does not show anything troublesome but it fails
> 
> ../port/cfortran/cfortran.h:153: #error "cfortran.h:  Can't find your 
> environment among:
> ...
> 
> It then lists many environments other than freebsd.  I've attached the
> "log" file containing the output from the build process.

I believe the solution is to define the C macro "f2cFortran" in the
environment variable CPPFLAGS prior to executing the configure script.

Please try the following:

    1.  Go to the top-level source directory.

    2.  Perform steps 3 through 5 described near the end of the file
        INSTALL.

    3.  Ensure that the environment variable CPPFLAGS defines the C
        macro "f2cFortran", e.g.,

            export CPPFLAGS=-Df2cFortran

        or

            setenv CPPFLAGS -Df2cFortran

        depending on your user-shell.

    5.  Perform steps 6 through 9 described near the end of the file
        INSTALL.

Please let me know if this helps.

> The ldm, gempak and mcidas all have compiled nicely on this system.

The UDUNITS package runs on more systems than those packages, partly
because of its more general solution to the Fortran-calling-C problem.

> Thanks.
> 
> -- 
> Mark Tucker
> Systems Administrator
> Meteorology Dept. 
> Lyndon State College
> http://apollo.lsc.vsc.edu
> address@hidden
> (802)-626-6328
...

Regards,
Steve Emmerson