[ncl-install] Bad output files from rgb.c

Mary Haley haley at ucar.edu
Tue Dec 11 12:46:31 MST 2018


Hi Dave,

I don't think anybody has a clue about this one and hence the lack of a
quick response.

What version of what compiler are you using? I see references to clang and
gcc3 in your output, but it's not clear.

Sometimes when I get errors like this I try to compile the same code but
with the bare minimum of possible options. For example:

   cd $NCARG/ni/src/db/rgb
   make clean
   clang -I../../../.././include -c rgb.c
   clang  -o rgb rgb.o -L../../../.././common/src/libncarg_c -lncarg_c
   make install

This should make the "rgb" executable, and then install the three rgb.xxx
files to $NCARG_ROOT/lib/ncarg/database. You can then try the cn05n.ncl
example again.

In your case, you'll want to substitute "clang" with whatever compiler
you're using.

If this works, then I would take a closer look at the various options that
are being set when you compile the code using your own options, which looks
to be this:

/Users/dallured/macports/254/bin/glibtool --tag=CC --mode=compile
/usr/bin/clang -DHAVE_CONFIG_H -I. -I. -I.. -I.   -DUSE_INTERP_RESULT
-I/Users/dallured/macports/254/include   -pipe -Os -arch x86_64 -Wall
-I/Users/dallured/macports/254/include -c -o rgb.lo `test -f rgb.c || echo
'./'`rgb.c

I tried a subset of these options, and it worked fine for me:

clang -c -I../../../.././include -c -pipe -Os -arch x86_64 -Wall rgb.c
clang -o rgb rgb.o -pipe -Os -arch x86_64 -Wall
-L../../../.././common/src/libncarg_c -lncarg_c

--Mary


On Thu, Dec 6, 2018 at 1:51 PM Dave Allured - NOAA Affiliate via
ncl-install <ncl-install at ucar.edu> wrote:

> NCL support,
>
> I am debugging Macports builds of NCARG/NCL 6.5.0 on Mac OS 10.13.6 (High
> Sierra).  My current build recipe works pretty well.  However, there are
> errors in the two RGB database files that are generated during the build
> process.  This leads to defects in output plots.  This is demonstrated by
> some of the example programs, such as:
>
>    mac56:~/temp/x 31> ng4ex cn05n
>    NCAR Graphics NCL Example <cn05n>
>      Copying cn05n.ncl
>    Running NCL...
>     Copyright (C) 1995-2018 - All Rights Reserved
>     University Corporation for Atmospheric Research
>     NCAR Command Language Version 6.5.0
>     The use of this software is governed by a License Agreement.
>     See http://www.ncl.ucar.edu/ for more details.
>    fatal:CvtStringToColorIndex: Unable to convert string "PaleGreen4" to
> requested type
>    warning:Error retrieving resource lbTitleFontColor from args - Ignoring
> Arg
>    fatal:CvtStringToColorIndex: Unable to convert string "PaleGreen4" to
> requested type
>    warning:Error retrieving resource tiMainFontColor from args - Ignoring
> Arg
>
>    <truncated>
>
> This is caused by bad files rgb.dir and rgb.pag that are generated by
> rgb.c when building NCARG.  I can plug in correct database files from other
> sources, and these NCL color errors go away.  The current Macports build
> throws several warning messages about rgb.c.  There is a current Macports
> ticket with more details, including a build console log that shows the
> rgb.c warnings:
>
>     https://trac.macports.org/ticket/57728
>
> It is unclear to me whether the problem is in rgb.c itself, or in the
> Macports build environment.  Either is possible.  Can you please take a
> look and advise on a possible solution?  Thanks.
>
> --Dave
> _______________________________________________
> ncl-install mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-install
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-install/attachments/20181211/b7b7eb04/attachment.html>


More information about the ncl-install mailing list