Discussion:
[MacPorts] #57728: CvtStringGenArrayToCmap unable to find rgb error
MacPorts
2018-12-05 09:13:28 UTC
Permalink
#57728: CvtStringGenArrayToCmap unable to find rgb error
----------------------------+--------------------
Reporter: lvankampenhout | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Keywords: | Port: ncarg
----------------------------+--------------------
I have problems with setting custom colors using gsn_define_colormap()

`warning:CvtStringGenArrayToCmap:Unable to find rgb of "white", using
white`

Example script attached. I do not remember having this problem in previous
version of NCL (< 6.5.0).
--
Ticket URL: <https://trac.macports.org/ticket/57728>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-05 09:13:52 UTC
Permalink
#57728: CvtStringGenArrayToCmap unable to find rgb error
-----------------------------+--------------------
Reporter: lvankampenhout | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords:
Port: ncarg |
-----------------------------+--------------------
Changes (by lvankampenhout):

* Attachment "test.ncl" added.
--
Ticket URL: <https://trac.macports.org/ticket/57728>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-05 09:17:02 UTC
Permalink
#57728: CvtStringGenArrayToCmap unable to find rgb error
-----------------------------+--------------------
Reporter: lvankampenhout | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords:
Port: ncarg |
-----------------------------+--------------------

Comment (by lvankampenhout):

The first step is to check whether this is a NCL 6.5.0 problem or a
problem with the port. Unfortunately, I don't have access to any other
install of NCL besides this one.
--
Ticket URL: <https://trac.macports.org/ticket/57728#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-05 11:09:15 UTC
Permalink
#57728: ncarg: CvtStringGenArrayToCmap unable to find rgb error
-----------------------------+----------------------
Reporter: lvankampenhout | Owner: tenomoto
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords:
Port: ncarg |
-----------------------------+----------------------
Changes (by jmroot):

* cc: tenomoto, openmaintainer (removed)
* status: new => assigned
* owner: (none) => tenomoto
--
Ticket URL: <https://trac.macports.org/ticket/57728#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-06 01:42:13 UTC
Permalink
#57728: ncarg: CvtStringGenArrayToCmap unable to find rgb error
-----------------------------+----------------------
Reporter: lvankampenhout | Owner: tenomoto
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords:
Port: ncarg |
-----------------------------+----------------------

Comment (by Dave-Allured):

Thank you for the short reproducer. I can reproduce this on Mac OS
10.13.6 with MacPorts 2.5.4, Xcode 10.1, and NCARG/NCL 6.5.0. Some of the
NCL built-in examples also demo this problem:

{{{
ng4ex cn05n
fatal:CvtStringToColorIndex: Unable to convert string "PaleGreen4" to
requested type
Etc.
}}}

I traced this to two bad installed color database files that are generated
during the NCARG source build process. The bad files are `rgb.dir` and
`rgb.pag`. Under Macports, the program `rgb.c` runs improperly and
outputs bad database files, and that is as far as I could get for now.
--
Ticket URL: <https://trac.macports.org/ticket/57728#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-06 02:20:17 UTC
Permalink
#57728: ncarg: CvtStringGenArrayToCmap unable to find rgb error
-----------------------------+----------------------
Reporter: lvankampenhout | Owner: tenomoto
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords:
Port: ncarg |
-----------------------------+----------------------

Comment (by Dave-Allured):

Here is another workaround, besides Conda. Remarkably, you can manually
compile and run `rgb.c` in standalone mode, and this will now generate
correct versions of the two database files. You can then replace the two
bad files in your Macports install directory.

Alternatively, you could bring in good versions of `rgb.dir` and `rgb.pag`
from some other installed version of NCARG/NCL. It appears that these
binary files are identical in both Mac and Linux 64-bit installs.

Bad versions from my recent local build identify like this:

{{{
ls -go rgb*
-rw-r--r-- 1 4096 Nov 26 22:44 rgb.dir
-rw-r--r-- 1 26624 Nov 26 22:44 rgb.pag
md5 rgb*
MD5 (rgb.dir) = aa0c7a1422062833952bbfba2afd38bc
MD5 (rgb.pag) = 3da80327b34549c1ea22d5f6e83b3f41
}}}

Good versions identify like this:

{{{
ls -go rgb*
-rw-r--r-- 1 4096 Dec 5 18:08 rgb.dir
-rw-r--r-- 1 16384 Dec 5 18:08 rgb.pag
md5 rgb*
MD5 (rgb.dir) = 547694cc1d9a22fdff2f019c3cfdd796
MD5 (rgb.pag) = bee91a15479082c09da4368f090792c1
}}}

The program `rgb.c` is only in the source distro, and not installed. It
must be linked with an NCARG internal library, libncarg_c. Let me know if
anyone wants stand-alone compile instructions, or working copies of the
two database files.
--
Ticket URL: <https://trac.macports.org/ticket/57728#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-06 19:39:24 UTC
Permalink
#57728: ncarg: CvtStringGenArrayToCmap unable to find rgb error
-----------------------------+----------------------
Reporter: lvankampenhout | Owner: tenomoto
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: | Keywords:
Port: ncarg |
-----------------------------+----------------------
Changes (by Dave-Allured):

* Attachment "ncarg.install.1126c.log.tar" added.

During the NCARG/NCL build, a number of warnings are thrown when compiling
`rgb.c`. This might be related to the current issue. Here is the full
console output from my recent build. Other versions of `rgb.c` show up in
dependency ports, earlier in the console log. Please see NCARG's `rgb.c`
messages near the end.
--
Ticket URL: <https://trac.macports.org/ticket/57728>
MacPorts <https://www.macports.org/>
Ports system for macOS
Loading...