[R] You are right and the problem is solved. Re: about the possible errors in Rgraphviz Package

Gabor Grothendieck ggrothendieck at gmail.com
Fri Apr 2 04:37:31 CEST 2010


I finally got Rgraphviz to work.

I uninstalled Rgraphviz and graphviz, did a reboot of Vista, installed
graphviz again making sure to wget the path name found in the
Rgraphviz README (in the Rgraphviz source .tar.gz) and did another
reboot of Vista and also removed Rgraphviz, did another reboot of
Vista and reinstalled Rgraphviz and rebooted once again.

I also experimented with adding C:\Program Files\Internet Explorer
(since Dependency Walker said Rgraphviz.dll uses IESHIMS.dll which is
there) and C:\Program Files\R\R-2.10.x\bin to my permanent path
(normally I use a batch file which adds it temporarily on the fly) and
it did work; however, when I removed C:\Program Files\Internet
Explorer and C:\Program Files\R\R-2.10.x\bin from my permanent path it
still worked so I guess that had nothing to do with it.

My best guess is that the reboots cleared things up and perhaps the
instructions should include rebooting the system and also mention
Dependency Walker.  Probably not all the reboots were needed but it
would be time consuming to figure out which reboot was the key one.
Or perhaps the fact that I had C:\Program Files\Internet Explorer and
C:\Program Files\R\R-2.10.x\bin on my permanent path during the
installation of graphviz and Rgraphviz made a difference?

