Dear friends,
Thanks, as always, to all our cheerful friends at NCAR for their assistance.
I think I followed Rick's instructions here correctly but (my particular
problem- there might be others) is that even after his remedy, the file :
/usr/local/ncarg/lib/ncarg/database/pwritdata
was missing from its desired location.
It seems that the make in
> $NCARG/ncarg2d/src/db/pwritxnt
did not copy the file to the desired location. A simple copy did and now my
pwrit* calls seem to be working satisfactorily.
However, some examples are missing their annotation which suggests to me that
probably there is a similar problem with the fontcap make.
I cannot see the answer immediately. Is someone able to help and perhaps see
the wider implications of what has happened here?
Yours sincerely,
Bill
On Wednesday 14 April 2004 03:30, Rick Grubin wrote:
> Hello,
>
> It seems a few folks are running in to similar problems; hopefully I can
> cover them sufficiently here to save others some grief.
>
> > I try to compile the ncarg with HDF using the gcc/g77 compiler.
> > (RH9 on a Dell inspiron 5150 notebook)
>
> Red Hat Linux v9 is a supported platform, so that's good. It does matter
> what version of the GNU development tools (gcc, g77, etc.) you're using.
> You can check by running:
>
> % gcc -v
>
> or
>
> % g77 -v
>
> The results from each should match; the GNU compilers are both built from
> the same code base. As an example:
>
> % gcc -v
> Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
> --infodir=/usr/share/info --enable-shared --enable-threads=posix
> --disable-checking --with-system-zlib --enable-__cxa_atexit
> --host=i386-redhat-linux
> Thread model: posix
> gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
>
> > In my config/LINUX file I have the options -lg2c and -lm
> > and I encounter a lot of "undefined reference to main"
> > errors (ex on fontc and graphc files). After reading a few
> > suggestions in the list I decide to comment out the above
> > two options.
>
> Indeed, the file $NCARG/config/LINUX file does include the line
>
> #define CtoFLibraries -lg2c -lm
>
> This gets propagated to Makefiles in all subdirectories. This system-wide
> definition/propagation was necessary at one point in the past, for the GNU
> development tools of version 2.9x vintage, to build the NCARG source code.
> In particular, the "-lg2c" verbiage was necessary for the subdirectories
> where both C and Fortran object files were linked together.
>
> The newer GNU development tools, those found with Red Hat Linux v9, do not
> need the link with the library libg2c.a when compiling Fortran-only source
> code (as is the case in the source directories noted below). The
> linker/loader will locate the proper object code to build an executable.
>
> The interim solution (until the code base here is updated) is to edit the
> Makefiles in these directories:
>
> $NCARG/common/src/fontcap
> $NCARG/common/src/graphcap
> $NCARG/ncarg2d/src/bin/pre2ncgm
> $NCARG/ncarg2d/src/db/pwritxnt
>
> Change the line:
>
> CTOFLIBS = -lg2c -lm
>
> to
>
> CTOFLIBS =
>
> and run 'make' again, in those directories.
>
> Regarding the HDF software:
> > Errors reduces to a few (it cant find the hdf.h and says no such file) .
>
> It's important to note that NCARG expects to find the HDF include files
> in a directory path like: .../include/hdf as noted in the INSTALL file
> for NCARG. If this isn't the case, you'll see errors like "can't find
> file hdf.h"
>
> If installing HDF v4.2r0, you can configure such as:
>
> % ./configure --prefix=/local --includedir=/local/include/hdf
>
> In this example, I've installed the HDFv4 software relative to /local,
> and the header files in particular in /local/include/hdf I have also
> specified /local/include as a place to look for locally installed
> header files when running the Configure program for NCARG. Then, when
> NCARG source code files specify something like
>
> #include <hdf/hdf.h>
>
> those files will be found, because NCARG was configured to look in the
> directory /local/include/hdf and /local/include/hdf/hdf.h exists,
> per my installation of the HDFv4 software.
>
> > A single error for gcc on ictrans (undefinedreference to "s_copy', to
> > "sqrt", to "cos", to "sin" !) !
>
> Did you modify the Makefile for ictrans?
> </path/to/ncarg/ncarview/src/lib/libictrans/Makefile>
>
> The proper library ("-lm" or /usr/lib/libm.a) is present in the correct
> spot in the Makefile, if you configured correctly. The "-lm" in this case
> is from
>
> #define CtoFLibraries -lg2c -lm
>
> in the $NCARG/config/LINUX file.
>
> -Rick.
> --
> Rick Grubin Visualization + Enabling Technologies
> Scientific Computing Division National Center for Atmospheric Research
> grubin@ucar.edu 303.497.1832
>
>
>
>
>
>
> _______________________________________________
> ncarg-talk mailing list
> ncarg-talk@ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
-- Bill Peirsoncurrently at: CMGD Ecole des Mines D'Alès 6, avenue de Claviéres, 30319 Alès CEDEX FRANCE E-mail: William.Peirson@ema.fr voix: +33 4 66 78 56 59 fax: +33 4 66 78 53 65
usual address: Water Research Laboratory www.wrl.unsw.edu.au School of Civil and Environmental Engineering mobile: 0416 150 223 University of New South Wales voice: + 61 2 9949 4488 x222 King St., Manly Vale NSW 2093 E-mail: W.Peirson@unsw.edu.au AUSTRALIA fax: +61 2 9949 4188
_______________________________________________ ncarg-talk mailing list ncarg-talk@ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
This archive was generated by hypermail 2b29 : Wed Aug 04 2004 - 10:44:45 MDT