Skip to content

graphviz

6 messages · Seth Falcon, Byron Ellis, Michael Kubovy +2 more

#
Hi Seth,

I installed graphviz 2.8 downloaded from http://www.graphviz.org/pub/ 
graphviz/ARCHIVE/graphviz-2.8.tar.gz and compiled using the commands
./configure
make
make install

It apparently succeeded.

However:
% which graphviz
graphviz: Command not found.

Moreover in R I have Rgraphviz 1.8.0, but
 > library(Rgraphviz)
Loading required package: graph
Loading required package: cluster
Loading required package: Ruuid
Error in dyn.load(x, as.logical(local), as.logical(now)) :
	unable to load shared library '/Library/Frameworks/R.framework/ 
Resources/library/Rgraphviz/libs/Rgraphviz.so':
   dlopen(/Library/Frameworks/R.framework/Resources/library/Rgraphviz/ 
libs/Rgraphviz.so, 6): Symbol not found: _agedgeattr
   Referenced from: /Library/Frameworks/R.framework/Resources/library/ 
Rgraphviz/libs/Rgraphviz.so
   Expected in: flat namespace
Error: .onLoad failed in 'loadNamespace' for 'Rgraphviz'
Error: package/namespace load failed for 'Rgraphviz'

 > version
          _
platform powerpc-apple-darwin7.9.0
arch     powerpc
os       darwin7.9.0
system   powerpc, darwin7.9.0
status
major    2
minor    2.1
year     2005
month    12
day      20
svn rev  36812
language R

Now to my request:

You wrote to Julin:
Could you please unpack the above to an extent appropriate to the  
level of ignorance you see in my description? In other words I don't  
know about autoconf, or pkg-config, nor how to set the  
PKG_CONFIG_PATH  nor how to determine /blah/lib/pkgconfig what the  
appropriate 'blah' is.

And just to make sure that I'm giving you all the information you  
might need to help me: (1) FinkCommander tells me that I have  
graphviz 1.9-11 installed. (2) I have Graphviz Version 1.13 (16) from  
pixelglow. (I've successfully used it to generate graphs. As is  
probably clear, I'm trying to integrate graphviz into my R toolkit,  
which is not urgent, but would be satisfying.)

Thanks,
Michael
_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS:     P.O.Box 400400    Charlottesville, VA 22904-4400
Parcels:    Room 102        Gilmer Hall
         McCormick Road    Charlottesville, VA 22903
Office:    B011    +1-434-982-4729
Lab:        B019    +1-434-982-4751
Fax:        +1-434-982-4766
WWW:    http://www.people.virginia.edu/~mk9y/
#
Hi Michael,

Michael Kubovy <kubovy at virginia.edu> writes:
I'll give it a shot.
That's good.  The graphviz headers and libs are most likely somewhere
under /usr/local/.  That is the default "prefix" used for almost all
code when you do "./configure; make; make install".  

Have look under /usr/local/lib or possibly /usr/local/lib/graphviz.
See if you can find a directory called pkgconfig that contains a file
called libgvc.pc.  Now let's assume you found this dir here:
/usr/local/lib/pkgconfig.
I think it will be better to try to use graphviz-2.8 which you
installed from source.  Since you are using fink, you can (and should)
install the pkgconfig package.  This will give you an executable named
pkg-config.

Now you can try the following:

   export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
   R CMD INSTALL Rgraphviz_1.8.0.tar.gz

The first line sets an environment variable.  You may need to adjust
the value to the actual path where you found the pkgconfig dir
containing libgvc.pc.  If you don't have the Rgraphviz source tarball
handy, you can either download it from the Bioconductor website, or
from the same shell where you just ran the export command to set the
environment variable, do

   R
   > source("http://bioconductor.org/biocLite.R")
   > biocLite("Rgraphviz")

Let us know how things turn out.

    Quick aside: if you want to install to a specific place, say
    GVIZ-TEST under you home directory, you could do this:

        mkdir ~/GVIZ-TEST
        cd graphviz-2.8
        ./configure --prefix=~/GVIZ-TEST
        make
        make install