On Wed, Mar 31, 2010 at 3:29 PM, Martin Morgan <mtmorgan at fhcrc.org> wrote:
> On 03/31/2010 11:44 AM, Gabor Grothendieck wrote:
>> I got an error message *AND* R becomes unusable and had to be restarted.
>>
>> Using dependency walker it seems to be complaining about R.dll so I
>> copied all of my ...\R\bin\R*.dll files to ..
>> ...\win-library\2.10\Rgraphviz\libs.
>>
>> Then it complained about IESHIMS.dll so I copied \Program
>> Files\Internet Explorer\IESHIMS.dll to
>> ...\win-library\2.10\Rgraphviz\libs.
>>
>> Looking at dependency walker these DLLs: LIBCDT-4.DLL, LIBGRAPH-4.DLL,
>> and LIBGVC-4.DLL all seem to point to correct place.
>>
>> I still have this message in dependency walker:
>> Warning: At least one module has an unresolved import due to a missing
>> export function in a delay-load dependent module.
>>
>> There is a red mark beside:
>> c:\windows\system32\IEFRAME.DLL
>> but its not missing.
>>
>> I also tried reinstalling R using the latest R 2.10.1.
>>
>> I am still getting the same result, namely I can run the indicated
>> code up to but not including plot(g1) but if I run plot(g1) R crashes
>> and must be restarted.
>
> Wow, I didn't mean to put you through such convolutions, and am sorry
> that I can't offer an immediate solution. Martin
>
>>
>>
>>
>> On Wed, Mar 31, 2010 at 12:54 PM, Martin Morgan <mtmorgan at fhcrc.org> wrote:
>>> On 03/31/2010 08:18 AM, Gabor Grothendieck wrote:
>>>> By the way, just in case you did not read the entire message R crashed
>>>
>>> I think you mean that you got an error message, not that R became
>>> unusable? More below...
>>>
>>>> when I tried to run the code from the vignette.
>>>>
>>>> On Wed, Mar 31, 2010 at 10:52 AM, Gabor Grothendieck
>>>> <ggrothendieck at gmail.com> wrote:
>>>>> Based on your success I thought I would try again. I am not sure why I
>>>>> had more success this time but this time I got this far even though I
>>>>> did not change my path at all or make any system changes from what I
>>>>> had before.  I did reinstall Rgraphviz but used the previously
>>>>> installed graphviz.   I tried this code taken from the Rgrpahviz
>>>>> vignette:
>>>>>
>>>>>> library("Rgraphviz")
>>>>> Loading required package: graph
>>>>> Loading required package: grid
>>>>>> set.seed(123)
>>>>>> V <- letters[1:10]
>>>>>> M <- 1:4
>>>>>> g1 <- randomGraph(V, M, 0.2)
>>>>>> g1
>>>>> A graphNEL graph with undirected edges
>>>>> Number of Nodes = 10
>>>>> Number of Edges = 16
>>>>>
>>>>>
>>>>> but when I tried to plot it R crashed.
>>>>>
>>>>>> plot(g1)
>>>>>
>>>>> It did produce this message on the Windows console (not the R console):
>>>>>
>>>>> Error: Layout type: "dot" not recognized. Use one of:
>>>
>>> In the past this has come about when accessing incorrect graphviz DLLs.
>>> The gory detail (if I remember correctly) is that a FILE* gets allocated
>>> in Rgraphviz and passed to graphviz, and if there is a compiler mismatch
>>> then there are no guarantees about FILE* representation.
>>>
>>> The implication is that your Rgraphviz and graphiz are at least partly
>>> out of sync, but it could also be that I am 'getting lucky'. When you
>>> say (quoting from above)...
>>>
>>>>> did not change my path at all or make any system changes from what I
>>>
>>> the implication is that your PATH was already set to include a
>>> graphviz2.20\\bin directory; I'd encourage you to confirm that.
>>
>> Yes,  My path is:
>>
>> PATH=C:\Graphviz2.20\bin;...more stuff...
>>
>>>
>>> And recognizing that you might justifiably be willing to put this on the
>>> shelf, you might also use Dependency Walker
>>> (http://www.dependencywalker.com/) to open the Rgraphviz DLL
>>> (R_HOME/libraries/Rgraphviz/libs/Rgraphviz.dll), right click on the
>>> RGRAPHVIZ.DLL showing up in the top left panel, and choose 'Full paths',
>>> and verify that LIBCDT-4.DLL, LIBGRAPH-4.DLL, and LIBGVC-4.DLL all point
>>> to Graphviz2.20\bin.
>>>
>>> Martin
>>>
>>>
>>>>> There was nothing after the of:
>>>>>
>>>>>> R.version.string
>>>>> [1] "R version 2.10.1 Patched (2010-03-10 r51276)"
>>>>>> win.version()
>>>>> [1] "Windows Vista (build 6002) Service Pack 2"
>>>>>> packageDescription("Rgraphviz")$Version
>>>>> [1] "1.24.0"
>>>>>> graphvizVersion()
>>>>> $installed_version
>>>>> [1] ‘2.20.3’
>>>>>
>>>>> $build_version
>>>>> [1] ‘2.20.3’
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Wed, Mar 31, 2010 at 9:56 AM, HU,ZHENGJUN <hhu at ufl.edu> wrote:
>>>>>> Hi Martin,
>>>>>>
>>>>>>  It is really a 'PATH' problem. After adding C:\Program
>>>>>> Files\Graphviz2.20\bin to the 'PATH' environment variable, the Rgraphviz
>>>>>> package can be loaded without any error messages.
>>>>>>
>>>>>>  Sorry that I ONLY set my 'PATH' environment variable correctly for R but
>>>>>> not for Graphviz.
>>>>>>
>>>>>>  Thank you and Duncan so much for your great help.
>>>>>>  Howard
>>>>>>
>>>>>>
>>>>>> On Tue Mar 30 18:12:54 EDT 2010, Martin Morgan <mtmorgan at fhcrc.org> wrote:
>>>>>>
>>>>>>> On 03/30/2010 03:06 PM, HU,ZHENGJUN wrote:
>>>>>>>>
>>>>>>>> Hi Martin,
>>>>>>>>
>>>>>>>>  I am 100% sure that I set my 'PATH' environment variable correctly
>>>>>>>> because all other packages can loaded correctly as well as because R can
>>>>>>>> be run correctly under both MS DOS and MS Windows XP. Also, I can create
>>>>>>>> some simple R packages correctly.
>>>>>>>
>>>>>>> The PATH must be set correctly to include graphviz, as in my example
>>>>>>> below. Copy and paste the output of
>>>>>>>
>>>>>>>  strsplit(Sys.getenv("PATH"), ";")
>>>>>>>
>>>>>>> and
>>>>>>>
>>>>>>>  list.files(strsplit(Sys.getenv("PATH"), ";")[[1]][[14]], "dll")
>>>>>>>
>>>>>>> Martin
>>>>>>>
>>>>>>>>
>>>>>>>>  Thanks.
>>>>>>>>  Howard
>>>>>>>>
>>>>>>>>
>>>>>>>> On Tue Mar 30 16:58:55 EDT 2010, Martin Morgan <mtmorgan at fhcrc.org>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> On 03/30/2010 01:13 PM, HU,ZHENGJUN wrote:
>>>>>>>>>>
>>>>>>>>>> Hi Martin,
>>>>>>>>>>
>>>>>>>>>>  I uninstalled graphviz-2.26.3.msi and then installed
>>>>>>>>>> graphviz-2.20.3.1.msi. Then installed the
>>>>>>>>>> Rgraphviz package again. As expected, I got the same error messages as
>>>>>>>>>> before:
>>>>>>>>>>
>>>>>>>>>> "Error in inDL(x, as.logical(local), as.logical(now), ...) :
>>>>>>>>>>  unable to load shared library
>>>>>>>>>> 'C:/PROGRA~1/R/R-210~1.1/library/Rgraphviz/libs/Rgraphviz.dll':
>>>>>>>>>>  LoadLibrary failure:  The specified module could not be found."
>>>>>>>>>
>>>>>>>>> 'LoadLibrary' is being vague, the 'specified modules' are the DLLs from
>>>>>>>>> graphviz.
>>>>>>>>>
>>>>>>>>> Have you checked that your 'PATH' environment variable is set correctly?
>>>>>>>>> In R
>>>>>>>>>
>>>>>>>>>  > strsplit(Sys.getenv("PATH"), ";")
>>>>>>>>> $PATH
>>>>>>>>>  ...
>>>>>>>>>  [14] "C:\\Program Files\\Graphviz2.20\\bin"
>>>>>>>>> ...
>>>>>>>>>
>>>>>>>>> The relevant files in this directory might look like
>>>>>>>>>
>>>>>>>>>> list.files(strsplit(Sys.getenv("PATH"), ";")[[1]][[14]], "dll")
>>>>>>>>>
>>>>>>>>>  [1] "iconv.dll"                      "intl.dll"
>>>>>>>>>  [3] "jpeg62.dll"                     "libcairo-2.dll"
>>>>>>>>>  [5] "libcdt-4.dll"                   "libcgraph-4.dll"
>>>>>>>>>  [7] "libexpat.dll"                   "libfontconfig-1.dll"
>>>>>>>>>  [9] "libfreetype-6.dll"              "libgdk_pixbuf-2.0-0.dll"
>>>>>>>>> [11] "libglib-2.0-0.dll"              "libgmodule-2.0-0.dll"
>>>>>>>>> [13] "libgobject-2.0-0.dll"           "libgraph-4.dll"
>>>>>>>>> [15] "libgvc-4.dll"                   "libgvplugin_core-5.dll"
>>>>>>>>> [17] "libgvplugin_dot_layout-5.dll"   "libgvplugin_gd-5.dll"
>>>>>>>>> [19] "libgvplugin_neato_layout-5.dll" "libgvplugin_pango-5.dll"
>>>>>>>>> [21] "libltdl-3.dll"                  "libpango-1.0-0.dll"
>>>>>>>>> [23] "libpangocairo-1.0-0.dll"        "libpangoft2-1.0-0.dll"
>>>>>>>>> [25] "libpangowin32-1.0-0.dll"        "libpathplan-4.dll"
>>>>>>>>> [27] "libpng12.dll"                   "libxml2.dll"
>>>>>>>>>
>>>>>>>>> Martin
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>  Thank you.
>>>>>>>>>>  Howard
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Tue Mar 30 15:36:05 EDT 2010, Martin Morgan <mtmorgan at fhcrc.org>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> On 03/30/2010 10:24 AM, HU,ZHENGJUN wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> Hi Duncan,
>>>>>>>>>>>>
>>>>>>>>>>>>> (They are pretty hard to find, but I think you can find them on the
>>>>>>>>>>>>> Bioconductor site.)  It is > not enough to install the Rgraphviz
>>>>>>>>>>>>> package, you also need to install Graphviz.
>>>>>>>>>>>>
>>>>>>>>>>>>  Yes I did. Before installing the Rgraphviz package successfully,
>>>>>>>>>>>> (1) I
>>>>>>>>>>>> downloaded graphviz-2.26.3.msi for MS Windows (XP) and installed it
>>>>>>>>>>>> successfully and (2) I also installed the packages from
>>>>>>>>>>>> Bioconductor by:
>>>>>>>>>>>> (Note: I use MS Windows XP and R 2.10.1 version)
>>>>>>>>>>>
>>>>>>>>>>> This is a bioconductor package so please ask on the Bioconductor
>>>>>>>>>>> mailing
>>>>>>>>>>> list
>>>>>>>>>>>
>>>>>>>>>>> http://bioconductor.org/docs/mailList.html
>>>>>>>>>>>
>>>>>>>>>>> See the 'README' file in the 'tar.gz' file at
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>  http://bioconductor.org/packages/release/Software.html
>>>>>>>>>>>  http://bioconductor.org/packages/2.5/bioc/html/Rgraphviz.html
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> http://bioconductor.org/packages/2.5/bioc/src/contrib/Rgraphviz_1.24.0.tar.gz
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> which says
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> o. install Graphviz ***2.20.3.1*** Windows ***binary*** distribution
>>>>>>>>>>> from
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> http://www.graphviz.org/pub/graphviz/stable/windows/graphviz-2.20.3.1.msi
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> you must use this version of graphviz. File paths must be correct.
>>>>>>>>>>>
>>>>>>>>>>> Martin
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> source("http://www.bioconductor.org/biocLite.R")
>>>>>>>>>>>> biocLite()
>>>>>>>>>>>>
>>>>>>>>>>>>  I got those error messages:
>>>>>>>>>>>>
>>>>>>>>>>>> "Error in inDL(x, as.logical(local), as.logical(now), ...) :
>>>>>>>>>>>>  unable to load shared library
>>>>>>>>>>>> 'C:/PROGRA~1/R/R-210~1.1/library/Rgraphviz/libs/Rgraphviz.dll':
>>>>>>>>>>>>  LoadLibrary failure:  The specified module could not be found."
>>>>>>>>>>>>
>>>>>>>>>>>>  Obviously, it seems it is the package problem because it should go
>>>>>>>>>>>> to
>>>>>>>>>>>> 'C:/PROGRA~1/R/R-2.10.1/library/Rgraphviz/libs/Rgraphviz.dll'
>>>>>>>>>>>> instead of
>>>>>>>>>>>> 'C:/PROGRA~1/R/R-210~1.1/library/Rgraphviz/libs/Rgraphviz.dll'
>>>>>>>>>>>>
>>>>>>>>>>>>  Thank you for the reply. Howard
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Tue Mar 30 12:50:44 EDT 2010, Duncan Murdoch
>>>>>>>>>>>> <murdoch at stats.uwo.ca>
>>>>>>>>>>>> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> On 30/03/2010 10:44 AM, HU,ZHENGJUN wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Hi All,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>  I tried to install the package of Rgraphviz in the following two
>>>>>>>>>>>>>> ways successfully:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> source("http://bioconductor.org/biocLite.R")
>>>>>>>>>>>>>> biocLite("Rgraphviz")
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> install.packages(pkgs="C:/Progra~1/R/lib_download/Rgraphviz_1.24.0.zip",
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> lib="C:/Progra~1/R/R-2.10.1/library", repos=NULL)
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> but when I loaded the package though library(Rgraphviz) or
>>>>>>>>>>>>>> library("Rgraphviz"), and got the same error message below:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> "Error in inDL(x, as.logical(local), as.logical(now), ...) :
>>>>>>>>>>>>>>  unable to load shared library
>>>>>>>>>>>>>> 'C:/PROGRA~1/R/R-210~1.1/library/Rgraphviz/libs/Rgraphviz.dll':
>>>>>>>>>>>>>>  LoadLibrary failure:  The specified module could not be found."
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Most likely the problem is that you haven't followed the
>>>>>>>>>>>>> installation
>>>>>>>>>>>>> instructions.  (They are pretty hard to find, but I think you can
>>>>>>>>>>>>> find
>>>>>>>>>>>>> them on the Bioconductor site.)  It is not enough to install the
>>>>>>>>>>>>> Rgraphviz package, you also need to install Graphviz.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Duncan Murdoch
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I think that it is the error in the package because it should go to
>>>>>>>>>>>>>> 'C:/PROGRA~1/R/R-2.10.1/library/Rgraphviz/libs/Rgraphviz.dll'
>>>>>>>>>>>>>> instead
>>>>>>>>>>>>>> of 'C:/PROGRA~1/R/R-210~1.1/library/Rgraphviz/libs/Rgraphviz.dll'
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Could anyone help me to solve to problem?
>>>>>>>>>>>>>> Thank you very much for the help. Howard
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> ______________________________________________
>>>>>>>>>>>>>> R-help at r-project.org mailing list
>>>>>>>>>>>>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>>>>>>>>>>>>> PLEASE do read the posting guide
>>>>>>>>>>>>>> http://www.R-project.org/posting-guide.html
>>>>>>>>>>>>>> and provide commented, minimal, self-contained, reproducible code.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> -- HU,ZHENGJUN
>>>>>>>>>>>>
>>>>>>>>>>>> ______________________________________________
>>>>>>>>>>>> R-help at r-project.org mailing list
>>>>>>>>>>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>>>>>>>>>>> PLEASE do read the posting guide
>>>>>>>>>>>> http://www.R-project.org/posting-guide.html
>>>>>>>>>>>> and provide commented, minimal, self-contained, reproducible code.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> -- Martin Morgan
>>>>>>>>>>> Computational Biology / Fred Hutchinson Cancer Research Center
>>>>>>>>>>> 1100 Fairview Ave. N.
>>>>>>>>>>> PO Box 19024 Seattle, WA 98109
>>>>>>>>>>>
>>>>>>>>>>> Location: Arnold Building M1 B861
>>>>>>>>>>> Phone: (206) 667-2793
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> -- HU,ZHENGJUN
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> -- Martin Morgan
>>>>>>>>> Computational Biology / Fred Hutchinson Cancer Research Center
>>>>>>>>> 1100 Fairview Ave. N.
>>>>>>>>> PO Box 19024 Seattle, WA 98109
>>>>>>>>>
>>>>>>>>> Location: Arnold Building M1 B861
>>>>>>>>> Phone: (206) 667-2793
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> -- HU,ZHENGJUN
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -- Martin Morgan
>>>>>>> Computational Biology / Fred Hutchinson Cancer Research Center
>>>>>>> 1100 Fairview Ave. N.
>>>>>>> PO Box 19024 Seattle, WA 98109
>>>>>>>
>>>>>>> Location: Arnold Building M1 B861
>>>>>>> Phone: (206) 667-2793
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> HU,ZHENGJUN
>>>>>>
>>>>>>
>>>>>
>>>>> ______________________________________________
>>>>> R-help at r-project.org mailing list
>>>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>>>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>>>>> and provide commented, minimal, self-contained, reproducible code.
>>>>>
>>>>
>>>> ______________________________________________
>>>> R-help at r-project.org mailing list
>>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>>>> and provide commented, minimal, self-contained, reproducible code.
>>>
>>>
>>> --
>>> Martin Morgan
>>> Computational Biology / Fred Hutchinson Cancer Research Center
>>> 1100 Fairview Ave. N.
>>> PO Box 19024 Seattle, WA 98109
>>>
>>> Location: Arnold Building M1 B861
>>> Phone: (206) 667-2793
>>>
>
>
> --
> Martin Morgan
> Computational Biology / Fred Hutchinson Cancer Research Center
> 1100 Fairview Ave. N.
> PO Box 19024 Seattle, WA 98109
>
> Location: Arnold Building M1 B861
> Phone: (206) 667-2793
>



More information about the R-help mailing list