[BioC] Rgraphviz load problem

Byron Ellis ellis at stat.harvard.edu
Sat Oct 29 03:26:23 CEST 2005


Yeah, there's a version mismatch between the graphviz you can easily  
compile and the graphviz required by Rgraphviz on OS X. In answer to  
your earlier question, which is well timed since I decided I needed  
Rgraphviz back today:



WARNING: THIS IS A HACK. GRAPHVIZ ON MY SYSTEM IS PROBABLY BROKEN IN  
ALL MANNER OF EXCITING WAYS. DO NOT TRY THIS AT HOME, YOUR COMPUTER  
WILL EXPLODE AND APPLE WON'T FIX IT!


How to Build Rgraphviz From Source on OS X
or
The Path Of Pain
or
Can I Have Those Two Hours Back Now?

A Cautionary Tale


Step 1. Start coffee brewing, you WILL need it.

Step 1.5. For minimal (hah!) pain get libjpeg/png/tiff/et al and  
install those. A copy of expat might not hurt either.

Step 2. Get graphviz-2.6.tar.gz and unpack that

Step 3. Configure. Make. Observe that it bombs out on something  
called a "codegen."

Step 4. Check configure. Hey! You can disable codegens

Step 5. ./configure --disable-codegens; make

Step 6. Drink coffee

Step 7. Observe that there are two symbols that can't be resolved.  
Furthermore, they are to be found in xdgen.c. But xdgen.c is disabled  
by the codegen option. *sigh*

Step 8. Add xdgen.lo back into the Makefile. Go to xdgen.c and wrap  
up the codegen_t structure in an #ifdef

Step 9. make

Step 10. Contemplate the utility of including configure options that  
don't actually work.

Step 11. For some reason it will bomb again looking for "environ,"  
which is actually there. I suspect a linking issue but don't care so  
I just comment out its usage in the if statement of pathpath.c

Step 11. The usershape_gd will break for reasons unrelated to  
codegens with undefined symbols. Copy the LIBADD from dotplan or  
something and it'll build. For whatever reason it doesn't link, yet  
uses, calls from the cdt library. Linking in gvc seems to do the trick

Step 12. If you were dumb enough (like me) to install tcl support,  
fix various codegen issues in TclDot. Ditch tkgen completely, its  
only going to cause more pain as its related to codegen.

Step 13. If you're dumb enough not to have libjpeg (like me) be aware  
that diffimage doesn't actually, you know, check config.h. Wrap the  
appropriate statements in #ifdef's in contrib/diffimage/diffimage.c

Step 14. make a few more times to see if you got everything

Step 15. make install

Step 16. Hurrah. You can now install Rgraphviz 1.8 unmolested (just  
make sure Biobase is loaded before you try to use the plotting  
routines because they use listLen.)

fink and darwinports can also build graphviz, but I'm not sure if  
they're using a version new enough to match with Rgraphviz-1.8

Perhaps later I'll try a static build of Rgraphviz, but right now I'm  
just happy it works

On Oct 27, 2005, at 11:43 AM, Fridlyand, Jane wrote:

>
> I am trying to install Rgraphviz under Mac OS X Tiger (10.4.2). I  
> am using
> the latest R (2.2) and Rgraphviz 1.8 . I downloaded and successfully
> installed what i think is the most current graphviz dmg for mac  
> (1.10.dmg).
> It installed in /usr/local/lib/graphviz. I added thje fowllowing  
> to .bashrc:
>
>
> export LD_LIBRARY_PATH=/usr/local/lib/graphviz
>
> Now, i am getting the follwoing error when installing and loading from
> within R: the package seems to install but not load
>
>
>> getBioC("Rgraphviz")
>>
>
> Running getBioC version 0.8  with R version  2.2.0
>
> Running biocinstall version 1.1  with R version  2.2.0
> Warning: unable to access index for repository
> http://www.bioconductor.org/packa
> ges/data/experiment/1.7/bin/macosx/powerpc/contrib/2.2
> trying URL
> 'http://www.bioconductor.org/packages/bioc/1.7/bin/macosx/powerpc/con
> trib/2.2/Rgraphviz_1.8.0.tgz'
> Content type 'application/x-gzip' length 1263932 bytes
> opened URL
> ==================================================
> downloaded 1234Kb
>
>
> The downloaded packages are in
>         /tmp/RtmpwRAbnb/downloaded_packages
>
>>
>> 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/Rgra
> ph
> viz.so, 6): Symbol not found: _agedgeattr
>   Referenced from:
> /Library/Frameworks/R.framework/Resources/library/Rgraphviz/l
> ibs/Rgraphviz.so
>   Expected in: flat namespace
> Error: .onLoad failed in 'loadNamespace' for 'Rgraphviz'
> Error: package/namespace load failed for 'Rgraphviz'
>
>>
>>
>
> I also tried to install from the local file using R CMD INSTALL but  
> get the
> follwoing error which i am not sure how to remedy:
>
> sparky$ sudo R CMD INSTALL Rgraphviz
> Password:
> * Installing *source* package 'Rgraphviz' ...
> checking for graphviz... checking for dotneato-config...
> /usr/local/bin/dotneato-config
> /usr/local/bin/dotneato-config
> failed
> configure: error: please specify a valid path to 'dotneato-config'  
> version
>
>> = 1.12 using --with-graphviz=DIR
>>
> ERROR: configuration failed for package 'Rgraphviz'
> ** Removing
> '/usr/local/lib/R.framework/Versions/2.2/Resources/library/Rgraphviz'
> ** Restoring previous
> '/usr/local/lib/R.framework/Versions/2.2/Resources/library/Rgraphviz'
>
>
> I appreciate the advice. I noticed a lot of people were having  
> issue with
> installation and I looked thru the mailing list but most of the  
> solutions
> amounted to installing graphviz and exporting path  both of which I  
> have
> done
>
> Thank you again
>
> Jane
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
>

---
Byron Ellis (ellis at stat.harvard.edu)
"Oook" -- The Librarian



More information about the Bioconductor mailing list