+ seth
#
Did you type 'sudo make install'? If not, graphviz may not have  
actually installed itself (making sure /usr/local/bin/dot exists is a  
way to check this)

I recently did an Rgraphviz build for myself using graphviz-2.9  
(though 2.8 should also work fine) and Rgraphviz 1.9.6 (the SVN  
version) and pkg-config (which I get from http:// 
pkgconfig.freedesktop.org/releases/).

I should note that I don't use Fink or Darwinports and that Glen Low  
(author of Graphviz.app) seems to have wandered off to other things  
so the GUI version of Graphviz is pretty massively out of date these  
days.
On Mar 18, 2006, at 6:27 AM, Michael Kubovy wrote:

            
---
Byron Ellis (ellis at stat.harvard.edu)
"Oook" -- The Librarian
#
Hi Byron,
On Mar 19, 2006, at 3:03 AM, Byron Ellis wrote:
Thanks for the reply.

I did type sudo make install.

% which dot
/sw/bin/dot

% ls /usr/local/bin/dot
/usr/local/bin/dot

Both are executable and seem to run:
% dot unix.dot
and
% /usr/local/bin/dot unix.dot
output a file that is different from the input.

So graphviz is installed. My guess is that Rgraphviz doesn't know it.
_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS:     P.O.Box 400400    Charlottesville, VA 22904-4400
Parcels:    Room 102        Gilmer Hall
         McCormick Road    Charlottesville, VA 22903
Office:    B011    +1-434-982-4729
Lab:        B019    +1-434-982-4751
Fax:        +1-434-982-4766
WWW:    http://www.people.virginia.edu/~mk9y/
#
Hi Michael,

Looks like you have two installations of graphviz; the one in sw/ is from fink.  I am not sure why it would interfere, but perhaps you should use fink to remove the one in sw.

I assume you saw my post to the group last night...Seth's recommendation to you worked for me once I used gcc_select 3.3 (the original suggestion to me to either export the LD_PATH or specify the graphviz location directly to R did not work).

that is,

#check to see that usr/local/lib/graphviz and usr/local/lib/pkginfo exist (created from the graphviz installation)

#make sure gcc3.3 is set up correctly:
sudo gcc_select 3.3

#export the location.  Note that the expot command doesn't work in csh or tcsh, so you should use bash
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

#then compile and install Rgaphviz
R CMD INSTALL Rgraphviz_1.8.0.tar.gz 


hope that helps...

Julin
Michael Kubovy wrote:

  
    
#
Thanks to Seth, Byron, and Julin for their help.

Apparently I had graphviz installed twice (once using fink).

Once I got rid of it, everything worked.

I installed graphviz 2.9 downloaded from http://www.graphviz.org/pub/
graphviz/ARCHIVE/graphviz-2.9.tar.gz and compiled using the commands
% ./configure
% make
% sudo make install

Then:
% sudo gcc_select 3.3
% setenv PKG_CONFIG_PATH /usr/local/lib/pkgconfig
% sudo R

R : Copyright 2005, The R Foundation for Statistical Computing
Version 2.2.1  (2005-12-20 r36812)

<snip>

 > source("http://bioconductor.org/biocLite.R")
 > biocLite("Rgraphviz", type="source")

Running bioCLite version 0.1  with R version  2.2.1

Running biocinstall version 1.1  with R version  2.2.1
trying URL 'http://www.bioconductor.org/packages/bioc/1.7/src/contrib/ 
Rgraphviz_1.8.0.tar.gz'
Content type 'application/x-gzip' length 1666191 bytes
opened URL
==================================================
downloaded 1627Kb

* Installing *source* package 'Rgraphviz' ...

<snip>

** building package indices ...
* DONE (Rgraphviz)

The downloaded packages are in
         /private/tmp/Rtmp1SLt6w/downloaded_packages



_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS:     P.O.Box 400400    Charlottesville, VA 22904-4400
Parcels:    Room 102        Gilmer Hall
         McCormick Road    Charlottesville, VA 22903
Office:    B011    +1-434-982-4729
Lab:        B019    +1-434-982-4751
Fax:        +1-434-982-4766
WWW:    http://www.people.virginia.edu/~mk9y/